Skip to content

Commit cac2b77

Browse files
authored
Merge pull request #61 from selemondev/chore/bun-lock-files-comp
chore: add bun lock files backward compatibility
2 parents a1d7910 + 3d3b61d commit cac2b77

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to the "vscode-shadcn-svelte" extension will be documented i
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## v0.5.3
8+
9+
[compare changes](https://github.com/selemondev/vscode-shadcn-svelte/compare/v0.5.2...v0.5.3)
10+
11+
### 💅 Refactors
12+
13+
- # 58 refactor bun's lockfile name from bun.lockb to bun.lock ([c2bdc36](https://github.com/selemondev/vscode-shadcn-svelte/commit/c2bdc36))
14+
15+
### 🏡 Chore
16+
17+
- **release:** V0.5.2 ([13dfe29](https://github.com/selemondev/vscode-shadcn-svelte/commit/13dfe29))
18+
- Add deployment scripts ([c845c47](https://github.com/selemondev/vscode-shadcn-svelte/commit/c845c47))
19+
20+
### ❤️ Contributors
21+
22+
- Selemondev <selemondev19@gmail.com>
23+
724
## v0.5.2
825

926
[compare changes](https://github.com/selemondev/vscode-shadcn-svelte/compare/v0.5.1...v0.5.2)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vscode-shadcn-svelte",
3-
"version": "0.5.2",
3+
"version": "0.5.3",
44
"license": "MIT",
55
"displayName": "shadcn/svelte",
66
"description": "Integrate components and snippets from Shadcn/Svelte directly into your IDE ✨.",

src/utils/vscode.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ export const getFileStat = async (fileName: string) => {
3333
};
3434

3535
export const detectPackageManager = async (): Promise<PackageManager> => {
36-
const bunLockExists = await getFileStat("bun.lock");
37-
if (bunLockExists) {
38-
return "bun";
36+
const [bunLockExists, bunLockBExists] = await Promise.all([
37+
getFileStat("bun.lock").then(() => true).catch(() => false),
38+
getFileStat("bun.lockb").then(() => true).catch(() => false),
39+
]);
40+
if (bunLockExists || bunLockBExists) {
41+
return 'bun';
3942
}
4043

4144
const pnpmLockExists = await getFileStat("pnpm-lock.yaml");

0 commit comments

Comments
 (0)