Skip to content

Commit 32bdd68

Browse files
authored
deps: npm-packlist@7.0.2 (#5754)
1 parent b5fadd0 commit 32bdd68

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

node_modules/npm-packlist/lib/index.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,13 @@ class PackWalker extends IgnoreWalker {
294294

295295
// if we have a files array in our package, we need to pull rules from it
296296
if (files) {
297-
for (const file of files) {
297+
for (let file of files) {
298298
// invert the rule because these are things we want to include
299+
if (file.startsWith('/')) {
300+
file = file.slice(1)
301+
} else if (file.startsWith('./')) {
302+
file = file.slice(2)
303+
}
299304
const inverse = `!${file}`
300305
try {
301306
// if an entry in the files array is a specific file, then we need to include it as a
@@ -305,7 +310,7 @@ class PackWalker extends IgnoreWalker {
305310
// if we have a file and we know that, it's strictly required
306311
if (stat.isFile()) {
307312
strict.unshift(inverse)
308-
this.requiredFiles.push(file.startsWith('/') ? file.slice(1) : file)
313+
this.requiredFiles.push(file)
309314
} else if (stat.isDirectory()) {
310315
// otherwise, it's a default ignore, and since we got here we know it's not a pattern
311316
// so we include the directory contents

node_modules/npm-packlist/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "npm-packlist",
3-
"version": "7.0.1",
3+
"version": "7.0.2",
44
"description": "Get a list of the files to add from a folder into an npm package",
55
"directories": {
66
"test": "test"
@@ -18,7 +18,7 @@
1818
"devDependencies": {
1919
"@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0",
2020
"@npmcli/eslint-config": "^4.0.0",
21-
"@npmcli/template-oss": "4.5.1",
21+
"@npmcli/template-oss": "4.7.1",
2222
"mutate-fs": "^2.1.1",
2323
"tap": "^16.0.1"
2424
},
@@ -55,6 +55,6 @@
5555
},
5656
"templateOSS": {
5757
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
58-
"version": "4.5.1"
58+
"version": "4.7.1"
5959
}
6060
}

package-lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8334,9 +8334,9 @@
83348334
}
83358335
},
83368336
"node_modules/npm-packlist": {
8337-
"version": "7.0.1",
8338-
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.1.tgz",
8339-
"integrity": "sha512-XddbYutimy7hdmP7S1tHMjFwghn64lvgdnhYG0KLGFBWjEvMt1/jg95OR3vPNNCjkakHS+k4a//3XOO8JOGI2A==",
8337+
"version": "7.0.2",
8338+
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.2.tgz",
8339+
"integrity": "sha512-d2+7RMySjVXssww23rV5NuIq1NzGvM04OlI5kwnvtYKfFTAPVs6Zxmxns2HRtJEA1oNj7D/BbFXeVAOLmW3N3Q==",
83408340
"inBundle": true,
83418341
"dependencies": {
83428342
"ignore-walk": "^6.0.0"

0 commit comments

Comments
 (0)