diff options
author | Cyril Sobierajewicz <38043722+cyrilfretlink@users.noreply.github.com> | 2020-05-12 11:57:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 11:57:31 +0200 |
commit | 70b79be6cd660b55f401c264c5bfa5fdd5d1f909 (patch) | |
tree | 411e8a624f0a1788d4437ae42307fced3e7ab485 /preinstall.js | |
parent | e265ce577dfea922bc3e6ac89f33cab8d104dde2 (diff) | |
parent | fe9b8ac97a6913a0dd6d726eb36321bfe841e38f (diff) | |
download | node-dhall-json-bin-70b79be6cd660b55f401c264c5bfa5fdd5d1f909.tar.gz node-dhall-json-bin-70b79be6cd660b55f401c264c5bfa5fdd5d1f909.tar.zst node-dhall-json-bin-70b79be6cd660b55f401c264c5bfa5fdd5d1f909.zip |
Merge pull request #4 from cyrilfretlink/remove-yaml-to-dhall
Remove `yaml-to-dhall`
Diffstat (limited to 'preinstall.js')
-rw-r--r-- | preinstall.js | 5 |
1 files changed, 0 insertions, 5 deletions
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"); | |||
62 | 62 | ||
63 | const isLesserThan = (version, upperBound) => | 63 | const isLesserThan = (version, upperBound) => |
64 | semver.valid(version) && semver.lt(version, upperBound); | 64 | semver.valid(version) && semver.lt(version, upperBound); |
65 | const isGreaterThan = (version, lowerBound) => | ||
66 | semver.valid(version) && semver.gt(version, lowerBound); | ||
67 | 65 | ||
68 | if (isLesserThan(dhallJsonVersion, "1.2.8")) { | 66 | if (isLesserThan(dhallJsonVersion, "1.2.8")) { |
69 | 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\`.`); | 67 | 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\`.`); |
70 | } | 68 | } |
71 | if (isLesserThan(dhallJsonVersion, "1.3.0") || isGreaterThan(dhallJsonVersion, "1.5.0")) { | ||
72 | 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\`.`); | ||
73 | } | ||
74 | 69 | ||
75 | const release = `https://github.com/dhall-lang/dhall-haskell/releases/download/${dhallVersion}/dhall-json-${dhallJsonVersion}`; | 70 | const release = `https://github.com/dhall-lang/dhall-haskell/releases/download/${dhallVersion}/dhall-json-${dhallJsonVersion}`; |
76 | 71 | ||