From f73eb4264847ae11a141805db90bdc5f7dc4aec2 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 28 Aug 2014 17:04:23 -0700 Subject: [PATCH 1/2] actually depend on graceful-fs Since graceful-fs doesn't monkey-patch the builtin, there's no need to make it optional. Also, it's currently being pulled in all the time anyway, so why not just depend on it normally? --- index.js | 6 +----- package.json | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/index.js b/index.js index 7853e86..59a1f6c 100644 --- a/index.js +++ b/index.js @@ -11,11 +11,7 @@ module.exports = cmdShim cmdShim.ifExists = cmdShimIfExists -try { - var fs = require("graceful-fs") -} catch (e) { - var fs = require("fs") -} +var fs = require("graceful-fs") var mkdir = require("mkdirp") , path = require("path") diff --git a/package.json b/package.json index 7fa6c01..f551d23 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,6 @@ "url": "https://github.com/ForbesLindesay/cmd-shim.git" }, "license": "BSD", - "optionalDependencies": { - "graceful-fs": "2" - }, "dependencies": { "graceful-fs": "^3.0.2", "mkdirp": "~0.5.0" @@ -21,4 +18,4 @@ "tap": "~0.4.11", "rimraf": "~2.2.8" } -} \ No newline at end of file +} From bfde4413fdc42d6ce4255c7bfc13dedcc818fe36 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 3 Sep 2014 10:57:21 -0700 Subject: [PATCH 2/2] Expand version for the benefit of ancient SemVer --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f551d23..9fad368 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "license": "BSD", "dependencies": { - "graceful-fs": "^3.0.2", + "graceful-fs": ">3.0.1 <4.0.0-0", "mkdirp": "~0.5.0" }, "devDependencies": {