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

Add bun support for ace add #4607

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Add extends BaseCommand {
declare verbose?: boolean

@flags.string({ description: 'Select the package manager you want to use' })
declare packageManager?: 'npm' | 'pnpm' | 'yarn' | 'yarn@berry'
declare packageManager?: 'npm' | 'pnpm' | 'bun' | 'yarn' | 'yarn@berry'

@flags.boolean({ description: 'Should we install the package as a dev dependency', alias: 'D' })
declare dev?: boolean
Expand All @@ -46,10 +46,10 @@ export default class Add extends BaseCommand {
this.packageManager || (await detectPackageManager(this.app.makePath())) || 'npm'

if (['npm', 'pnpm', 'yarn', 'yarn@berry'].includes(pkgManager)) {
return pkgManager as 'npm' | 'pnpm' | 'yarn' | 'yarn@berry'
return pkgManager as 'npm' | 'pnpm' | 'bun' | 'yarn' | 'yarn@berry'
}

throw new Error('Invalid package manager. Must be one of npm, pnpm or yarn')
throw new Error('Invalid package manager. Must be one of npm, pnpm, bun or yarn')
}

/**
Expand Down
Loading