mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #139] [MERGED] fix(init): detect Bun and invoking package manager reliably #341
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/139
Author: @liuxiaopai-ai
Created: 2/26/2026
Status: ✅ Merged
Merged: 3/3/2026
Merged by: @southpolesteve
Base:
main← Head:fix/issue-109-package-manager-detection📝 Commits (2)
e20e62bfix(init): detect bun and invoking package manager reliably5e0790brefactor: address review feedback on detectPackageManagerName📊 Changes
2 files changed (+121 additions, -16 deletions)
View changed files
📝
packages/vinext/src/utils/project.ts(+69 -15)📝
tests/init.test.ts(+52 -1)📄 Description
Summary
Fixes package manager detection for
vinext init/ deploy dependency installs when lock files are missing or Bun is used.What changed
bun.lockb(legacy)bun.lock(current)package.json#packageManagerwhen no lockfile exists.npm_config_user_agentas a final hint (e.g.bun x vinext init,pnpm dlx vinext init).detectPackageManagerName()indetectPackageManager()to keep behavior consistent.Why
Issue #109 reports that running
bun x vinext initstill installs deps via npm. This happened because detection only checked lock files and only recognizedbun.lockb.Fixes #109
Test plan
pnpm -s test tests/init.test.tspnpm -s test tests/deploy.test.tsNew coverage (init tests)
bun.lockexistspackageManagerfrom package.json when lockfiles are missingnpm_config_user_agent🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.