Skip to content

ci: add CI workflow for trusted publishers for crates#7769

Merged
ematipico merged 7 commits intomainfrom
ci/add-crates-trusted-publishers
Oct 17, 2025
Merged

ci: add CI workflow for trusted publishers for crates#7769
ematipico merged 7 commits intomainfrom
ci/add-crates-trusted-publishers

Conversation

@ematipico
Copy link
Member

Summary

This PR does three things:

  • It adds a new workflow to publish our crates on crates.io. It uses the trusted publishing workflow. As for now, the workflow is meant to be run using workflow_dispatch (let's keep it simple for now). It uses the environment crate-publish environment variable, which means only @biomejs/core-contributors can publish and approve the release
  • It updates the crates metadata, and adds more crates to the publishing pipeline. I used cargo publish --dry-run --workspace to understand which crates can be published. While doing so, I discovered that the there was an incorrect dependency relation between biome_configuration (inteded to be private) and biome_plugin_loader (intended to be public). I refactored the relation, so now biome_configuration is correctly private.
  • It adds a JavaScript script to update the Cargo.toml files when we want to release new crates. The publishing infra is meant to be as simple as possible so it doesn't put too much work on us maintainers. We have one single version for all crates. New crates get published with the version we already have. No changelogs, no git tags. We can add them later if we want.

Note

I vibe-coded the script using Claud Code. It went through some interactions, I tested it multiple times via --dry-run and without.

Next step will be to setup the crates on crates.io (manually :( )

Test Plan

Locally tested the script

Docs

I updated the RELEASES.md file to reflect our commitment

@changeset-bot
Copy link

changeset-bot bot commented Oct 16, 2025

⚠️ No Changeset found

Latest commit: 74bc656

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ematipico ematipico requested a review from a team October 16, 2025 09:53
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 16, 2025

Walkthrough

Adds a manual GitHub Actions workflow to publish workspace crates to crates.io and a Node.js script (scripts/update-crates-versions.mjs) to bulk-update crate versions. Updates RELEASES.md (reorganises prerelease/npm sections and adds a Crates section). Introduces a new crate biome_plugin_loader (with a new configuration module and optional schemars feature) and moves PluginConfiguration/Plugins types into it; consumers were updated to import from biome_plugin_loader. Modifies many Cargo.toml manifests across the workspace to set publish = true or publish = false, and adjusts a few dev-dependency paths.

Possibly related PRs

Suggested reviewers

  • siketyan
  • arendjr

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the primary change of adding a CI workflow for trusted crate publishing and clearly reflects the core of the pull request without extraneous details.
Description Check ✅ Passed The description comprehensively outlines the new workflow, metadata updates, the release script, and documentation changes, demonstrating a clear understanding of the pull request’s scope.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/add-crates-trusted-publishers

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cf20c9 and 74bc656.

📒 Files selected for processing (13)
  • crates/biome_css_analyze/Cargo.toml (1 hunks)
  • crates/biome_css_parser/Cargo.toml (1 hunks)
  • crates/biome_diagnostics/Cargo.toml (1 hunks)
  • crates/biome_html_formatter/Cargo.toml (1 hunks)
  • crates/biome_js_analyze/Cargo.toml (1 hunks)
  • crates/biome_js_formatter/Cargo.toml (1 hunks)
  • crates/biome_js_parser/Cargo.toml (1 hunks)
  • crates/biome_json_analyze/Cargo.toml (1 hunks)
  • crates/biome_json_formatter/Cargo.toml (1 hunks)
  • crates/biome_json_parser/Cargo.toml (1 hunks)
  • crates/biome_module_graph/Cargo.toml (1 hunks)
  • crates/biome_rowan/Cargo.toml (1 hunks)
  • crates/biome_text_size/Cargo.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • crates/biome_html_formatter/Cargo.toml
  • crates/biome_js_analyze/Cargo.toml
  • crates/biome_diagnostics/Cargo.toml
  • crates/biome_rowan/Cargo.toml
  • crates/biome_json_parser/Cargo.toml
  • crates/biome_json_analyze/Cargo.toml
  • crates/biome_js_parser/Cargo.toml
  • crates/biome_js_formatter/Cargo.toml
  • crates/biome_css_analyze/Cargo.toml
  • crates/biome_module_graph/Cargo.toml
🧰 Additional context used
📓 Path-based instructions (4)
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_text_size/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
**/*.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Format TOML files before committing (e.g., via just f using taplo-cli)

Files:

  • crates/biome_text_size/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
{Cargo.toml,crates/**/Cargo.toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

{Cargo.toml,crates/**/Cargo.toml}: Use workspace = true for internal crates in dependencies
Use path dependencies for dev-dependencies of internal crates

Files:

  • crates/biome_text_size/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_css_parser/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
🧠 Learnings (2)
📚 Learning: 2025-08-17T08:55:30.118Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T08:55:30.118Z
Learning: Applies to crates/biome_html_formatter/benches/html_formatter.rs : Maintain the HTML formatter benchmark at benches/html_formatter.rs within the biome_html_formatter crate

Applied to files:

  • crates/biome_json_formatter/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_json_formatter/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Parser conformance
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added A-Project Area: project A-Linter Area: linter A-Parser Area: parser A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages L-HTML Language: HTML and super languages L-Grit Language: GritQL A-Type-Inference Area: type inference labels Oct 16, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 16, 2025

CodSpeed Performance Report

Merging #7769 will not alter performance

Comparing ci/add-crates-trusted-publishers (74bc656) with main (2db73ae)1

Summary

✅ 53 untouched
⏩ 85 skipped2

Footnotes

  1. No successful run was found on main (f3210a2) during the generation of this report, so 2db73ae was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 85 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f3210a2 and 351e055.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock and included by **
📒 Files selected for processing (24)
  • .github/workflows/publish-crates.yml (1 hunks)
  • RELEASES.md (2 hunks)
  • crates/biome_configuration/Cargo.toml (3 hunks)
  • crates/biome_configuration/src/lib.rs (1 hunks)
  • crates/biome_configuration/src/overrides.rs (1 hunks)
  • crates/biome_graphql_analyze/Cargo.toml (1 hunks)
  • crates/biome_graphql_factory/Cargo.toml (1 hunks)
  • crates/biome_graphql_formatter/Cargo.toml (1 hunks)
  • crates/biome_graphql_parser/Cargo.toml (1 hunks)
  • crates/biome_graphql_syntax/Cargo.toml (1 hunks)
  • crates/biome_grit_parser/Cargo.toml (1 hunks)
  • crates/biome_html_parser/Cargo.toml (1 hunks)
  • crates/biome_js_type_info/Cargo.toml (1 hunks)
  • crates/biome_js_type_info_macros/Cargo.toml (1 hunks)
  • crates/biome_jsdoc_comment/Cargo.toml (1 hunks)
  • crates/biome_markdown_parser/Cargo.toml (2 hunks)
  • crates/biome_plugin_loader/Cargo.toml (3 hunks)
  • crates/biome_plugin_loader/src/lib.rs (1 hunks)
  • crates/biome_plugin_loader/src/plugin_cache.rs (1 hunks)
  • crates/biome_project_layout/Cargo.toml (1 hunks)
  • crates/biome_rule_options/Cargo.toml (1 hunks)
  • crates/biome_service/src/settings.rs (1 hunks)
  • crates/biome_service/src/workspace/server.rs (1 hunks)
  • scripts/update-crates-versions.mjs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_grit_parser/Cargo.toml
  • crates/biome_html_parser/Cargo.toml
  • crates/biome_graphql_syntax/Cargo.toml
  • crates/biome_graphql_factory/Cargo.toml
  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_graphql_formatter/Cargo.toml
  • crates/biome_graphql_analyze/Cargo.toml
  • crates/biome_graphql_parser/Cargo.toml
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_grit_parser/Cargo.toml
  • crates/biome_js_type_info_macros/Cargo.toml
  • crates/biome_html_parser/Cargo.toml
  • crates/biome_service/src/workspace/server.rs
  • crates/biome_configuration/src/lib.rs
  • crates/biome_graphql_syntax/Cargo.toml
  • crates/biome_graphql_factory/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_jsdoc_comment/Cargo.toml
  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_project_layout/Cargo.toml
  • crates/biome_graphql_formatter/Cargo.toml
  • crates/biome_plugin_loader/src/lib.rs
  • crates/biome_plugin_loader/src/plugin_cache.rs
  • crates/biome_service/src/settings.rs
  • crates/biome_configuration/src/overrides.rs
  • crates/biome_configuration/Cargo.toml
  • crates/biome_graphql_analyze/Cargo.toml
  • crates/biome_plugin_loader/Cargo.toml
  • crates/biome_graphql_parser/Cargo.toml
  • crates/biome_js_type_info/Cargo.toml
**/*.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Format TOML files before committing (e.g., via just f using taplo-cli)

Files:

  • crates/biome_grit_parser/Cargo.toml
  • crates/biome_js_type_info_macros/Cargo.toml
  • crates/biome_html_parser/Cargo.toml
  • crates/biome_graphql_syntax/Cargo.toml
  • crates/biome_graphql_factory/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_jsdoc_comment/Cargo.toml
  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_project_layout/Cargo.toml
  • crates/biome_graphql_formatter/Cargo.toml
  • crates/biome_configuration/Cargo.toml
  • crates/biome_graphql_analyze/Cargo.toml
  • crates/biome_plugin_loader/Cargo.toml
  • crates/biome_graphql_parser/Cargo.toml
  • crates/biome_js_type_info/Cargo.toml
{Cargo.toml,crates/**/Cargo.toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

{Cargo.toml,crates/**/Cargo.toml}: Use workspace = true for internal crates in dependencies
Use path dependencies for dev-dependencies of internal crates

Files:

  • crates/biome_grit_parser/Cargo.toml
  • crates/biome_js_type_info_macros/Cargo.toml
  • crates/biome_html_parser/Cargo.toml
  • crates/biome_graphql_syntax/Cargo.toml
  • crates/biome_graphql_factory/Cargo.toml
  • crates/biome_rule_options/Cargo.toml
  • crates/biome_jsdoc_comment/Cargo.toml
  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_project_layout/Cargo.toml
  • crates/biome_graphql_formatter/Cargo.toml
  • crates/biome_configuration/Cargo.toml
  • crates/biome_graphql_analyze/Cargo.toml
  • crates/biome_plugin_loader/Cargo.toml
  • crates/biome_graphql_parser/Cargo.toml
  • crates/biome_js_type_info/Cargo.toml
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_service/src/workspace/server.rs
  • crates/biome_configuration/src/lib.rs
  • crates/biome_plugin_loader/src/lib.rs
  • crates/biome_plugin_loader/src/plugin_cache.rs
  • crates/biome_service/src/settings.rs
  • crates/biome_configuration/src/overrides.rs
crates/biome_service/src/workspace/server.rs

📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)

WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode

Files:

  • crates/biome_service/src/workspace/server.rs
crates/biome_configuration/src/**

📄 CodeRabbit inference engine (CLAUDE.md)

Keep configuration sources under biome_configuration/src/

Files:

  • crates/biome_configuration/src/lib.rs
  • crates/biome_configuration/src/overrides.rs
🧠 Learnings (6)
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Applied to files:

  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_configuration/Cargo.toml
📚 Learning: 2025-10-15T09:19:01.347Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:19:01.347Z
Learning: Applies to {Cargo.toml,crates/**/Cargo.toml} : Use workspace = true for internal crates in dependencies

Applied to files:

  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_configuration/Cargo.toml
  • crates/biome_plugin_loader/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_markdown_parser/Cargo.toml
  • crates/biome_configuration/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs

Applied to files:

  • crates/biome_markdown_parser/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/lib.rs : Implement FormatLanguage for HtmlFormatLanguage with associated types: SyntaxLanguage=HtmlLanguage, Context=HtmlFormatContext, FormatRule=FormatHtmlSyntaxNode

Applied to files:

  • crates/biome_configuration/src/overrides.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/cst.rs : Create FormatHtmlSyntaxNode in cst.rs implementing FormatRule<HtmlSyntaxNode> and AsFormat/IntoFormat for HtmlSyntaxNode using the provided plumbing

Applied to files:

  • crates/biome_configuration/src/overrides.rs
🧬 Code graph analysis (1)
crates/biome_plugin_loader/src/lib.rs (1)
crates/biome_analyze/src/options.rs (1)
  • configuration (167-169)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Check Dependencies
  • GitHub Check: Documentation
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_module_graph)
🔇 Additional comments (9)
crates/biome_graphql_parser/Cargo.toml (1)

4-10: All set, cheers.
Description and publish = true line up neatly with the trusted-publish rollout—nothing more to do here.

crates/biome_js_type_info_macros/Cargo.toml (1)

10-10: All clear on making this crate public.

Flip to publish = true fits nicely with the new release flow—no red flags spotted.

crates/biome_markdown_parser/Cargo.toml (2)

10-10: Keeps the crate private

Nice touch—explicitly marking this crate as private saves us from accidental publishes.


26-26: Path dev-dep is the right move

Swapping to the path dev-dependency matches our workspace pattern perfectly.

crates/biome_configuration/src/overrides.rs (1)

15-15: Import path update looks correct.

The change routes Plugins through biome_plugin_loader, consistent with the broader refactor to centralize plugin types. Clean and straightforward.

crates/biome_service/src/workspace/server.rs (1)

26-26: Import path correctly updated.

The routing of PluginConfiguration and Plugins through biome_plugin_loader aligns with the refactor. No behavioural change expected.

.github/workflows/publish-crates.yml (1)

1-16: Workflow implementation is sound.

The use of OIDC authentication and the crate-publish environment provides appropriate security controls. The cargo publish --workspace command will automatically:

  • Skip crates marked publish = false or without the publish field
  • Respect dependency ordering
  • Handle failures gracefully

The manual trigger aligns with the "on demand" publishing approach documented in RELEASES.md.

crates/biome_configuration/src/lib.rs (1)

163-163: Type path correctly updated.

The plugins field now references biome_plugin_loader::Plugins directly, completing the refactor to centralize plugin types. This aligns with the import updates across the codebase.

RELEASES.md (1)

7-40: Documentation clearly describes the new publishing approach.

The restructured sections effectively communicate the npm and crates publishing workflows. The "on demand" approach for crates aligns with the manual workflow, and the single-version strategy is clearly stated.

Co-authored-by: Naoki Ikeguchi <me@s6n.jp>
@ematipico
Copy link
Member Author

@siketyan

I improved the script:

  • it checks if the publish field is absent. It is, it fails and lists the crates that miss the field. Unfortunately, when publish isn't present, it means that it can be published, and I prefer being explicit. This means that when we are ready to publish a crate, it's just a flip
  • Given the previous statement, yaml and markdown crates are marked with publish = false, and we will publish them once we're ready

@ematipico ematipico requested a review from siketyan October 16, 2025 10:38
@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Tooling Area: internal tools L-CSS Language: CSS L-JSON Language: JSON and super languages A-Diagnostic Area: diagnostocis A-Resolver Area: resolver labels Oct 16, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
scripts/update-crates-versions.mjs (1)

173-206: Consider verifying the workspace dependency format.

The regex pattern assumes a specific format for workspace dependencies. Whilst this is standard, you might want to verify it matches your actual root Cargo.toml format, especially if you have custom formatting.

Run this script to check the format:

#!/bin/bash
# Description: Verify workspace dependency format in root Cargo.toml

# Check the format of workspace dependencies for a few publishable crates
rg -A 1 'biome_js_factory\s*=|biome_string_case\s*=|biome_tailwind_factory\s*=' Cargo.toml
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d69f50 and 7771487.

📒 Files selected for processing (63)
  • crates/biome_analyze/Cargo.toml (1 hunks)
  • crates/biome_aria/Cargo.toml (1 hunks)
  • crates/biome_aria_metadata/Cargo.toml (1 hunks)
  • crates/biome_console/Cargo.toml (1 hunks)
  • crates/biome_control_flow/Cargo.toml (1 hunks)
  • crates/biome_css_analyze/Cargo.toml (2 hunks)
  • crates/biome_css_factory/Cargo.toml (1 hunks)
  • crates/biome_css_formatter/Cargo.toml (2 hunks)
  • crates/biome_css_parser/Cargo.toml (2 hunks)
  • crates/biome_css_semantic/Cargo.toml (1 hunks)
  • crates/biome_css_syntax/Cargo.toml (1 hunks)
  • crates/biome_deserialize/Cargo.toml (1 hunks)
  • crates/biome_deserialize_macros/Cargo.toml (1 hunks)
  • crates/biome_diagnostics/Cargo.toml (1 hunks)
  • crates/biome_diagnostics_categories/Cargo.toml (1 hunks)
  • crates/biome_diagnostics_macros/Cargo.toml (1 hunks)
  • crates/biome_formatter/Cargo.toml (1 hunks)
  • crates/biome_fs/Cargo.toml (1 hunks)
  • crates/biome_glob/Cargo.toml (1 hunks)
  • crates/biome_graphql_semantic/Cargo.toml (1 hunks)
  • crates/biome_grit_factory/Cargo.toml (1 hunks)
  • crates/biome_grit_formatter/Cargo.toml (1 hunks)
  • crates/biome_grit_syntax/Cargo.toml (1 hunks)
  • crates/biome_html_factory/Cargo.toml (1 hunks)
  • crates/biome_html_formatter/Cargo.toml (2 hunks)
  • crates/biome_html_syntax/Cargo.toml (1 hunks)
  • crates/biome_js_analyze/Cargo.toml (2 hunks)
  • crates/biome_js_factory/Cargo.toml (1 hunks)
  • crates/biome_js_formatter/Cargo.toml (2 hunks)
  • crates/biome_js_parser/Cargo.toml (2 hunks)
  • crates/biome_js_runtime/Cargo.toml (1 hunks)
  • crates/biome_js_semantic/Cargo.toml (1 hunks)
  • crates/biome_js_syntax/Cargo.toml (1 hunks)
  • crates/biome_js_transform/Cargo.toml (1 hunks)
  • crates/biome_json_analyze/Cargo.toml (2 hunks)
  • crates/biome_json_factory/Cargo.toml (1 hunks)
  • crates/biome_json_formatter/Cargo.toml (2 hunks)
  • crates/biome_json_parser/Cargo.toml (2 hunks)
  • crates/biome_json_syntax/Cargo.toml (1 hunks)
  • crates/biome_json_value/Cargo.toml (1 hunks)
  • crates/biome_line_index/Cargo.toml (1 hunks)
  • crates/biome_lsp_converters/Cargo.toml (1 hunks)
  • crates/biome_markdown_factory/Cargo.toml (1 hunks)
  • crates/biome_markdown_syntax/Cargo.toml (1 hunks)
  • crates/biome_markup/Cargo.toml (1 hunks)
  • crates/biome_module_graph/Cargo.toml (2 hunks)
  • crates/biome_parser/Cargo.toml (1 hunks)
  • crates/biome_resolver/Cargo.toml (1 hunks)
  • crates/biome_rowan/Cargo.toml (2 hunks)
  • crates/biome_string_case/Cargo.toml (1 hunks)
  • crates/biome_suppression/Cargo.toml (1 hunks)
  • crates/biome_syntax_codegen/Cargo.toml (1 hunks)
  • crates/biome_tailwind_factory/Cargo.toml (1 hunks)
  • crates/biome_tailwind_parser/Cargo.toml (1 hunks)
  • crates/biome_tailwind_syntax/Cargo.toml (1 hunks)
  • crates/biome_text_edit/Cargo.toml (1 hunks)
  • crates/biome_text_size/Cargo.toml (2 hunks)
  • crates/biome_ungrammar/Cargo.toml (1 hunks)
  • crates/biome_unicode_table/Cargo.toml (1 hunks)
  • crates/biome_yaml_factory/Cargo.toml (1 hunks)
  • crates/biome_yaml_parser/Cargo.toml (1 hunks)
  • crates/biome_yaml_syntax/Cargo.toml (1 hunks)
  • scripts/update-crates-versions.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (24)
  • crates/biome_css_semantic/Cargo.toml
  • crates/biome_text_edit/Cargo.toml
  • crates/biome_ungrammar/Cargo.toml
  • crates/biome_json_parser/Cargo.toml
  • crates/biome_css_factory/Cargo.toml
  • crates/biome_module_graph/Cargo.toml
  • crates/biome_yaml_parser/Cargo.toml
  • crates/biome_tailwind_parser/Cargo.toml
  • crates/biome_html_formatter/Cargo.toml
  • crates/biome_js_parser/Cargo.toml
  • crates/biome_js_runtime/Cargo.toml
  • crates/biome_markup/Cargo.toml
  • crates/biome_resolver/Cargo.toml
  • crates/biome_unicode_table/Cargo.toml
  • crates/biome_js_analyze/Cargo.toml
  • crates/biome_js_semantic/Cargo.toml
  • crates/biome_css_analyze/Cargo.toml
  • crates/biome_json_factory/Cargo.toml
  • crates/biome_aria/Cargo.toml
  • crates/biome_markdown_factory/Cargo.toml
  • crates/biome_grit_factory/Cargo.toml
  • crates/biome_lsp_converters/Cargo.toml
  • crates/biome_text_size/Cargo.toml
  • crates/biome_line_index/Cargo.toml
🧰 Additional context used
📓 Path-based instructions (6)
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_suppression/Cargo.toml
  • crates/biome_control_flow/Cargo.toml
  • crates/biome_grit_syntax/Cargo.toml
  • crates/biome_json_syntax/Cargo.toml
  • crates/biome_aria_metadata/Cargo.toml
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_graphql_semantic/Cargo.toml
  • crates/biome_glob/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
  • crates/biome_diagnostics/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_deserialize_macros/Cargo.toml
  • crates/biome_analyze/Cargo.toml
  • crates/biome_formatter/Cargo.toml
  • crates/biome_console/Cargo.toml
  • crates/biome_markdown_syntax/Cargo.toml
  • crates/biome_diagnostics_macros/Cargo.toml
  • crates/biome_html_syntax/Cargo.toml
  • crates/biome_html_factory/Cargo.toml
  • crates/biome_css_formatter/Cargo.toml
  • crates/biome_json_value/Cargo.toml
  • crates/biome_css_syntax/Cargo.toml
  • crates/biome_tailwind_syntax/Cargo.toml
  • crates/biome_tailwind_factory/Cargo.toml
  • crates/biome_fs/Cargo.toml
  • crates/biome_js_formatter/Cargo.toml
  • crates/biome_js_transform/Cargo.toml
  • crates/biome_rowan/Cargo.toml
  • crates/biome_parser/Cargo.toml
  • crates/biome_yaml_syntax/Cargo.toml
  • crates/biome_js_factory/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_js_syntax/Cargo.toml
  • crates/biome_yaml_factory/Cargo.toml
  • crates/biome_syntax_codegen/Cargo.toml
  • crates/biome_deserialize/Cargo.toml
  • crates/biome_json_analyze/Cargo.toml
  • crates/biome_string_case/Cargo.toml
**/*.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Format TOML files before committing (e.g., via just f using taplo-cli)

Files:

  • crates/biome_suppression/Cargo.toml
  • crates/biome_control_flow/Cargo.toml
  • crates/biome_grit_syntax/Cargo.toml
  • crates/biome_json_syntax/Cargo.toml
  • crates/biome_aria_metadata/Cargo.toml
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_graphql_semantic/Cargo.toml
  • crates/biome_glob/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
  • crates/biome_diagnostics/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_deserialize_macros/Cargo.toml
  • crates/biome_analyze/Cargo.toml
  • crates/biome_formatter/Cargo.toml
  • crates/biome_console/Cargo.toml
  • crates/biome_markdown_syntax/Cargo.toml
  • crates/biome_diagnostics_macros/Cargo.toml
  • crates/biome_html_syntax/Cargo.toml
  • crates/biome_html_factory/Cargo.toml
  • crates/biome_css_formatter/Cargo.toml
  • crates/biome_json_value/Cargo.toml
  • crates/biome_css_syntax/Cargo.toml
  • crates/biome_tailwind_syntax/Cargo.toml
  • crates/biome_tailwind_factory/Cargo.toml
  • crates/biome_fs/Cargo.toml
  • crates/biome_js_formatter/Cargo.toml
  • crates/biome_js_transform/Cargo.toml
  • crates/biome_rowan/Cargo.toml
  • crates/biome_parser/Cargo.toml
  • crates/biome_yaml_syntax/Cargo.toml
  • crates/biome_js_factory/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_js_syntax/Cargo.toml
  • crates/biome_yaml_factory/Cargo.toml
  • crates/biome_syntax_codegen/Cargo.toml
  • crates/biome_deserialize/Cargo.toml
  • crates/biome_json_analyze/Cargo.toml
  • crates/biome_string_case/Cargo.toml
{Cargo.toml,crates/**/Cargo.toml}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

{Cargo.toml,crates/**/Cargo.toml}: Use workspace = true for internal crates in dependencies
Use path dependencies for dev-dependencies of internal crates

Files:

  • crates/biome_suppression/Cargo.toml
  • crates/biome_control_flow/Cargo.toml
  • crates/biome_grit_syntax/Cargo.toml
  • crates/biome_json_syntax/Cargo.toml
  • crates/biome_aria_metadata/Cargo.toml
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_graphql_semantic/Cargo.toml
  • crates/biome_glob/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
  • crates/biome_diagnostics/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_deserialize_macros/Cargo.toml
  • crates/biome_analyze/Cargo.toml
  • crates/biome_formatter/Cargo.toml
  • crates/biome_console/Cargo.toml
  • crates/biome_markdown_syntax/Cargo.toml
  • crates/biome_diagnostics_macros/Cargo.toml
  • crates/biome_html_syntax/Cargo.toml
  • crates/biome_html_factory/Cargo.toml
  • crates/biome_css_formatter/Cargo.toml
  • crates/biome_json_value/Cargo.toml
  • crates/biome_css_syntax/Cargo.toml
  • crates/biome_tailwind_syntax/Cargo.toml
  • crates/biome_tailwind_factory/Cargo.toml
  • crates/biome_fs/Cargo.toml
  • crates/biome_js_formatter/Cargo.toml
  • crates/biome_js_transform/Cargo.toml
  • crates/biome_rowan/Cargo.toml
  • crates/biome_parser/Cargo.toml
  • crates/biome_yaml_syntax/Cargo.toml
  • crates/biome_js_factory/Cargo.toml
  • crates/biome_diagnostics_categories/Cargo.toml
  • crates/biome_js_syntax/Cargo.toml
  • crates/biome_yaml_factory/Cargo.toml
  • crates/biome_syntax_codegen/Cargo.toml
  • crates/biome_deserialize/Cargo.toml
  • crates/biome_json_analyze/Cargo.toml
  • crates/biome_string_case/Cargo.toml
crates/biome_*_{syntax,parser,formatter,analyze,factory,semantic}/**

📄 CodeRabbit inference engine (CLAUDE.md)

Maintain the per-language crate structure: biome_{lang}_{syntax,parser,formatter,analyze,factory,semantic}

Files:

  • crates/biome_grit_syntax/Cargo.toml
  • crates/biome_json_syntax/Cargo.toml
  • crates/biome_grit_formatter/Cargo.toml
  • crates/biome_graphql_semantic/Cargo.toml
  • crates/biome_json_formatter/Cargo.toml
  • crates/biome_css_parser/Cargo.toml
  • crates/biome_markdown_syntax/Cargo.toml
  • crates/biome_html_syntax/Cargo.toml
  • crates/biome_html_factory/Cargo.toml
  • crates/biome_css_formatter/Cargo.toml
  • crates/biome_css_syntax/Cargo.toml
  • crates/biome_tailwind_syntax/Cargo.toml
  • crates/biome_tailwind_factory/Cargo.toml
  • crates/biome_js_formatter/Cargo.toml
  • crates/biome_yaml_syntax/Cargo.toml
  • crates/biome_js_factory/Cargo.toml
  • crates/biome_js_syntax/Cargo.toml
  • crates/biome_yaml_factory/Cargo.toml
  • crates/biome_json_analyze/Cargo.toml
crates/biome_formatter/**/Cargo.toml

📄 CodeRabbit inference engine (crates/biome_formatter/CONTRIBUTING.md)

Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure

Files:

  • crates/biome_formatter/Cargo.toml
crates/biome_js_formatter/**/Cargo.toml

📄 CodeRabbit inference engine (crates/biome_js_formatter/CONTRIBUTING.md)

Declare the dependency biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" } for internal installation

Files:

  • crates/biome_js_formatter/Cargo.toml
🧠 Learnings (2)
📚 Learning: 2025-08-17T08:55:30.118Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T08:55:30.118Z
Learning: Applies to crates/biome_html_formatter/benches/html_formatter.rs : Maintain the HTML formatter benchmark at benches/html_formatter.rs within the biome_html_formatter crate

Applied to files:

  • crates/biome_json_formatter/Cargo.toml
  • crates/biome_css_formatter/Cargo.toml
  • crates/biome_js_formatter/Cargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation

Applied to files:

  • crates/biome_js_formatter/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
  • GitHub Check: Parser conformance
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: autofix
  • GitHub Check: Test Node.js API
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: End-to-end tests
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_formatter)
🔇 Additional comments (22)
crates/biome_deserialize_macros/Cargo.toml (1)

10-10: All clear on publishing.

Explicit publish = true keeps the intent unambiguous—looks good to me.

crates/biome_json_value/Cargo.toml (1)

10-10: Looks ready to ship. Flipping on publish = true here dovetails nicely with the trusted-publishing workflow. Cheers for keeping it explicit.

crates/biome_diagnostics_macros/Cargo.toml (1)

10-10: Explicit publish flag keeps the macros crate in the release train—nice.
No issues spotted; this matches the new trusted-publishing flow.

crates/biome_fs/Cargo.toml (1)

10-10: Explicit publish flag looks grand.

Nice to see the crate opting into the trusted workflow without surprises.

crates/biome_diagnostics_categories/Cargo.toml (1)

10-10: Explicit publish flag looks spot on.

Nice to see the manifest making its intentions clear; this keeps the crates.io pipeline tidy.

crates/biome_js_syntax/Cargo.toml (1)

10-10: Explicit publish flag looks good.

Thanks for wiring this up; keeps the manifest intent clear.

crates/biome_markdown_syntax/Cargo.toml (1)

10-10: Explicit publish gate looks good.

Setting publish = false keeps this crate off crates.io until it’s ready—exactly what we want.

crates/biome_console/Cargo.toml (1)

10-10: Publish flag looks spot on.

Explicit publish = true keeps the console crate in the release train—no objections here.

crates/biome_tailwind_syntax/Cargo.toml (1)

10-10: Explicit publish flag acknowledged

Setting publish = true keeps the manifest consistent with the new release flow. All good from my side.

crates/biome_graphql_semantic/Cargo.toml (1)

11-11: Explicit publish flag confirmed.
Looks aligned with the trusted publishing flow—no objections here.

crates/biome_aria_metadata/Cargo.toml (1)

10-10: Explicit publish flag matches the plan.

Nice to see the crate opted in deliberately.

crates/biome_grit_formatter/Cargo.toml (1)

10-10: Explicit publish flag looks good

Thanks for setting the intent explicitly; matches the trusted publisher flow. Looks spot on.

crates/biome_formatter/Cargo.toml (1)

10-10: Explicit publish flag looks good.

Setting publish = true keeps the manifest aligned with the new trusted-publishing checks—no issues spotted here.

crates/biome_json_syntax/Cargo.toml (1)

10-10: Explicit publish flag looks good

Cheers for making the intent explicit; this keeps the new script and the release workflow singing from the same hymn sheet.

crates/biome_syntax_codegen/Cargo.toml (1)

10-10: LGTM!

The explicit publish = false declaration aligns with the PR's requirement for all crates to have an explicit publish field. This crate is correctly marked as non-publishable.

crates/biome_js_factory/Cargo.toml (1)

8-8: LGTM!

The publish = true declaration correctly marks this crate as publishable, enabling it for the new crates.io publishing workflow.

crates/biome_tailwind_factory/Cargo.toml (1)

8-8: LGTM!

Consistent with the workspace-wide publishing configuration.

crates/biome_string_case/Cargo.toml (1)

10-10: LGTM!

The publish declaration is correctly placed and marks this crate for publication.

crates/biome_js_transform/Cargo.toml (1)

10-13: LGTM!

The publish = false field correctly marks this crate as non-publishable. The field reordering is just a formatting adjustment with no functional impact.

scripts/update-crates-versions.mjs (3)

15-16: LGTM!

Correctly using import.meta.filename and import.meta.dirname for Node.js >= 20, as suggested in the earlier review.


96-116: LGTM!

Excellent validation that enforces the project's requirement for all crates to have an explicit publish field. This prevents accidental publication and makes publishing intent clear, as noted in the PR objectives.


211-306: LGTM!

The main function provides excellent user experience with clear help text, proper validation, and informative dry-run output. The version format validation (X.Y.Z only) aligns with the simplified publishing process described in the PR.

@github-actions
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 50761 50761 0
Passed 49557 49557 0
Failed 1162 1162 0
Panics 42 42 0
Coverage 97.63% 97.63% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6673 6673 0
Passed 2226 2226 0
Failed 4447 4447 0
Panics 0 0 0
Coverage 33.36% 33.36% 0.00%

ts/babel

Test result main count This PR count Difference
Total 835 835 0
Passed 742 742 0
Failed 93 93 0
Panics 0 0 0
Coverage 88.86% 88.86% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18800 18800 0
Passed 14372 14372 0
Failed 4427 4427 0
Panics 1 1 0
Coverage 76.45% 76.45% 0.00%

ematipico and others added 2 commits October 16, 2025 12:04
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ematipico ematipico merged commit f1e3841 into main Oct 17, 2025
29 checks passed
@ematipico ematipico deleted the ci/add-crates-trusted-publishers branch October 17, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Core Area: core A-Diagnostic Area: diagnostocis A-Formatter Area: formatter A-Linter Area: linter A-Parser Area: parser A-Project Area: project A-Resolver Area: resolver A-Tooling Area: internal tools A-Type-Inference Area: type inference L-CSS Language: CSS L-Grit Language: GritQL L-HTML Language: HTML and super languages L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants