From e7cc94f327c8083d196ebe516e899d2ecb83f7d5 Mon Sep 17 00:00:00 2001 From: Nicolas Hedger Date: Sun, 15 Mar 2026 20:05:48 +0100 Subject: [PATCH 1/4] ci: fix update revision script --- Cargo.lock | 1 - Cargo.toml | 10 ++++------ scripts/update-revision.sh | 19 +++++++++++++++++-- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 289b73496..5fcc8ac3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1620,7 +1620,6 @@ dependencies = [ "bpaf", "camino", "lock_api", - "ls-types", "pulldown-cmark", "schemars", "serde", diff --git a/Cargo.toml b/Cargo.toml index 78a6404ea..4afb3cb9b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [package] -name = "codegen" -version = "0.1.0" -edition = "2024" +name = "codegen" +version = "0.1.0" +edition = "2024" description = "Crate used to generate pages from the Rust source code of Biome" -publish = false +publish = false [lib] name = "codegen" @@ -57,8 +57,6 @@ biome_string_case = { git = "https://github.com/biomejs/biome.git", rev = "1f308 biome_test_utils = { git = "https://github.com/biomejs/biome.git", rev = "1f30838b288bf317bf88c9247da029d9a394d009" } biome_text_edit = { git = "https://github.com/biomejs/biome.git", rev = "1f30838b288bf317bf88c9247da029d9a394d009" } bpaf = { version = "0.9.23", features = ["docgen"] } -# pin it because cargo keeps update it -ls-types = "=0.0.3" # If you update this library, be aware of the breaking changes camino = "1.2.2" # Needed to fix some weird dependency diff --git a/scripts/update-revision.sh b/scripts/update-revision.sh index 86ae79986..c3cf867d3 100755 --- a/scripts/update-revision.sh +++ b/scripts/update-revision.sh @@ -21,7 +21,22 @@ pnpm install --no-frozen-lockfile # Update the rev values for the biome dependencies awk -v new_rev="$new_rev" '{gsub(/rev = "[^"]+"/, "rev = \"" new_rev "\""); print}' Cargo.toml >temp.toml && mv temp.toml Cargo.toml -# Update Cargo.lock -cargo update +# Identify all biome crates +biome_crates=$( + cargo tree --prefix none --depth 1 --format '{p}' \ + | grep '^biome_' \ + | awk '{print $1}' \ + | sort -u +) + +# Update each biome crate to point to the new revision +if [ -n "$biome_crates" ]; then + # shellcheck disable=SC2086 + set -- $biome_crates + cargo add \ + --git https://github.com/biomejs/biome.git \ + --rev "$new_rev" \ + "$@" +fi echo "Revision updated to $new_rev." From 3bc066c9c6b5bab3fcb04cc3a4788103ad21f5df Mon Sep 17 00:00:00 2001 From: Nicolas Hedger Date: Sun, 15 Mar 2026 20:08:07 +0100 Subject: [PATCH 2/4] wording --- scripts/update-revision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revision.sh b/scripts/update-revision.sh index c3cf867d3..e1f9c9dff 100755 --- a/scripts/update-revision.sh +++ b/scripts/update-revision.sh @@ -21,7 +21,7 @@ pnpm install --no-frozen-lockfile # Update the rev values for the biome dependencies awk -v new_rev="$new_rev" '{gsub(/rev = "[^"]+"/, "rev = \"" new_rev "\""); print}' Cargo.toml >temp.toml && mv temp.toml Cargo.toml -# Identify all biome crates +# Identify all top-level biome crates biome_crates=$( cargo tree --prefix none --depth 1 --format '{p}' \ | grep '^biome_' \ From 4072dac264d55a68d066ac8bc14ec45513fe9302 Mon Sep 17 00:00:00 2001 From: Nicolas Hedger Date: Sun, 15 Mar 2026 20:08:57 +0100 Subject: [PATCH 3/4] no need to sort --- scripts/update-revision.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/update-revision.sh b/scripts/update-revision.sh index e1f9c9dff..b332696e3 100755 --- a/scripts/update-revision.sh +++ b/scripts/update-revision.sh @@ -25,8 +25,7 @@ awk -v new_rev="$new_rev" '{gsub(/rev = "[^"]+"/, "rev = \"" new_rev "\""); prin biome_crates=$( cargo tree --prefix none --depth 1 --format '{p}' \ | grep '^biome_' \ - | awk '{print $1}' \ - | sort -u + | awk '{print $1}' ) # Update each biome crate to point to the new revision From 8ba5054781ba7f6b20483d63f3cf0805ee587359 Mon Sep 17 00:00:00 2001 From: Nicolas Hedger Date: Sun, 15 Mar 2026 20:10:06 +0100 Subject: [PATCH 4/4] remove uneccessary step --- scripts/update-revision.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/update-revision.sh b/scripts/update-revision.sh index b332696e3..a9bca5846 100755 --- a/scripts/update-revision.sh +++ b/scripts/update-revision.sh @@ -18,9 +18,6 @@ jq ".devDependencies[\"@biomejs/wasm-web\"] = \"https://pkg.pr.new/biomejs/biome # Install dependencies pnpm install --no-frozen-lockfile -# Update the rev values for the biome dependencies -awk -v new_rev="$new_rev" '{gsub(/rev = "[^"]+"/, "rev = \"" new_rev "\""); print}' Cargo.toml >temp.toml && mv temp.toml Cargo.toml - # Identify all top-level biome crates biome_crates=$( cargo tree --prefix none --depth 1 --format '{p}' \