X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=preinstall.js;h=8fdfbfe4c92fec147c7692ed843fefe8acce0f71;hb=844992527b5ffe2e8f98d6efb543ac2cc03f22e2;hp=292b73b961ff8d518baac93cfd48de5f6e11e2c9;hpb=e265ce577dfea922bc3e6ac89f33cab8d104dde2;p=github%2Ffretlink%2Fnode-dhall-json-bin.git diff --git a/preinstall.js b/preinstall.js index 292b73b..8fdfbfe 100644 --- a/preinstall.js +++ b/preinstall.js @@ -62,15 +62,10 @@ const dhallJsonVersion = readVersion("dhall-json"); const isLesserThan = (version, upperBound) => semver.valid(version) && semver.lt(version, upperBound); -const isGreaterThan = (version, lowerBound) => - semver.valid(version) && semver.gt(version, lowerBound); if (isLesserThan(dhallJsonVersion, "1.2.8")) { throw new Error(`This release of the \`${pkg.name}\` npm package installs \`json-to-dhall\`, which isn’t provided by \`dhall-json@<1.2.8\`.`); } -if (isLesserThan(dhallJsonVersion, "1.3.0") || isGreaterThan(dhallJsonVersion, "1.5.0")) { - throw new Error(`This release of the \`${pkg.name}\` npm package installs \`yaml-to-dhall\`, which isn’t provided by \`dhall-json@<1.3.0 >1.5.0\`.`); -} const release = `https://github.com/dhall-lang/dhall-haskell/releases/download/${dhallVersion}/dhall-json-${dhallJsonVersion}`;