Skip to content

Commit 2ba13b4

Browse files
committed
fix(cli): force bun for bun-only node templates
1 parent 09a743b commit 2ba13b4

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

.changeset/calm-trains-bow.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"create-stk": patch
3+
---
4+
5+
Fix package manager behavior for Bun-only Node.js templates.
6+
7+
- Force `bun` as the package manager for `node-serverless-playwright` and `node-elysia`.
8+
- Ignore `--pm` overrides for those Bun-only templates.
9+
- Run `bun install` for Serverless + Playwright scaffolds.
10+
- Show `bun run dev` as the startup command for Serverless + Playwright.

apps/cli/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export async function resolvePlan(cli: CliOptions): Promise<CliPlan> {
217217
} else {
218218
packageManager = cli.packageManager ?? (pkName as PackageManager);
219219
}
220-
if (projectType === 'node-elysia') {
220+
if (projectType === 'node-elysia' || projectType === 'node-serverless-playwright') {
221221
packageManager = 'bun';
222222
}
223223

apps/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function getDevCommand(projectType: string, packageManager: string): string {
2323
return 'cargo run';
2424
}
2525
if (projectType === 'node-serverless-playwright') {
26-
return 'pnpm dev';
26+
return 'bun run dev';
2727
}
2828
if (projectType === 'node-elysia') {
2929
return 'bun run dev';

apps/cli/src/templates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,12 @@ export async function installDependencies(targetDir: string, packageManager: Pac
416416

417417
if (projectType === 'node-serverless-playwright') {
418418
const ok = await runBestEffort(
419-
'pnpm',
419+
'bun',
420420
['install'],
421421
{ cwd: targetDir, stdio: ['ignore', 'ignore', 'pipe'], windowsHide: true },
422422
'Serverless + Playwright dependency install'
423423
);
424-
s.stop(ok ? 'Installed via pnpm' : 'Installed via pnpm (with warnings)');
424+
s.stop(ok ? 'Installed via bun' : 'Installed via bun (with warnings)');
425425
return;
426426
}
427427
if (projectType === 'node-elysia') {

0 commit comments

Comments
 (0)