diff options
author | Cyril Sobierajewicz <cyril.sobierajewicz@fretlink.com> | 2020-05-12 11:02:55 +0200 |
---|---|---|
committer | Cyril Sobierajewicz <cyril.sobierajewicz@fretlink.com> | 2020-05-12 11:56:02 +0200 |
commit | 83587ec8d7f254c207714fa1e305e74adf6ecde7 (patch) | |
tree | 069d3d53640e9165f825de3ad449ae409e22fa3f | |
parent | e265ce577dfea922bc3e6ac89f33cab8d104dde2 (diff) | |
download | node-dhall-json-bin-83587ec8d7f254c207714fa1e305e74adf6ecde7.tar.gz node-dhall-json-bin-83587ec8d7f254c207714fa1e305e74adf6ecde7.tar.zst node-dhall-json-bin-83587ec8d7f254c207714fa1e305e74adf6ecde7.zip |
Remove `yaml-to-dhall`
The executable isn’t installed anymore with `dhall-json@>1.5.0`.
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | preinstall.js | 5 |
2 files changed, 1 insertions, 7 deletions
diff --git a/package.json b/package.json index 5d7cb78..e1e3c5c 100644 --- a/package.json +++ b/package.json | |||
@@ -16,8 +16,7 @@ | |||
16 | "bin": { | 16 | "bin": { |
17 | "dhall-to-json": "bin/dhall-to-json.exe", | 17 | "dhall-to-json": "bin/dhall-to-json.exe", |
18 | "dhall-to-yaml": "bin/dhall-to-yaml.exe", | 18 | "dhall-to-yaml": "bin/dhall-to-yaml.exe", |
19 | "json-to-dhall": "bin/json-to-dhall.exe", | 19 | "json-to-dhall": "bin/json-to-dhall.exe" |
20 | "yaml-to-dhall": "bin/yaml-to-dhall.exe" | ||
21 | }, | 20 | }, |
22 | "scripts": { | 21 | "scripts": { |
23 | "preinstall": "node ./preinstall.js" | 22 | "preinstall": "node ./preinstall.js" |
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 | ||