From c8b4bfa83a88ae9822fef1ccaf1f7aa4d310e34f Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Mon, 1 May 2023 23:28:45 +0300 Subject: [PATCH] feat: add `bun.lockb` to ignorelist relates #48 --- lib/index.js | 1 + test/nested-lock-and-core.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/index.js b/lib/index.js index 887018b..e56e7cd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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 diff --git a/test/nested-lock-and-core.js b/test/nested-lock-and-core.js index c227f98..3eef350 100644 --- a/test/nested-lock-and-core.js +++ b/test/nested-lock-and-core.js @@ -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({ @@ -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', @@ -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', ]) })