Skip to content

Commit eca05a3

Browse files
authored
feat: update detect_package_manager to look for new Bun lockfile (#530)
Bun is in the process of switching from the binary `bun.lockb` file to a new, text-based `bun.lock` file. As of Bun 1.2, the new text-based lockfile is the default. We need to update the `detect_package_manager` to look for both lockfile formats, but we should be able to eventually retire the binary lockfile format. More info: https://bun.sh/docs/install/lockfile#text-based-lockfile
1 parent 98d3d5f commit eca05a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vite_ruby/lib/vite_ruby/config.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def coerce_booleans(config, *names)
108108
def detect_package_manager(root)
109109
return "npm" if root.join("package-lock.json").exist?
110110
return "pnpm" if root.join("pnpm-lock.yaml").exist?
111-
return "bun" if root.join("bun.lockb").exist?
111+
return "bun" if root.join("bun.lockb").exist? || root.join("bun.lock").exist?
112112
return "yarn" if root.join("yarn.lock").exist?
113113

114114
"npm"

0 commit comments

Comments
 (0)