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 ------------- diff --git a/packages/init/src/test/create.ts b/packages/init/src/test/create.ts index f966482fe..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,19 +143,7 @@ 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:check", "lint"]) { + for (const script of ["format", "format:check", "lint"]) { const result = await $`${[packageManager, "run", script]}` .cwd(dir) .stdin("null")