Skip to content

Commit

Permalink
feat: add bun.lockb to ignorelist
Browse files Browse the repository at this point in the history
relates npm#48
  • Loading branch information
antongolub committed May 1, 2023
1 parent 5134994 commit c8b4bfa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ class PackWalker extends IgnoreWalker {
'/package-lock.json',
'/yarn.lock',
'/pnpm-lock.yaml',
'/bun.lockb',
]

// if we have a files array in our package, we need to pull rules from it
Expand Down
9 changes: 9 additions & 0 deletions test/nested-lock-and-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ const pkg = t.testdir({
lock: 'file',
include: false,
}),
'bun.lockb': JSON.stringify({
lock: 'file',
include: false,
}),
lib: {
core: 'no longer excluded dump file',
'package-lock.json': JSON.stringify({
Expand All @@ -27,6 +31,10 @@ const pkg = t.testdir({
lock: 'file',
include: true,
}),
'bun.lockb': JSON.stringify({
lock: 'file',
include: true,
}),
},
core: {
'include-me.txt': 'please include me',
Expand All @@ -42,6 +50,7 @@ t.test('follows npm package ignoring rules', async (t) => {
'lib/package-lock.json',
'package.json',
'lib/yarn.lock',
'lib/bun.lockb',
'core/include-me.txt',
])
})

0 comments on commit c8b4bfa

Please sign in to comment.