From 1e3788f49f234bc37296ce3c5c7b1645605cec08 Mon Sep 17 00:00:00 2001 From: Michael H Date: Fri, 13 Dec 2024 13:29:39 +1100 Subject: [PATCH] bun.lock --- extensions/npm/src/preferred-pm.ts | 4 ++++ src/vs/workbench/contrib/files/browser/files.contribution.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/npm/src/preferred-pm.ts b/extensions/npm/src/preferred-pm.ts index c85b65b6ea35e..452319671eaf7 100644 --- a/extensions/npm/src/preferred-pm.ts +++ b/extensions/npm/src/preferred-pm.ts @@ -28,6 +28,10 @@ async function isBunPreferred(pkgPath: string): Promise { return { isPreferred: true, hasLockfile: true }; } + if (await pathExists(path.join(pkgPath, 'bun.lock'))) { + return { isPreferred: true, hasLockfile: true }; + } + return { isPreferred: false, hasLockfile: false }; } diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts index 266995ddc6d2d..689be82dc1664 100644 --- a/src/vs/workbench/contrib/files/browser/files.contribution.ts +++ b/src/vs/workbench/contrib/files/browser/files.contribution.ts @@ -619,7 +619,7 @@ configurationRegistry.registerConfiguration({ '*.jsx': '${capture}.js', '*.tsx': '${capture}.ts', 'tsconfig.json': 'tsconfig.*.json', - 'package.json': 'package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb', + 'package.json': 'package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock', } } }