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:
authorRuy Adorno <ruyadorno@hotmail.com>2021-03-29 21:40:33 +0300
committerRuy Adorno <ruyadorno@hotmail.com>2021-03-29 21:47:48 +0300
commit03734c29e00191d17f164d1c0e75d9f228268842 (patch)
tree337dcf29099130ca5f73216f228ab89eaac0408e /node_modules
parent4cd66972c1e1be67b2f1dd22e6d9be46e28569f3 (diff)
npm-packlist@2.1.5
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/npm-packlist/index.js9
-rw-r--r--node_modules/npm-packlist/package.json4
2 files changed, 10 insertions, 3 deletions
diff --git a/node_modules/npm-packlist/index.js b/node_modules/npm-packlist/index.js
index cf87b1852..8f62983e6 100644
--- a/node_modules/npm-packlist/index.js
+++ b/node_modules/npm-packlist/index.js
@@ -182,6 +182,13 @@ const npmWalker = Class => class Walker extends Class {
getPackageFiles (entries, pkg) {
try {
+ // XXX this could be changed to use read-package-json-fast
+ // which handles the normalizing of bins for us, and simplifies
+ // the test for bundleDependencies and bundledDependencies later.
+ // HOWEVER if we do this, we need to be sure that we're careful
+ // about what we write back out since rpj-fast removes some fields
+ // that the user likely wants to keep. it also would add a second
+ // file read that we would want to optimize away.
pkg = normalizePackageBin(JSON.parse(pkg.toString()))
} catch (er) {
// not actually a valid package.json
@@ -202,7 +209,7 @@ const npmWalker = Class => class Walker extends Class {
// the files list as the effective readdir result, that means it
// looks like we don't have a node_modules folder at all unless we
// include it here.
- if (pkg.bundleDependencies && entries.includes('node_modules'))
+ if ((pkg.bundleDependencies || pkg.bundledDependencies) && entries.includes('node_modules'))
pkg.files.push('node_modules')
const patterns = Array.from(new Set(pkg.files)).reduce((set, pattern) => {
diff --git a/node_modules/npm-packlist/package.json b/node_modules/npm-packlist/package.json
index 6f6052105..1276b4841 100644
--- a/node_modules/npm-packlist/package.json
+++ b/node_modules/npm-packlist/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
- "version": "2.1.4",
+ "version": "2.1.5",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
@@ -20,7 +20,7 @@
"devDependencies": {
"mutate-fs": "^2.1.1",
"require-inject": "^1.4.4",
- "tap": "^14.10.7"
+ "tap": "^14.10.8"
},
"scripts": {
"test": "tap",