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
parent19ce061a2ee165d8de862c8f0f733c222846b9e1 (diff)
npm-packlist@1.4.7
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/npm-bundled/index.js18
-rw-r--r--node_modules/npm-bundled/package.json15
-rw-r--r--node_modules/npm-packlist/index.js15
-rw-r--r--node_modules/npm-packlist/package.json25
4 files changed, 44 insertions, 29 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"
}
diff --git a/node_modules/npm-packlist/index.js b/node_modules/npm-packlist/index.js
index dd7706a4a..eaf14b866 100644
--- a/node_modules/npm-packlist/index.js
+++ b/node_modules/npm-packlist/index.js
@@ -17,6 +17,8 @@ const rootBuiltinRules = Symbol('root-builtin-rules')
const packageNecessaryRules = Symbol('package-necessary-rules')
const path = require('path')
+const normalizePackageBin = require('npm-normalize-package-bin')
+
const defaultRules = [
'.npmignore',
'.gitignore',
@@ -176,12 +178,11 @@ const npmWalker = Class => class Walker extends Class {
'!npm-shrinkwrap.json',
'!@(readme|copying|license|licence|notice|changes|changelog|history){,.*[^~$]}'
]
- if (pkg.bin)
- if (typeof pkg.bin === "object")
- for (const key in pkg.bin)
- rules.push('!' + pkg.bin[key])
- else
- rules.push('!' + pkg.bin)
+ if (pkg.bin) {
+ // always an object, because normalized already
+ for (const key in pkg.bin)
+ rules.push('!' + pkg.bin[key])
+ }
const data = rules.filter(f => f).join('\n') + '\n'
super.onReadIgnoreFile(packageNecessaryRules, data, _=>_)
@@ -216,7 +217,7 @@ const npmWalker = Class => class Walker extends Class {
if (file === 'package.json')
try {
const ig = path.resolve(this.path, file)
- this.onPackageJson(ig, JSON.parse(data), then)
+ this.onPackageJson(ig, normalizePackageBin(JSON.parse(data)), then)
} catch (er) {
// ignore package.json files that are not json
then()
diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json
index a8fabfa7f..c022dcef6 100644
--- a/node_modules/npm-packlist/package.json
+++ b/node_modules/npm-packlist/package.json
@@ -1,29 +1,29 @@
{
- "_from": "npm-packlist@1.4.6",
- "_id": "npm-packlist@1.4.6",
+ "_from": "npm-packlist@1.4.7",
+ "_id": "npm-packlist@1.4.7",
"_inBundle": false,
- "_integrity": "sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg==",
+ "_integrity": "sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==",
"_location": "/npm-packlist",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "npm-packlist@1.4.6",
+ "raw": "npm-packlist@1.4.7",
"name": "npm-packlist",
"escapedName": "npm-packlist",
- "rawSpec": "1.4.6",
+ "rawSpec": "1.4.7",
"saveSpec": null,
- "fetchSpec": "1.4.6"
+ "fetchSpec": "1.4.7"
},
"_requiredBy": [
"#USER",
"/",
"/pacote"
],
- "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.6.tgz",
- "_shasum": "53ba3ed11f8523079f1457376dd379ee4ea42ff4",
- "_spec": "npm-packlist@1.4.6",
- "_where": "/Users/mperrotte/npminc/cli",
+ "_resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.7.tgz",
+ "_shasum": "9e954365a06b80b18111ea900945af4f88ed4848",
+ "_spec": "npm-packlist@1.4.7",
+ "_where": "/Users/isaacs/dev/npm/cli",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -54,6 +54,9 @@
"license": "ISC",
"main": "index.js",
"name": "npm-packlist",
+ "publishConfig": {
+ "tag": "legacy-v1"
+ },
"repository": {
"type": "git",
"url": "git+https://github.com/npm/npm-packlist.git"
@@ -68,5 +71,5 @@
"tap": {
"jobs": 1
},
- "version": "1.4.6"
+ "version": "1.4.7"
}