Skip to content

Commit

Permalink
feat: npm-shrinkwrap.json files can now be ignored (#131)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: if npm-shrinkwrap.json is included in your .npmignore,
the shrinkwrap will now be excluded from your packlist.
  • Loading branch information
fritzy committed Oct 3, 2022
1 parent 4baf411 commit 5e80968
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion lib/index.js
Expand Up @@ -285,7 +285,6 @@ class PackWalker extends IgnoreWalker {
const strict = [
...strictDefaults,
'!/package.json',
'!/npm-shrinkwrap.json',
'/.git',
'/node_modules',
'/package-lock.json',
Expand Down
@@ -1,4 +1,4 @@
// cannot exclude npm-shrinkwrap.json in the root
// can exclude npm-shrinkwrap.json in the root
'use strict'

const Arborist = require('@npmcli/arborist')
Expand All @@ -19,7 +19,6 @@ t.test('package with negated files', async (t) => {
const files = await packlist(tree)
t.same(files, [
'.npmignore',
'npm-shrinkwrap.json',
'package.json',
])
})
1 change: 0 additions & 1 deletion test/package-json.js
Expand Up @@ -52,7 +52,6 @@ t.test('follows npm package ignoring rules', async (t) => {
t.same(files, [
'deps/foo/config/config.gypi',
'elf.js',
'npm-shrinkwrap.json',
'package.json',
])
})

0 comments on commit 5e80968

Please sign in to comment.