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
path: root/lib
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-05-16 03:25:48 +0300
committerRebecca Turner <me@re-becca.org>2017-05-26 04:55:21 +0300
commitc0a02aae63e15fc80f2490483ebb6391e5a56c4f (patch)
tree0c027317a0059fcd029d1f28167153b047ca9f03 /lib
parent3c3428277b2d045d9eabd6826125f6055d174ff7 (diff)
extract: Stop reading the package.json here
Diffstat (limited to 'lib')
-rw-r--r--lib/install/action/extract.js17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/install/action/extract.js b/lib/install/action/extract.js
index 7001c2a24..783917785 100644
--- a/lib/install/action/extract.js
+++ b/lib/install/action/extract.js
@@ -15,7 +15,6 @@ const packageId = require('../../utils/package-id.js')
const pacote = require('pacote')
const pacoteOpts = require('../../config/pacote')
const path = require('path')
-const readJson = BB.promisify(require('read-package-json'))
module.exports = extract
function extract (staging, pkg, log) {
@@ -36,22 +35,6 @@ function extract (staging, pkg, log) {
extractTo,
opts
).then(() => {
- return readJson(path.join(extractTo, 'package.json'), false).catch(() => {
- return null
- })
- }).then((metadata) => {
- if (metadata) {
- // Copy _ keys (internal to npm) and any missing keys from the possibly incomplete
- // registry metadata over to the full package metadata read off of disk.
- Object.keys(pkg.package).forEach(function (key) {
- metadata[key] = pkg.package[key]
- })
- // These two sneak in and it's awful
- delete metadata.readme
- delete metadata.readmeFilename
- pkg.package = metadata
- }
- }).then(() => {
if (pkg.package.bundleDependencies) {
return readBundled(pkg, staging, extractTo)
}