v2 tag does not support nightly versions anymore
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.
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
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.
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.
Thanks for the prompt answer! We indeed pinned to the commit hash for the time being.
I've reported the issue on the semver repo at https://github.com/npm/node-semver/issues/775.
Let's see how it evolves.
You got your wish 😀
Semver 7.7.2 should fix the problem.
You're an absolute legend, thanks a lot @mbtools !
Fixed in https://github.com/biomejs/setup-biome/releases/tag/v2.5.1