Skip to content

Commit 5e80968

Browse files
authored
feat: npm-shrinkwrap.json files can now be ignored (#131)
BREAKING CHANGE: if npm-shrinkwrap.json is included in your .npmignore, the shrinkwrap will now be excluded from your packlist.
1 parent 4baf411 commit 5e80968

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

lib/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ class PackWalker extends IgnoreWalker {
285285
const strict = [
286286
...strictDefaults,
287287
'!/package.json',
288-
'!/npm-shrinkwrap.json',
289288
'/.git',
290289
'/node_modules',
291290
'/package-lock.json',
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// cannot exclude npm-shrinkwrap.json in the root
1+
// can exclude npm-shrinkwrap.json in the root
22
'use strict'
33

44
const Arborist = require('@npmcli/arborist')
@@ -19,7 +19,6 @@ t.test('package with negated files', async (t) => {
1919
const files = await packlist(tree)
2020
t.same(files, [
2121
'.npmignore',
22-
'npm-shrinkwrap.json',
2322
'package.json',
2423
])
2524
})

test/package-json.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ t.test('follows npm package ignoring rules', async (t) => {
5252
t.same(files, [
5353
'deps/foo/config/config.gypi',
5454
'elf.js',
55-
'npm-shrinkwrap.json',
5655
'package.json',
5756
])
5857
})

0 commit comments

Comments
 (0)