setup-biome icon indicating copy to clipboard operation
setup-biome copied to clipboard

v2 tag does not support nightly versions anymore

Open ridem opened this issue 9 months ago • 5 comments

Hi,

Thanks for your work on Biome! Just wanted to raise a regression on the way v2 tag treats nightly versions.

We're using the biomejs/setup-biome@v2 action, with the last released nightly before biome v2:

{
  "@biomejs/biome": "1.9.5-nightly.81fdedb"
}
Run biomejs/setup-biome@v2
  with:
    token: ***
  
No working directory specified. Using the current working directory.
Version 1.9.5-nightly.81fdedb of the Biome CLI does not exist.

GET /repos/biomejs/biome/releases/tags/cli%2Fv1.9.5-nightly.81 - 404 with id 70D8:29F87E
Error: Version 1.9.5-nightly.81fdedb of the Biome CLI does not exist.

I imagine it's because the version it's trying to download is now using coerce.

ridem avatar Mar 26 '25 10:03 ridem

Ah shoot, I was almost certain the using includePrerelease: true would cover this use case.

But it indeed truncates anything that isn't a number after the .

bunx semver --coerce -p 1.9.5-nightly.81fdedb
1.9.5-nightly.81

You may want to pin your action to v2.4.0 or fcb95f3805d3a2fac0ca09635a90a9ac2b38188e until we find a creative way to solve this. Just remember to switch to the latest version if you need to install the Biome v2 beta

nhedger avatar Mar 26 '25 11:03 nhedger

Since we are about to change how tags work, could be make a breaking change in the action? I am no expert in maintaining actions and their semver.

ematipico avatar Mar 26 '25 11:03 ematipico

We could, but this is rather an issue with the semver package incorrectly parsing the version string. It should be able to parse 1.9.5-nightly.81fdedb as expected, but doesn't.

We'd have the same problem if some day we released a 2.0.1-nightly.<hash> for example.

nhedger avatar Mar 26 '25 11:03 nhedger

Thanks for the prompt answer! We indeed pinned to the commit hash for the time being.

ridem avatar Mar 26 '25 11:03 ridem

I've reported the issue on the semver repo at https://github.com/npm/node-semver/issues/775.

Let's see how it evolves.

nhedger avatar Mar 26 '25 12:03 nhedger

You got your wish 😀

Semver 7.7.2 should fix the problem.

mbtools avatar May 08 '25 18:05 mbtools

You're an absolute legend, thanks a lot @mbtools !

nhedger avatar May 09 '25 03:05 nhedger

Fixed in https://github.com/biomejs/setup-biome/releases/tag/v2.5.1

nhedger avatar Jun 01 '25 07:06 nhedger