From eab91b3b9587bc05d42bfbcbd4b6a2f2088e0d1a Mon Sep 17 00:00:00 2001 From: "Chris West (Faux)" Date: Sat, 18 Jul 2020 11:01:10 +0100 Subject: [PATCH] feat: then-fs -> promise-fs then-fs seems to be causing a memory leak in jest in other tools. Found by https://github.com/facebook/jest/pull/8331 --- lib/index.js | 2 +- package.json | 2 +- test/index.test.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index b53a232..1405c55 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,7 +1,7 @@ module.exports = resolvePkg; module.exports.sync = sync; -var fs = require('then-fs'); +var fs = require('promise-fs'); var path = require('path'); var debug = require('debug')('snyk:resolve'); diff --git a/package.json b/package.json index 7de1fb0..f2de286 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "license": "Apache-2.0", "dependencies": { "debug": "^4.1.1", - "then-fs": "^2.0.0" + "promise-fs": "^2.1.1" }, "devDependencies": { "es6-promise": "^4.2.8", diff --git a/test/index.test.js b/test/index.test.js index ecad505..ecadaf2 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -31,7 +31,7 @@ var fs = { }; var resolve = proxyquire('../lib/index', { - 'then-fs': fs, + 'promise-fs': fs, }); test('resolve immediately', function (t) { @@ -140,4 +140,4 @@ test('resolve works with scoped packages', function (t) { }); t.equal(resolve.sync('@remy/foo', base), path.dirname(target), 'sync scoped matches'); -}); \ No newline at end of file +});