npm-packlist
Advanced tools
Comparing version 7.0.1 to 7.0.2
@@ -297,4 +297,9 @@ 'use strict' | ||
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}` | ||
@@ -309,3 +314,3 @@ try { | ||
strict.unshift(inverse) | ||
this.requiredFiles.push(file.startsWith('/') ? file.slice(1) : file) | ||
this.requiredFiles.push(file) | ||
} else if (stat.isDirectory()) { | ||
@@ -312,0 +317,0 @@ // otherwise, it's a default ignore, and since we got here we know it's not a pattern |
{ | ||
"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", | ||
@@ -21,3 +21,3 @@ "directories": { | ||
"@npmcli/eslint-config": "^4.0.0", | ||
"@npmcli/template-oss": "4.5.1", | ||
"@npmcli/template-oss": "4.7.1", | ||
"mutate-fs": "^2.1.1", | ||
@@ -59,4 +59,4 @@ "tap": "^16.0.1" | ||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", | ||
"version": "4.5.1" | ||
"version": "4.7.1" | ||
} | ||
} |
21828
394