Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions node_modules/npm-packlist/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,13 @@ class PackWalker extends IgnoreWalker {

// if we have a files array in our package, we need to pull rules from it
if (files) {
for (const file of files) {
for (let file of files) {
// invert the rule because these are things we want to include
if (file.startsWith('/')) {
file = file.slice(1)
} else if (file.startsWith('./')) {
file = file.slice(2)
}
const inverse = `!${file}`
try {
// if an entry in the files array is a specific file, then we need to include it as a
Expand All @@ -305,7 +310,7 @@ class PackWalker extends IgnoreWalker {
// if we have a file and we know that, it's strictly required
if (stat.isFile()) {
strict.unshift(inverse)
this.requiredFiles.push(file.startsWith('/') ? file.slice(1) : file)
this.requiredFiles.push(file)
} else if (stat.isDirectory()) {
// otherwise, it's a default ignore, and since we got here we know it's not a pattern
// so we include the directory contents
Expand Down
6 changes: 3 additions & 3 deletions node_modules/npm-packlist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
"version": "7.0.1",
"version": "7.0.2",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
Expand All @@ -18,7 +18,7 @@
"devDependencies": {
"@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.5.1",
"@npmcli/template-oss": "4.7.1",
"mutate-fs": "^2.1.1",
"tap": "^16.0.1"
},
Expand Down Expand Up @@ -55,6 +55,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.5.1"
"version": "4.7.1"
}
}
6 changes: 3 additions & 3 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8334,9 +8334,9 @@
}
},
"node_modules/npm-packlist": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.1.tgz",
"integrity": "sha512-XddbYutimy7hdmP7S1tHMjFwghn64lvgdnhYG0KLGFBWjEvMt1/jg95OR3vPNNCjkakHS+k4a//3XOO8JOGI2A==",
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.2.tgz",
"integrity": "sha512-d2+7RMySjVXssww23rV5NuIq1NzGvM04OlI5kwnvtYKfFTAPVs6Zxmxns2HRtJEA1oNj7D/BbFXeVAOLmW3N3Q==",
"inBundle": true,
"dependencies": {
"ignore-walk": "^6.0.0"
Expand Down