From 65df6a0875cb6762a5fe0d68681dd525f7003e37 Mon Sep 17 00:00:00 2001 From: guybedford Date: Mon, 1 Aug 2016 14:46:28 +0200 Subject: [PATCH] Promise warning fix --- lib/package.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/package.js b/lib/package.js index fa9f7a115..74356642a 100644 --- a/lib/package.js +++ b/lib/package.js @@ -670,9 +670,12 @@ exports.download = function(pkg, options, depsCallback) { Object.keys(depRanges.peerDeps).forEach(function(dep) { rangeMap.peerDependencies[dep] = depRanges.peerDeps[dep].exactName; }); - postloadResolve(depRanges); fs.writeFileSync(cacheDir + '.deps.json', JSON.stringify(rangeMap, null, 2)); fs.writeFileSync(path.resolve(cacheDir, '.jspm-hash'), fullHash + newLine + cfgHash); + + // postloadResolve creates a promise so we need to return null for Bluebird warnings + postloadResolve(depRanges); + return null; }); })