Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add support for Bun package manager #1108

Open
coolcline opened this issue Jan 2, 2025 · 0 comments
Open

Feature Request: Add support for Bun package manager #1108

coolcline opened this issue Jan 2, 2025 · 0 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@coolcline
Copy link

Is your feature request related to a problem? Please describe.
Currently, vsce hardcodes the use of npm for running prepublish scripts (npm run vscode:prepublish). This causes issues when using alternative package managers like Bun, as the command fails with "npm: command not found" even when the project is properly configured to use Bun.

Describe the solution you'd like
I propose adding support for different package managers, specifically Bun, in the following ways:

  1. Auto-detect the package manager being used in the project (by checking for bun.lockb, package-lock.json, yarn.lock, etc.)
  2. Add a configuration option to explicitly specify which package manager to use (e.g., --package-manager=bun)
  3. Use the detected/specified package manager when running scripts instead of hardcoding npm

Describe alternatives you've considered
Current workarounds include:

  • Installing npm alongside Bun (not ideal, adds unnecessary dependencies)
  • Using the --no-dependencies flag (doesn't work as the npm command is still hardcoded)

Additional context
Bun is gaining popularity as a fast, all-in-one JavaScript runtime and package manager. Supporting it would improve the developer experience for teams using Bun in their VS Code extension projects.

Example of a project using Bun:

json
{
    "scripts": {
    "vscode:prepublish": "bun run package",
    "package": "bun run build:webview && bun run check-types && bun run lint"
    }
}

Environment:

  • vsce version: 2.15.0
  • OS: macOS
  • Package Manager: Bun 1.1.42
@benibenj benibenj self-assigned this Jan 3, 2025
@benibenj benibenj added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

2 participants