npm-packlist
Advanced tools
Comparing version 5.1.0 to 5.1.1
@@ -37,6 +37,9 @@ 'use strict' | ||
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) { | ||
@@ -43,0 +46,0 @@ // we ignore ENOENT errors completely because we don't care if the file doesn't exist |
{ | ||
"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", | ||
@@ -5,0 +5,0 @@ "directories": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26489
478