]> git.immae.eu Git - github/fretlink/node-dhall-json-bin.git/commitdiff
Remove `yaml-to-dhall`
authorCyril Sobierajewicz <cyril.sobierajewicz@fretlink.com>
Tue, 12 May 2020 09:02:55 +0000 (11:02 +0200)
committerCyril Sobierajewicz <cyril.sobierajewicz@fretlink.com>
Tue, 12 May 2020 09:56:02 +0000 (11:56 +0200)
The executable isn’t installed anymore with `dhall-json@>1.5.0`.

package.json
preinstall.js

index 5d7cb78c3b9052669c097ee85ef0ea58055f2e75..e1e3c5ce3475db573d8aa81300907942fb1fc03d 100644 (file)
@@ -16,8 +16,7 @@
   "bin": {
     "dhall-to-json": "bin/dhall-to-json.exe",
     "dhall-to-yaml": "bin/dhall-to-yaml.exe",
-    "json-to-dhall": "bin/json-to-dhall.exe",
-    "yaml-to-dhall": "bin/yaml-to-dhall.exe"
+    "json-to-dhall": "bin/json-to-dhall.exe"
   },
   "scripts": {
     "preinstall": "node ./preinstall.js"
index 292b73b961ff8d518baac93cfd48de5f6e11e2c9..8fdfbfe4c92fec147c7692ed843fefe8acce0f71 100644 (file)
@@ -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}`;