From ffdc2a37f54f100512d69b32ad7b02b5608b82a4 Mon Sep 17 00:00:00 2001 From: Daan Roet Date: Mon, 30 Nov 2026 08:35:32 +0100 Subject: [PATCH] fix: use correct Biome executable in format --- .changeset/tough-bottles-leave.md | 5 +++++ src/formatters.ts | 2 +- tests/format.test.ts | 9 +-------- 3 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 .changeset/tough-bottles-leave.md 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",