File tree Expand file tree Collapse file tree
node_modules/npm-packlist Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,10 +34,13 @@ const glob = require('glob')
3434const globify = pattern => pattern . split ( '\\' ) . join ( '/' )
3535
3636const readOutOfTreeIgnoreFiles = ( root , rel , result = '' ) => {
37- for ( const file of [ '.gitignore ' , '.npmignore ' ] ) {
37+ for ( const file of [ '.npmignore ' , '.gitignore ' ] ) {
3838 try {
3939 const ignoreContent = fs . readFileSync ( path . join ( root , file ) , { encoding : 'utf8' } )
4040 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
4144 } catch ( err ) {
4245 // we ignore ENOENT errors completely because we don't care if the file doesn't exist
4346 // but we throw everything else because failing to read a file that does exist is
Original file line number Diff line number Diff line change 11{
22 "name" : " npm-packlist" ,
3- "version" : " 5.1.0 " ,
3+ "version" : " 5.1.1 " ,
44 "description" : " Get a list of the files to add from a folder into an npm package" ,
55 "directories" : {
66 "test" : " test"
Original file line number Diff line number Diff line change 51415141 }
51425142 },
51435143 "node_modules/npm-packlist" : {
5144- "version" : " 5.1.0 " ,
5145- "resolved" : " https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.0 .tgz" ,
5146- "integrity" : " sha512-a04sqF6FbkyOAFA19AA0e94gS7Et5T2/IMj3VOT9nOF2RaRdVPQ1Q17Fb/HaDRFs+gbC7HOmhVZ29adpWgmDZg ==" ,
5144+ "version" : " 5.1.1 " ,
5145+ "resolved" : " https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.1 .tgz" ,
5146+ "integrity" : " sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw ==" ,
51475147 "inBundle" : true ,
51485148 "dependencies" : {
51495149 "glob" : " ^8.0.1" ,
You can’t perform that action at this time.
0 commit comments