diff --git a/node_modules/npm-packlist/index.js b/node_modules/npm-packlist/index.js index cf87b18528b01..8f62983e6f6c0 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 6f60521059a04..1276b48413699 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", diff --git a/package-lock.json b/package-lock.json index 4b6a60b06b212..23d9a48713cb0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5630,9 +5630,9 @@ } }, "node_modules/npm-packlist": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.1.4.tgz", - "integrity": "sha512-Qzg2pvXC9U4I4fLnUrBmcIT4x0woLtUgxUi9eC+Zrcv1Xx5eamytGAfbDWQ67j7xOcQ2VW1I3su9smVTIdu7Hw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.1.5.tgz", + "integrity": "sha512-KCfK3Vi2F+PH1klYauoQzg81GQ8/GGjQRKYY6tRnpQUPKTs/1gBZSRWtTEd7jGdSn1LZL7gpAmJT+BcS55k2XQ==", "inBundle": true, "dependencies": { "glob": "^7.1.6", @@ -14655,9 +14655,9 @@ } }, "npm-packlist": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.1.4.tgz", - "integrity": "sha512-Qzg2pvXC9U4I4fLnUrBmcIT4x0woLtUgxUi9eC+Zrcv1Xx5eamytGAfbDWQ67j7xOcQ2VW1I3su9smVTIdu7Hw==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-2.1.5.tgz", + "integrity": "sha512-KCfK3Vi2F+PH1klYauoQzg81GQ8/GGjQRKYY6tRnpQUPKTs/1gBZSRWtTEd7jGdSn1LZL7gpAmJT+BcS55k2XQ==", "requires": { "glob": "^7.1.6", "ignore-walk": "^3.0.3",