From e05542e6c970af7203d1a94e77fdec595d8c4023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=B6=E5=90=8D?= Date: Fri, 22 May 2026 10:27:28 +0800 Subject: [PATCH] fix: detect bun.lock (Bun v1.2+ text lockfile) in diff-scope CONFIG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gstack-diff-scope only matched the legacy binary lockfile `bun.lockb` but not the newer text-based `bun.lock` introduced in Bun v1.2+. Projects using current Bun versions were silently missing the SCOPE_CONFIG signal when only the lockfile changed. 🤖 Generated with [Qoder][https://qoder.com] --- bin/gstack-diff-scope | 2 +- test/diff-scope.test.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/gstack-diff-scope b/bin/gstack-diff-scope index 2cff90c70f..36918381ce 100755 --- a/bin/gstack-diff-scope +++ b/bin/gstack-diff-scope @@ -57,7 +57,7 @@ while IFS= read -r f; do *.md) DOCS=true ;; # Config - package.json|package-lock.json|yarn.lock|bun.lockb) CONFIG=true ;; + package.json|package-lock.json|yarn.lock|bun.lock|bun.lockb) CONFIG=true ;; Gemfile|Gemfile.lock) CONFIG=true ;; *.yml|*.yaml) CONFIG=true ;; .github/*) CONFIG=true ;; diff --git a/test/diff-scope.test.ts b/test/diff-scope.test.ts index 44cfe03f3b..2130a3e570 100644 --- a/test/diff-scope.test.ts +++ b/test/diff-scope.test.ts @@ -140,6 +140,12 @@ describe('gstack-diff-scope', () => { expect(scope.SCOPE_AUTH).toBe('true'); }); + test('detects config via bun.lock (Bun v1.2+ text lockfile)', () => { + const dir = createRepo(['bun.lock']); + const scope = runScope(dir); + expect(scope.SCOPE_CONFIG).toBe('true'); + }); + test('returns false for all new signals when no matching files', () => { const dir = createRepo(['docs/readme.md', 'config.yml']); const scope = runScope(dir);