mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
feat/#55 bun support (#56)
* add support for bun package manager * update readme
This commit is contained in:
@@ -27,6 +27,13 @@ func DefaultPnpmPackageManagerConfig() NpmPackageManagerConfig {
|
||||
}
|
||||
}
|
||||
|
||||
func DefaultBunPackageManagerConfig() NpmPackageManagerConfig {
|
||||
return NpmPackageManagerConfig{
|
||||
InstallCommands: []string{"install", "i", "add"},
|
||||
CommandName: "bun",
|
||||
}
|
||||
}
|
||||
|
||||
type npmPackageManager struct {
|
||||
Config NpmPackageManagerConfig
|
||||
}
|
||||
@@ -48,7 +55,7 @@ func (npm *npmPackageManager) Ecosystem() packagev1.Ecosystem {
|
||||
}
|
||||
|
||||
func (npm *npmPackageManager) ParseCommand(args []string) (*ParsedCommand, error) {
|
||||
if len(args) > 0 && (args[0] == "npm" || args[0] == "pnpm") {
|
||||
if len(args) > 0 && (args[0] == "npm" || args[0] == "pnpm" || args[0] == "bun") {
|
||||
args = args[1:]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user