Skip to content

Commit e7f2e0d

Browse files
authored
Support marking some versions as ignored manually (#48)
2 parents d824df2 + a323e2d commit e7f2e0d

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

.github/workflows/update.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ async function main() {
2929
async function getMissingVersions() {
3030
const allVersions = await getAllVersions();
3131
const existingVersions = await getExistingVersions();
32-
return allVersions.filter((v) => !existingVersions.includes(v)).sort();
32+
const ignoredVersions = await getIgnoredVersions();
33+
const excludedVersions = new Set([...existingVersions, ...ignoredVersions]);
34+
return allVersions
35+
.filter((v) => !excludedVersions.has(v))
36+
.sort();
3337
}
3438

3539
async function getAllVersions() {
@@ -43,6 +47,15 @@ async function getNodePackageVersions(packageName) {
4347
return output.versions;
4448
}
4549

50+
async function getIgnoredVersions() {
51+
const ignoreFile = path.join(REPO_DIR, "ignored-versions.txt");
52+
const ignores = await fs.readFile(ignoreFile, "utf8");
53+
return ignores
54+
.split("\n")
55+
.map((line) => line.trim())
56+
.filter((line) => line && !line.startsWith("#"));
57+
}
58+
4659
async function getExistingVersions() {
4760
const existingTags = await git("tag", "--list");
4861
return existingTags

ignored-versions.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file contains @biomejs/biome versions that should not be mirrored.
2+
# This is an escape hatch to work around broken upstream releases.
3+
4+
# Lines beginning with a hash sign (like this one) are ignored.
5+
# Empty lines are ignored.
6+
7+
# Versions SHOULD NOT use `v` prefix, they are NPM package versions (semver).
8+
9+
# https://github.com/biomejs/biome/issues/6435
10+
2.0.1
11+
2.0.2
12+
2.0.3

0 commit comments

Comments
 (0)