npm-packlist 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -5
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -298,6 +298,7 @@ class PackWalker extends IgnoreWalker {
|
|
|
298
298
|
'!/package.json',
|
|
299
299
|
'/.git',
|
|
300
300
|
'/node_modules',
|
|
301
|
+
'.npmrc',
|
|
301
302
|
'/package-lock.json',
|
|
302
303
|
'/yarn.lock',
|
|
303
304
|
'/pnpm-lock.yaml',
|
|
@@ -307,12 +308,10 @@ class PackWalker extends IgnoreWalker {
|
|
|
307
308
|
if (files) {
|
|
308
309
|
for (let file of files) {
|
|
309
310
|
// invert the rule because these are things we want to include
|
|
310
|
-
if (file.startsWith('
|
|
311
|
+
if (file.startsWith('./')) {
|
|
311
312
|
file = file.slice(1)
|
|
312
|
-
} else if (file.startsWith('./')) {
|
|
313
|
-
file = file.slice(2)
|
|
314
313
|
} else if (file.endsWith('/*')) {
|
|
315
|
-
file = file.slice(0, -
|
|
314
|
+
file = file.slice(0, -1)
|
|
316
315
|
}
|
|
317
316
|
const inverse = `!${file}`
|
|
318
317
|
|
|
@@ -326,7 +325,7 @@ class PackWalker extends IgnoreWalker {
|
|
|
326
325
|
// if we have a file and we know that, it's strictly required
|
|
327
326
|
if (stat.isFile()) {
|
|
328
327
|
strict.unshift(inverse)
|
|
329
|
-
this.requiredFiles.push(file)
|
|
328
|
+
this.requiredFiles.push(file.startsWith('/') ? file.slice(1) : file)
|
|
330
329
|
} else if (stat.isDirectory()) {
|
|
331
330
|
// otherwise, it's a default ignore, and since we got here we know it's not a pattern
|
|
332
331
|
// so we include the directory contents
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-packlist",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Get a list of the files to add from a folder into an npm package",
|
|
5
5
|
"directories": {
|
|
6
6
|
"test": "test"
|
|
7
7
|
},
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"ignore-walk": "^6.0.
|
|
10
|
+
"ignore-walk": "^6.0.4"
|
|
11
11
|
},
|
|
12
12
|
"author": "GitHub Inc.",
|
|
13
13
|
"license": "ISC",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@npmcli/arborist": "^6.0.0 || ^6.0.0-pre.0",
|
|
20
20
|
"@npmcli/eslint-config": "^4.0.0",
|
|
21
|
-
"@npmcli/template-oss": "4.
|
|
21
|
+
"@npmcli/template-oss": "4.21.2",
|
|
22
22
|
"mutate-fs": "^2.1.1",
|
|
23
23
|
"tap": "^16.0.1"
|
|
24
24
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"snap": "tap",
|
|
29
29
|
"postsnap": "npm run lintfix --",
|
|
30
30
|
"eslint": "eslint",
|
|
31
|
-
"lint": "eslint \"**/*.js\"",
|
|
31
|
+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
|
|
32
32
|
"lintfix": "npm run lint -- --fix",
|
|
33
33
|
"npmclilint": "npmcli-lint",
|
|
34
34
|
"postlint": "template-oss-check",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"templateOSS": {
|
|
57
57
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
58
|
-
"version": "4.
|
|
58
|
+
"version": "4.21.2",
|
|
59
59
|
"publish": true
|
|
60
60
|
}
|
|
61
61
|
}
|