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:
authorisaacs <i@izs.me>2019-12-10 03:04:01 +0300
committerisaacs <i@izs.me>2019-12-10 03:30:37 +0300
commit59c836aae8d0104a767e80c540b963c91774012a (patch)
treef9e01a5d4ac0736d4ee329ae91a53e5b2bfcb1ac /node_modules/npm-bundled
parent19ce061a2ee165d8de862c8f0f733c222846b9e1 (diff)
npm-packlist@1.4.7
Diffstat (limited to 'node_modules/npm-bundled')
-rw-r--r--node_modules/npm-bundled/index.js18
-rw-r--r--node_modules/npm-bundled/package.json15
2 files changed, 22 insertions, 11 deletions
diff --git a/node_modules/npm-bundled/index.js b/node_modules/npm-bundled/index.js
index bde0acd16..197a1bcb9 100644
--- a/node_modules/npm-bundled/index.js
+++ b/node_modules/npm-bundled/index.js
@@ -10,6 +10,9 @@
const fs = require('fs')
const path = require('path')
const EE = require('events').EventEmitter
+// we don't care about the package bins, but we share a pj cache
+// with other modules that DO care about it, so keep it nice.
+const normalizePackageBin = require('npm-normalize-package-bin')
class BundleWalker extends EE {
constructor (opt) {
@@ -84,7 +87,7 @@ class BundleWalker extends EE {
onPackageJson (pj, data) {
try {
- this.package = JSON.parse(data + '')
+ this.package = normalizePackageBin(JSON.parse(data + ''))
} catch (er) {
return this.done()
}
@@ -92,17 +95,22 @@ class BundleWalker extends EE {
this.onPackage(this.package)
}
+ allDepsBundled (pkg) {
+ return Object.keys(pkg.dependencies || {}).concat(
+ Object.keys(pkg.optionalDependencies || {}))
+ }
+
onPackage (pkg) {
// all deps are bundled if we got here as a child.
// otherwise, only bundle bundledDeps
// Get a unique-ified array with a short-lived Set
- const bdRaw = this.parent
- ? Object.keys(pkg.dependencies || {}).concat(
- Object.keys(pkg.optionalDependencies || {}))
+ const bdRaw = this.parent ? this.allDepsBundled(pkg)
: pkg.bundleDependencies || pkg.bundledDependencies || []
const bd = Array.from(new Set(
- Array.isArray(bdRaw) ? bdRaw : Object.keys(bdRaw)))
+ Array.isArray(bdRaw) ? bdRaw
+ : bdRaw === true ? this.allDepsBundled(pkg)
+ : Object.keys(bdRaw)))
if (!bd.length)
return this.done()
diff --git a/node_modules/npm-bundled/package.json b/node_modules/npm-bundled/package.json
index 482973740..18c578a5c 100644
--- a/node_modules/npm-bundled/package.json
+++ b/node_modules/npm-bundled/package.json
@@ -1,8 +1,8 @@
{
"_from": "npm-bundled@^1.0.1",
- "_id": "npm-bundled@1.0.6",
+ "_id": "npm-bundled@1.1.1",
"_inBundle": false,
- "_integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
+ "_integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
"_location": "/npm-bundled",
"_phantomChildren": {},
"_requested": {
@@ -18,10 +18,10 @@
"_requiredBy": [
"/npm-packlist"
],
- "_resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
- "_shasum": "e7ba9aadcef962bb61248f91721cd932b3fe6bdd",
+ "_resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
+ "_shasum": "1edd570865a94cdb1bc8220775e29466c9fb234b",
"_spec": "npm-bundled@^1.0.1",
- "_where": "/Users/aeschright/code/npm-release/node_modules/npm-packlist",
+ "_where": "/Users/isaacs/dev/npm/cli/node_modules/npm-packlist",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -31,6 +31,9 @@
"url": "https://github.com/npm/npm-bundled/issues"
},
"bundleDependencies": false,
+ "dependencies": {
+ "npm-normalize-package-bin": "^1.0.1"
+ },
"deprecated": false,
"description": "list things in node_modules that are bundledDependencies, or transitive dependencies thereof",
"devDependencies": {
@@ -56,5 +59,5 @@
"preversion": "npm test",
"test": "tap test/*.js -J --100"
},
- "version": "1.0.6"
+ "version": "1.1.1"
}