Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/install/action/extract.js')
-rw-r--r--lib/install/action/extract.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/install/action/extract.js b/lib/install/action/extract.js
index ea2d50935..4693f4940 100644
--- a/lib/install/action/extract.js
+++ b/lib/install/action/extract.js
@@ -15,10 +15,9 @@ const pacote = require('pacote')
const pacoteOpts = require('../../config/pacote')
const path = require('path')
const readJson = BB.promisify(require('read-package-json'))
-const updatePackageJson = BB.promisify(require('../update-package-json'))
module.exports = extract
-function extract (staging, pkg, log, next) {
+function extract (staging, pkg, log) {
log.silly('extract', packageId(pkg))
const up = npm.config.get('unsafe-perm')
const user = up ? null : npm.config.get('user')
@@ -49,14 +48,13 @@ function extract (staging, pkg, log, next) {
delete metadata.readmeFilename
pkg.package = metadata
}
- return updatePackageJson(pkg, extractTo)
}).then(() => {
if (pkg.package.bundleDependencies) {
return readBundled(pkg, staging, extractTo)
}
}).then(() => {
return gentlyRm(path.join(extractTo, 'node_modules'))
- }).then(() => next(), next)
+ })
}
function readBundled (pkg, staging, extractTo) {
@@ -101,8 +99,6 @@ function finishModule (bundler, child, stageTo, stageFrom) {
if (child.fromBundle === bundler) {
return mkdirp(path.dirname(stageTo)).then(() => {
return move(stageFrom, stageTo)
- }).then(() => {
- return updatePackageJson(child, stageTo)
})
} else {
return fs.statAsync(stageFrom).then(() => {