From 75d2e73ef1485ea08d663a18ee2e697a4903e3c1 Mon Sep 17 00:00:00 2001 From: Palcimer Date: Sat, 18 Jul 2026 20:18:19 +0900 Subject: [PATCH 1/3] Run `format` before `format:check` in init hydration test validation `validateDevToolScripts` only ran `format:check` and `lint` after scaffolding a project, without auto-formatting it first. Since neither Fedify's own generated files nor most scaffolding CLI output exactly match the project's chosen formatter's style, `format:check` almost always failed for `npm`/`pnpm` package managers, causing the entire hydration test suite to fail regardless of the actual generated code. https://github.com/fedify-dev/fedify/issues/950 Assisted-by: Claude Code:claude-sonnet-5 --- packages/init/src/test/create.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/init/src/test/create.ts b/packages/init/src/test/create.ts index f966482fe..1a6532e1a 100644 --- a/packages/init/src/test/create.ts +++ b/packages/init/src/test/create.ts @@ -155,7 +155,7 @@ async function validateDevToolScripts( if (format.code !== 0) return false; } - for (const script of ["format:check", "lint"]) { + for (const script of ["format", "format:check", "lint"]) { const result = await $`${[packageManager, "run", script]}` .cwd(dir) .stdin("null") From df5f0f0b6566d6c840792a6c859bb32014c1e4b0 Mon Sep 17 00:00:00 2001 From: Palcimer Date: Sun, 19 Jul 2026 11:56:55 +0900 Subject: [PATCH 2/3] Remove now-redundant Astro-specific `format` step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `validateDevToolScripts` special-cased Astro to run `format` before `format:check`/`lint`, added in 5f108019 while fixing Astro 5-7 compatibility. Since the previous commit now runs `format` for every framework before `format:check`, this block just ran `format` a second time for Astro with no effect, so it's dead code now — removed it. https://github.com/fedify-dev/fedify/issues/950 Assisted-by: Claude Code:claude-sonnet-5 --- packages/init/src/test/create.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/packages/init/src/test/create.ts b/packages/init/src/test/create.ts index 1a6532e1a..d3a454175 100644 --- a/packages/init/src/test/create.ts +++ b/packages/init/src/test/create.ts @@ -134,7 +134,7 @@ async function validateDevToolScripts( dir: string, options: GeneratedType>, ): Promise { - const [webFramework, packageManager] = options as [ + const [_, packageManager] = options as [ WebFramework, PackageManager, KvStore, @@ -143,18 +143,6 @@ async function validateDevToolScripts( if (packageManager === "deno") return true; if (!(await hasInstalledNodeDependencies(dir))) return true; - if (webFramework === "astro") { - const format = await $`${[packageManager, "run", "format"]}` - .cwd(dir) - .stdin("null") - .stdout("piped") - .stderr("piped") - .noThrow() - .spawn(); - await saveOutputs(dir, format); - if (format.code !== 0) return false; - } - for (const script of ["format", "format:check", "lint"]) { const result = await $`${[packageManager, "run", script]}` .cwd(dir) From 7cd7f852ddb6386695e099fa65add45a7788ed2a Mon Sep 17 00:00:00 2001 From: Palcimer Date: Sun, 19 Jul 2026 12:09:46 +0900 Subject: [PATCH 3/3] Add @fedify/init changes in CHANGES.md --- CHANGES.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 665d0c31d..b8c35ab3d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -327,6 +327,15 @@ To be released. `endpoints.uploadMedia` is not built with `ctx.getMediaUploaderUri(identifier)`. +### @fedify/init + + - Fixed `fedify init`'s hydration test validation to run `format` before + `format:check`, which previously caused the entire test suite to fail when + the package manager is `npm` or `pnpm`: [[#950]] [[#952]] + +[#950]: https://github.com/fedify-dev/fedify/issues/950 +[#952]: https://github.com/fedify-dev/fedify/pull/952 + Version 2.3.2 -------------