Skip to content

Commit

Permalink
deps: npm-packlist@5.1.1 (#5103)
Browse files Browse the repository at this point in the history
* correctly ignore .gitignore when a .npmignore is present
  • Loading branch information
wraithgar committed Jun 29, 2022
1 parent c7d5a69 commit 7ce66b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion node_modules/npm-packlist/lib/index.js
Expand Up @@ -34,10 +34,13 @@ const glob = require('glob')
const globify = pattern => pattern.split('\\').join('/')

const readOutOfTreeIgnoreFiles = (root, rel, result = '') => {
for (const file of ['.gitignore', '.npmignore']) {
for (const file of ['.npmignore', '.gitignore']) {
try {
const ignoreContent = fs.readFileSync(path.join(root, file), { encoding: 'utf8' })
result += ignoreContent + '\n'
// break the loop immediately after concatting, this allows us to prioritize the
// .npmignore and discard the .gitignore if one exists
break
} catch (err) {
// we ignore ENOENT errors completely because we don't care if the file doesn't exist
// but we throw everything else because failing to read a file that does exist is
Expand Down
2 changes: 1 addition & 1 deletion node_modules/npm-packlist/package.json
@@ -1,6 +1,6 @@
{
"name": "npm-packlist",
"version": "5.1.0",
"version": "5.1.1",
"description": "Get a list of the files to add from a folder into an npm package",
"directories": {
"test": "test"
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json
Expand Up @@ -5141,9 +5141,9 @@
}
},
"node_modules/npm-packlist": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.0.tgz",
"integrity": "sha512-a04sqF6FbkyOAFA19AA0e94gS7Et5T2/IMj3VOT9nOF2RaRdVPQ1Q17Fb/HaDRFs+gbC7HOmhVZ29adpWgmDZg==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.1.tgz",
"integrity": "sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw==",
"inBundle": true,
"dependencies": {
"glob": "^8.0.1",
Expand Down

0 comments on commit 7ce66b0

Please sign in to comment.