If the package manager is bun and the command is build generate 'bun run
build' as the command to invoke the build script instead of the built-in
'bun build' command.
Fixes #614
expect(getCommand('pnpm', 'dev')).toBe('pnpm dev')
expect(getCommand('pnpm', 'build')).toBe('pnpm build')
})
+ it('should generate the correct command for bun', () => {
+ expect(getCommand('bun', 'install')).toBe('bun install')
+ expect(getCommand('bun', 'dev')).toBe('bun dev')
+ expect(getCommand('bun', 'build')).toBe('bun run build')
+ })
})
if (scriptName === 'install') {
return packageManager === 'yarn' ? 'yarn' : `${packageManager} install`
}
+ if (scriptName === 'build') {
+ return packageManager === 'npm' || packageManager === 'bun'
+ ? `${packageManager} run build`
+ : `${packageManager} build`
+ }
if (args) {
return packageManager === 'npm'