Skip to content

Commit

Permalink
Merge pull request #236012 from The-Fiery-Fire/bun
Browse files Browse the repository at this point in the history
`bun.lock` as package manager lockfile
  • Loading branch information
aeschli authored Dec 20, 2024
2 parents b9084ed + 1e3788f commit eb66332
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions extensions/npm/src/preferred-pm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ async function isBunPreferred(pkgPath: string): Promise<PreferredProperties> {
return { isPreferred: true, hasLockfile: true };
}

if (await pathExists(path.join(pkgPath, 'bun.lock'))) {
return { isPreferred: true, hasLockfile: true };
}

return { isPreferred: false, hasLockfile: false };
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
}
}
}
Expand Down

0 comments on commit eb66332

Please sign in to comment.