feat: support Bun as package manager (--bun flag)#1251
Open
jericbas wants to merge 4 commits intomicrosoft:mainfrom
Open
feat: support Bun as package manager (--bun flag)#1251jericbas wants to merge 4 commits intomicrosoft:mainfrom
jericbas wants to merge 4 commits intomicrosoft:mainfrom
Conversation
- Add --bun and --no-bun CLI flags - Add detectBun() and getBunDependencies() functions - Update package.ts to handle useBun option - Bun auto-detected via bun.lock or bun.lockb files
- Update prepublish() to accept useBun parameter - Use 'bun' as tool when useBun is true - Import detectBun in package.ts
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using Bun (a fast JavaScript tool), vsce fails to package or publish extensions. The problem is in two places:
npm run vscode:prepublishWhat happens:
Solution
Add Bun support to vsce with new command line options:
--bun: Force vsce to use Bun--no-bun: Force vsce to use npm instead of Bunbun.lockfile existsThis makes vsce work with Bun projects without needing npm.
Changes Made
src/npm.tsdetectBun()to find Bun projects. AddgetBunDependencies()functionsrc/main.ts--bunand--no-bunoptions to CLIsrc/package.tsuseBunoption. Update prepublish to usebun runsrc/publish.tsuseBunto publish optionssrc/test/package.test.tsHow to Test
All npm and yarn features still work the same as before.