npm-packlist 5.1.0 → 5.1.3
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 -1
- package/package.json +5 -5
package/lib/index.js
CHANGED
|
@@ -34,10 +34,13 @@ const glob = require('glob')
|
|
|
34
34
|
const globify = pattern => pattern.split('\\').join('/')
|
|
35
35
|
|
|
36
36
|
const readOutOfTreeIgnoreFiles = (root, rel, result = '') => {
|
|
37
|
-
for (const file of ['.
|
|
37
|
+
for (const file of ['.npmignore', '.gitignore']) {
|
|
38
38
|
try {
|
|
39
39
|
const ignoreContent = fs.readFileSync(path.join(root, file), { encoding: 'utf8' })
|
|
40
40
|
result += ignoreContent + '\n'
|
|
41
|
+
// break the loop immediately after concatting, this allows us to prioritize the
|
|
42
|
+
// .npmignore and discard the .gitignore if one exists
|
|
43
|
+
break
|
|
41
44
|
} catch (err) {
|
|
42
45
|
// we ignore ENOENT errors completely because we don't care if the file doesn't exist
|
|
43
46
|
// but we throw everything else because failing to read a file that does exist is
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-packlist",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.3",
|
|
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"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"glob": "^8.0.1",
|
|
11
11
|
"ignore-walk": "^5.0.1",
|
|
12
|
-
"npm-bundled": "^
|
|
13
|
-
"npm-normalize-package-bin": "^
|
|
12
|
+
"npm-bundled": "^2.0.0",
|
|
13
|
+
"npm-normalize-package-bin": "^2.0.0"
|
|
14
14
|
},
|
|
15
15
|
"author": "GitHub Inc.",
|
|
16
16
|
"license": "ISC",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@npmcli/eslint-config": "^3.0.1",
|
|
23
|
-
"@npmcli/template-oss": "3.
|
|
23
|
+
"@npmcli/template-oss": "3.6.0",
|
|
24
24
|
"mutate-fs": "^2.1.1",
|
|
25
25
|
"tap": "^16.0.1"
|
|
26
26
|
},
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
},
|
|
57
57
|
"templateOSS": {
|
|
58
58
|
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
59
|
-
"version": "3.
|
|
59
|
+
"version": "3.6.0"
|
|
60
60
|
}
|
|
61
61
|
}
|