Skip to content

Commit

Permalink
feat: prefer bun over npm when available
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Dec 16, 2023
1 parent 88ede83 commit d0faf60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extension/asset_platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ func getInstallCommand(path string) *exec.Cmd {
return exec.Command("bun", "install")
}

// Bun can migrate on the fly the package-lock.json to a bun.lockdb and is much faster than NPM
if _, err := exec.LookPath("bun"); err == nil {
return exec.Command("bun", "install", "--no-save")
}

return exec.Command("npm", "install", "--no-audit", "--no-fund", "--prefer-offline")
}

Expand Down

0 comments on commit d0faf60

Please sign in to comment.