diff --git a/.changeset/tough-bottles-leave.md b/.changeset/tough-bottles-leave.md new file mode 100644 index 0000000..1afd16b --- /dev/null +++ b/.changeset/tough-bottles-leave.md @@ -0,0 +1,5 @@ +--- +"@changesets/format": patch +--- + +Fix Biome formatting by invoking the `biome` executable instead of the `@biomejs/biome` package name diff --git a/src/formatters.ts b/src/formatters.ts index d90eff9..47e6422 100644 --- a/src/formatters.ts +++ b/src/formatters.ts @@ -75,7 +75,7 @@ const biome: Formatter = { const pm = await ctx.getPackageManager(); await packageManagerExecute( pm, - ["@biomejs/biome", "format", "--write", "--no-errors-on-unmatched", ...files], + ["biome", "format", "--write", "--no-errors-on-unmatched", ...files], ctx.cwd, ); }, diff --git a/tests/format.test.ts b/tests/format.test.ts index a045e86..8475178 100644 --- a/tests/format.test.ts +++ b/tests/format.test.ts @@ -15,14 +15,7 @@ const cases: { formatter: FormatterName; expectedCommand: string[] }[] = [ }, { formatter: "biome", - expectedCommand: [ - "npx", - "@biomejs/biome", - "format", - "--write", - "--no-errors-on-unmatched", - "file.ts", - ], + expectedCommand: ["npx", "biome", "format", "--write", "--no-errors-on-unmatched", "file.ts"], }, { formatter: "oxfmt",