Skip to content

fix: use correct Biome executable in format - #57

Open
DaanRoet wants to merge 1 commit into
changesets:mainfrom
DaanRoet:fix/biome-format-command
Open

DaanRoet wants to merge 1 commit into
changesets:mainfrom
DaanRoet:fix/biome-format-command

Conversation

@DaanRoet

Copy link
Copy Markdown

fixes #56

@DaanRoet
DaanRoet force-pushed the fix/biome-format-command branch from b6ff44f to ffdc2a3 Compare November 30, 2026 07:39
@Netail

Netail commented Nov 30, 2026 •

Copy link
Copy Markdown

Not sure if changing to biome is the right approach. With pnpm it's fine, because it uses pnpm exec biome (a local binary). But in the case of npm, it uses npx biome (which could execute a different biome, if it suddenly has a binary). Best to execute pnpm with pnpx @biomejs/biome instead.

And pnpm exec requires running pnpm install beforehand I believe, so pnpx is also nice to download on demand if Changesets is executed with pnpx too

https://github.com/changesets/format/blob/main/src/utils.ts#L35
execute-local -> execute

@bluwy

bluwy commented Dec 2, 2026

Copy link
Copy Markdown
Member

The formatter detection currently relies on locally installed paths, and I think possibly downloading the binary automatically isn't great as it could seemingly slow down the process or install the wrong version, so we should still stick to executing locally instead.

Npm unfortunately doesn't have a strict "execute local binary only" command, so probably we can try adding --no as the next best guard to prevent executing the wrong binary.

@tats-u

tats-u commented Dec 2, 2026

Copy link
Copy Markdown

The CHANGELOG files generated by Changesets contain a lot of blank lines, which causes Biome 2.6+ to complain. Please merge this as soon as possible.

@Netail

Netail commented Dec 2, 2026 •

Copy link
Copy Markdown

Npm unfortunately doesn't have a strict "execute local binary only" command, so probably we can try adding --no as the next best guard to prevent executing the wrong binary.

The commands are managed upstream in package-manager-detector, we could ofc inject --no, but might be nice to include it there

made-in-common/package-manager-detector#98

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Biome formatter runs pnpm exec @biomejs/biome, which fails: the binary is biome

4 participants