Skip to content

Commit 6e6c912

Browse files
committed
Fix Bun Astro init scripts
Generated Astro projects for Bun now use `bunx --bun` for the `dev` and `build` scripts so Astro runs under Bun instead of falling back to Node.js. This updates the `@fedify/init` regression test alongside the Astro example, package documentation, and changelog so the Bun workflow stays consistent across generated projects and docs. Assisted-by: Codex:gpt-5.4
1 parent d2767cc commit 6e6c912

6 files changed

Lines changed: 17 additions & 10 deletions

File tree

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Version 2.1.8
88

99
To be released.
1010

11+
### @fedify/init
12+
13+
- Fixed `fedify init -w astro -p bun` generating *package.json* `scripts`
14+
that invoked Astro through Node.js. Bun + Astro projects now use
15+
`bunx --bun astro dev` and `bunx --bun astro build`, so the generated
16+
development workflow runs on systems that only have Bun installed.
17+
1118
### @fedify/next
1219

1320
- Widened `@fedify/next`'s supported Next.js peer dependency range to

examples/astro/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ Then update *package.json* scripts to use Bun's SSR entry point after build:
292292
~~~~ json
293293
{
294294
"scripts": {
295-
"dev": "bunx astro dev",
296-
"build": "bunx astro build",
295+
"dev": "bunx --bun astro dev",
296+
"build": "bunx --bun astro build",
297297
"preview": "bun ./dist/server/entry.mjs"
298298
}
299299
}

examples/astro/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"dev": "astro dev --config astro.config.node.ts",
88
"build": "astro build --config astro.config.node.ts",
99
"preview": "astro preview --config astro.config.node.ts",
10-
"dev:bun": "bunx astro dev --config astro.config.bun.ts",
11-
"build:bun": "bunx astro build --config astro.config.bun.ts",
10+
"dev:bun": "bunx --bun astro dev --config astro.config.bun.ts",
11+
"build:bun": "bunx --bun astro build --config astro.config.bun.ts",
1212
"preview:bun": "bun ./dist/server/entry.mjs"
1313
},
1414
"dependencies": {

packages/astro/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ point after building for preview or production:
105105
~~~~ json
106106
{
107107
"scripts": {
108-
"dev": "bunx astro dev",
109-
"build": "bunx astro build",
108+
"dev": "bunx --bun astro dev",
109+
"build": "bunx --bun astro build",
110110
"preview": "bun ./dist/server/entry.mjs"
111111
}
112112
}

packages/init/src/package.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ test(
6262

6363
strictEqual(dependencies["@nurodev/astro-bun"], "^2.1.2");
6464
strictEqual(dependencies["@fedify/astro"], packageJson.version);
65-
strictEqual(tasks.dev, "bunx astro dev");
66-
strictEqual(tasks.build, "bunx astro build");
65+
strictEqual(tasks.dev, "bunx --bun astro dev");
66+
strictEqual(tasks.build, "bunx --bun astro build");
6767
strictEqual(tasks.preview, "bun ./dist/server/entry.mjs");
6868
match(
6969
files["astro.config.ts"],

packages/init/src/webframeworks/astro.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ const astroDescription: WebFrameworkDescription = {
5757
}
5858
: pm === "bun"
5959
? {
60-
dev: "bunx astro dev",
61-
build: "bunx astro build",
60+
dev: "bunx --bun astro dev",
61+
build: "bunx --bun astro build",
6262
preview: "bun ./dist/server/entry.mjs",
6363
}
6464
: {

0 commit comments

Comments
 (0)