Skip to content

fix(workspace): make process_file call stateless - #10931

Merged
ematipico merged 3 commits into
mainfrom
01-workspace-document-only
Jul 15, 2026
Merged

ematipico merged 3 commits into
mainfrom
01-workspace-document-only

Conversation

@ematipico

@ematipico ematipico commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR fixes an issue that exists with process_file. This is mostly an architectural fix.

The problem

I'll try to make it simple. The issue we have today (even without salsa) is that when we run linting in fix mode --fix with type-aware rules, fixes that are applied to a module aren't reflected in the other modules. Meaning that fixing the module A might have "module-graph (types too) repercussions" for B, but B won't see these changes.

This issue becomes more evident with salsa because the module graph and types received during linting are snapshots of the scanner, and we can't update the module graph while we're holding snapshots around.

As a consequence, when we run check --write --only=types, we deadlock because the CLI calls workspace.change_file, which updates the module graph.

Solution

The LSP is fine; we don't touch it.

Here, process_file has been moved into the workspace. process_file is a stateless operation meaning that we read the parsed file from the Workspace, but then the new parsed file (when we apply the code actions) is discarded when the crawler worker drops. Since the CLI isn't using --use-server, it no longer needs that information.

If we use --use-server, we call changed_file once the crawler finishes. We don't spawn threads because we're updating the salsa database. The operation might seem expensive - and it is -, but we're touching a working server, so it's expected by design.

I created ParsedOrigin to split the semantics of "disposable" CST and "workspace" CST.

I believe this abstraction can be added to the other operations, but it's ok for now.

Test Plan

Green CI. Added a few new tests.

Docs

This PR was created with AI assistance (OpenCode).

@changeset-bot

changeset-bot Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2c3a4cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Organic activity

No automation signals detected in the analyzed events.

View full analysis →

This is an automated analysis by AgentScan

@github-actions github-actions Bot added A-CLI Area: CLI A-Project Area: project A-Linter Area: linter A-Formatter Area: formatter A-LSP Area: language server protocol L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS and super languages L-JSON Language: JSON and super languages L-HTML Language: HTML and super languages L-Grit Language: GritQL labels Jul 13, 2026
@codspeed

codspeed Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 263 untouched benchmarks


Comparing 01-workspace-document-only (2c3a4cd) with main (f2799db)

Open in CodSpeed

@ematipico
ematipico force-pushed the 01-workspace-document-only branch from 207b994 to 8589845 Compare July 14, 2026 13:41
@github-actions github-actions Bot added A-Core Area: core and removed A-Linter Area: linter A-Formatter Area: formatter L-CSS Language: CSS and super languages L-HTML Language: HTML and super languages L-Grit Language: GritQL labels Jul 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 53422 53422 0
Passed 52141 52141 0
Failed 1239 1239 0
Panics 42 42 0
Coverage 97.60% 97.60% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 38 38 0
Passed 37 37 0
Failed 1 1 0
Panics 0 0 0
Coverage 97.37% 97.37% 0.00%

markdown/commonmark

Test result main count This PR count Difference
Total 652 652 0
Passed 652 652 0
Failed 0 0 0
Panics 0 0 0
Coverage 100.00% 100.00% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 5467 5467 0
Passed 1915 1915 0
Failed 3552 3552 0
Panics 0 0 0
Coverage 35.03% 35.03% 0.00%

ts/babel

Test result main count This PR count Difference
Total 677 677 0
Passed 593 593 0
Failed 84 84 0
Panics 0 0 0
Coverage 87.59% 87.59% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18876 18876 0
Passed 13010 13010 0
Failed 5865 5865 0
Panics 1 1 0
Coverage 68.92% 68.92% 0.00%

@ematipico
ematipico force-pushed the 01-workspace-document-only branch from 8f0c74d to f7279d8 Compare July 14, 2026 13:55
@ematipico ematipico changed the title fix(workspace): isolate document-only updates fix(workspace): isolate fix file Jul 14, 2026
@ematipico
ematipico force-pushed the 01-workspace-document-only branch from 8e1f96e to 1cfdad0 Compare July 14, 2026 14:10
@ematipico
ematipico marked this pull request as ready for review July 14, 2026 14:12
@ematipico
ematipico requested review from a team July 14, 2026 14:13
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR introduces stateless workspace file processing through a new process_file API, with CLI and LSP wiring. File handlers adopt parsed-origin inputs, optional fixed results, shared semantic models, and revised embedded/plugin edit handling. Workspace operations gain pending-write retry paths and untracked database access, while crawler flows synchronise changed files. Regression tests cover stateless processing, embedded formatting, cancellation recovery, concurrent module updates, and diagnostic output.

Possibly related PRs

Suggested labels: A-Diagnostic

Suggested reviewers: dyc3

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarises the main change: making process_file stateless in the workspace.
Description check ✅ Passed The description is clearly related to the changeset and explains the problem and solution.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 01-workspace-document-only

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_service/src/file_handlers/javascript.rs (1)

987-1035: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Move the #[cfg] out of the call arguments — stable Rust doesn’t accept #[cfg(feature = "module_graph")] on a plain function-call argument, so this will fail to compile. Wrap the whole call in #[cfg] blocks or hoist the conditional into a local first.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/biome_service/src/file_handlers/javascript.rs` around lines 987 -
1035, Remove the conditional attribute from the argument list in
js_analyzer_services_for_fix. Split the non-module-graph call into separate
cfg-gated branches, or define the module_db argument conditionally before
calling js_analyzer_services, while preserving the existing feature-specific
behavior and semantic model attachment.
🧹 Nitpick comments (2)
crates/biome_service/src/file_handlers/javascript.rs (1)

1321-1372: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Only the first plugin text_edit per pass survives — see consolidated comment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/biome_service/src/file_handlers/javascript.rs` around lines 1321 -
1372, Update the plugin-fix handling in the loop around pending_actions and
apply_plugin_text_edit so every plugin text_edit extracted during a pass is
preserved instead of using get_or_insert on a single Option. Collect and apply
all plugin edits for that pass, updating and reparsing the text as needed before
continuing, while retaining the existing batch-action behavior.
crates/biome_service/src/file_handlers/css.rs (1)

905-941: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Only the first plugin text_edit per pass survives — see consolidated comment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/biome_service/src/file_handlers/css.rs` around lines 905 - 941, The
pending-action filtering in the fix-all loop only preserves the first plugin
text edit because get_or_insert discards subsequent edits. Update the flow
around plugin_text_edit and apply_plugin_text_edit so every plugin text edit
from the pass is retained and applied, while preserving the existing
parse-and-continue behavior after producing the updated text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.changeset/kind-plums-lose.md:
- Line 5: Update the changeset entry describing the `check --write` fix to use
grammatically correct wording: add the missing article and remove the stray
comma, while preserving the existing meaning.

In `@crates/biome_service/src/workspace.rs`:
- Around line 1727-1730: Correct the typo in the documentation comment for
process_file by changing “fomatting” to “formatting”; leave the method signature
and surrounding text unchanged.

---

Outside diff comments:
In `@crates/biome_service/src/file_handlers/javascript.rs`:
- Around line 987-1035: Remove the conditional attribute from the argument list
in js_analyzer_services_for_fix. Split the non-module-graph call into separate
cfg-gated branches, or define the module_db argument conditionally before
calling js_analyzer_services, while preserving the existing feature-specific
behavior and semantic model attachment.

---

Nitpick comments:
In `@crates/biome_service/src/file_handlers/css.rs`:
- Around line 905-941: The pending-action filtering in the fix-all loop only
preserves the first plugin text edit because get_or_insert discards subsequent
edits. Update the flow around plugin_text_edit and apply_plugin_text_edit so
every plugin text edit from the pass is retained and applied, while preserving
the existing parse-and-continue behavior after producing the updated text.

In `@crates/biome_service/src/file_handlers/javascript.rs`:
- Around line 1321-1372: Update the plugin-fix handling in the loop around
pending_actions and apply_plugin_text_edit so every plugin text_edit extracted
during a pass is preserved instead of using get_or_insert on a single Option.
Collect and apply all plugin edits for that pass, updating and reparsing the
text as needed before continuing, while retaining the existing batch-action
behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 047de09a-62e1-4bf2-9e0f-1be1c48c60e5

📥 Commits

Reviewing files that changed from the base of the PR and between f2799db and 1fab1b7.

⛔ Files ignored due to path filters (7)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_cli/tests/snapshots/main_cases_html/should_apply_fixes_to_embedded_languages.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_javascript/should_apply_fixes_to_embedded_languages.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_overrides_formatter/overrides_json_formatting_options.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_cases_reporter_terminal/reports_diagnostics_check_write_command_verbose.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/apply_bogus_argument.snap is excluded by !**/*.snap and included by **
  • packages/@biomejs/backend-jsonrpc/src/workspace.ts is excluded by !**/backend-jsonrpc/src/workspace.ts and included by **
📒 Files selected for processing (40)
  • .changeset/kind-plums-lose.md
  • .changeset/two-spies-hammer.md
  • crates/biome_cli/src/commands/check.rs
  • crates/biome_cli/src/runner/crawler.rs
  • crates/biome_cli/src/runner/diagnostics.rs
  • crates/biome_cli/src/runner/execution.rs
  • crates/biome_cli/src/runner/handler.rs
  • crates/biome_cli/src/runner/impls/collectors/default.rs
  • crates/biome_cli/src/runner/impls/process_file/check.rs
  • crates/biome_cli/src/runner/impls/process_file/format.rs
  • crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs
  • crates/biome_cli/src/runner/mod.rs
  • crates/biome_cli/src/runner/process_file.rs
  • crates/biome_cli/tests/cases/overrides_formatter.rs
  • crates/biome_lsp/src/server.rs
  • crates/biome_rowan/src/green/node.rs
  • crates/biome_rowan/src/syntax/node.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_service/src/embed/mod.rs
  • crates/biome_service/src/file_handlers/astro.rs
  • crates/biome_service/src/file_handlers/css.rs
  • crates/biome_service/src/file_handlers/graphql.rs
  • crates/biome_service/src/file_handlers/grit.rs
  • crates/biome_service/src/file_handlers/html.rs
  • crates/biome_service/src/file_handlers/javascript.rs
  • crates/biome_service/src/file_handlers/json.rs
  • crates/biome_service/src/file_handlers/md.rs
  • crates/biome_service/src/file_handlers/mod.rs
  • crates/biome_service/src/file_handlers/svelte.rs
  • crates/biome_service/src/file_handlers/vue.rs
  • crates/biome_service/src/file_handlers/yaml.rs
  • crates/biome_service/src/test_utils.rs
  • crates/biome_service/src/workspace.rs
  • crates/biome_service/src/workspace.tests.rs
  • crates/biome_service/src/workspace/client.rs
  • crates/biome_service/src/workspace/db.rs
  • crates/biome_service/src/workspace/server.rs
  • crates/biome_service/src/workspace/server.tests.rs
  • crates/biome_service/src/workspace_types.rs
  • crates/biome_workspace_db/src/lib.rs
💤 Files with no reviewable changes (1)
  • crates/biome_cli/src/commands/check.rs

Comment thread .changeset/kind-plums-lose.md
Comment thread crates/biome_service/src/workspace.rs
@ematipico ematipico changed the title fix(workspace): isolate fix file fix(workspace): make process_file call stateless Jul 15, 2026

/// If applies all the safe fixes to the given syntax tree.
pub(crate) fn fix_all(params: FixAllParams) -> Result<FixFileResult, WorkspaceError> {
pub(crate) fn fix_all(params: FixAllParams) -> Result<Option<FixedFileResult>, WorkspaceError> {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This now returns Option so that we don't need to reconstruct the original source via .to_string() when we use let Some() = ... else {}

9 │ background-color: red;
> 10 │ background-color: red;
│ ^^^^^^^^^^^^^^^^
11 │ }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This change is expected. The previous flow of biome check --write was:

  1. apply fixes
  2. pull diagnostics
  3. format

The new flow is

  1. apply fixes
  2. format
  3. pull diagnostics

This is the correct flow because with the previous flow:

  • the formatter would have emitted incorrect files (see the overrides JSON)
  • the diagnostics were run on unformatted code, resulting in something different from what the users see

@ematipico
ematipico force-pushed the 01-workspace-document-only branch from 68c33af to 716c2a2 Compare July 15, 2026 08:34
@ematipico
ematipico force-pushed the 01-workspace-document-only branch from 716c2a2 to 724ae92 Compare July 15, 2026 08:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
crates/biome_cli/src/runner/process_file.rs (1)

518-573: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the missing-document branch.

This test opens the workspace document before constructing WorkspaceFile, so it does not exercise the ownership-sensitive path changed at Lines 289-304. Add a case that skips open_file and verifies disk writes while preserving the workspace input.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/biome_cli/src/runner/process_file.rs` around lines 518 - 573, Extend
workspace_file_writes_without_updating_document to cover the missing-document
branch by constructing WorkspaceFile without calling workspace.open_file. Verify
write_to_disk updates the filesystem while WorkspaceFile::input still returns
the original source, preserving the existing assertions for changed path,
content, and version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/biome_cli/src/runner/process_file.rs`:
- Around line 518-573: Extend workspace_file_writes_without_updating_document to
cover the missing-document branch by constructing WorkspaceFile without calling
workspace.open_file. Verify write_to_disk updates the filesystem while
WorkspaceFile::input still returns the original source, preserving the existing
assertions for changed path, content, and version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5f77d80d-5385-4278-8d3e-2d9e1b72e59d

📥 Commits

Reviewing files that changed from the base of the PR and between 716c2a2 and 724ae92.

📒 Files selected for processing (5)
  • crates/biome_cli/src/runner/impls/process_file/format.rs
  • crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs
  • crates/biome_cli/src/runner/mod.rs
  • crates/biome_cli/src/runner/process_file.rs
  • crates/biome_lsp/src/server.rs
🚧 Files skipped from review as they are similar to previous changes (4)
  • crates/biome_lsp/src/server.rs
  • crates/biome_cli/src/runner/impls/process_file/format.rs
  • crates/biome_cli/src/runner/mod.rs
  • crates/biome_cli/src/runner/impls/process_file/lint_and_assist.rs

@ematipico
ematipico merged commit 899c60d into main Jul 15, 2026
41 of 42 checks passed
@ematipico
ematipico deleted the 01-workspace-document-only branch July 15, 2026 09:03
@github-actions github-actions Bot mentioned this pull request Jul 15, 2026
@stovmascript

stovmascript commented Jul 15, 2026 •

Copy link
Copy Markdown

This PR also fixed an unreported LSP bug — noting it since the changesets don't mention it.

On 2.5.3/2.5.4 with javascript.experimentalEmbeddedSnippetsEnabled, a source.fixAll.biome code action (even just pulling actions, without applying edits) puts the daemon in a state where textDocument/formatting for every document opened afterwards strips the leading newline and indentation from each embedded snippet, on already-formatted content:

export const Box = styled.div`
  color: red;
`;

becomes

export const Box = styled.div`color: red;
`;

The state persists in the daemon across connections and editors until biome stop. The CLI is unaffected.

Repro: https://github.com/stovmascript/biome-repro-lsp-embedded. Bisected with local builds: parent 9a66bc7 broken, this PR's merge commit 899c60d clean. Also confirmed in the editor: with the extension pointed at a main build, formatting stays clean after fixAll-on-save.

OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Client that referenced this pull request Jul 28, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev) ([source](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | imports | patch | [`2.5.4` -> `2.5.5`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.5.4/2.5.5) |

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

### [`v2.5.5`](https://github.com/biomejs/biome/blob/HEAD/packages/@&#8203;biomejs/biome/CHANGELOG.md#255)

[Compare Source](https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.4...@biomejs/biome@2.5.5)

##### Patch Changes

- [#&#8203;10972](biomejs/biome#10972) [`ab8c21b`](biomejs/biome@ab8c21b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) for unions of bigint literals. The rule now reports missing bigint cases and compares bigint literals by value, including binary, octal, hexadecimal, and separator-containing spellings. For example, this switch now reports the missing `2n` case:

  ```ts
  declare const value: 1n | 2n;
  switch (value) {
    case 1n:
      break;
  }
  ```

- [#&#8203;10972](biomejs/biome#10972) [`ab8c21b`](biomejs/biome@ab8c21b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed false positives in [`noBaseToString`](https://biomejs.dev/linter/rules/no-base-to-string/) and [`useNullishCoalescing`](https://biomejs.dev/linter/rules/use-nullish-coalescing/) when member, stringification, or nullish inference cannot complete. These rules now suppress diagnostics instead of reporting from partial type information. For example, neither expression is reported when a recursive type cannot be fully resolved:

  ```ts
  type Recursive = Recursive;
  declare const value: Recursive;

  String(value);
  value || "fallback";
  ```

- [#&#8203;10977](biomejs/biome#10977) [`0bf7486`](biomejs/biome@0bf7486) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10922](biomejs/biome#10922): the action [`useSortedAttributes`](https://biomejs.dev/assist/actions/use-sorted-attributes/) no longer triggers for HTML instructions.

- [#&#8203;10957](biomejs/biome#10957) [`cf263c4`](biomejs/biome@cf263c4) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [`noThenProperty`](https://biomejs.dev/linter/rules/no-then-property/) failing to detect `Object.fromEntries`, `Object.defineProperty`, and `Reflect.defineProperty` calls with comments between their tokens.

- [#&#8203;10983](biomejs/biome#10983) [`edc0ed7`](biomejs/biome@edc0ed7) Thanks [@&#8203;ayaangazali](https://github.com/ayaangazali)! - Fixed [#&#8203;10980](biomejs/biome#10980): [`useAriaPropsSupportedByRole`](https://biomejs.dev/linter/rules/use-aria-props-supported-by-role/) no longer reports false positives when the attribute that determines an element's implicit ARIA role is written as a shorthand attribute, such as `<a {href} aria-label="...">` in Astro and Svelte files.

  Shorthand attributes are now taken into account when computing the implicit role, so the anchor above correctly resolves to the `link` role instead of `generic`.

- [#&#8203;10889](biomejs/biome#10889) [`89526e3`](biomejs/biome@89526e3) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed CSS formatter casing for syntax-owned names while preserving author-defined names, including scoped keyframes and container scroll-state queries.

  ```diff
  - A:HOVER { COLOR: INITIAL; }
  + A:hover { color: initial; }
  - @&#8203;KEYFRAMES :GLOBAL KeepFrames { FROM { COLOR: RED; } }
  + @&#8203;keyframes :GLOBAL KeepFrames { from { color: RED; } }
  - @&#8203;CONTAINER scroll-state((SCROLLED: TOP) AND (STUCK)) { A:HOVER { COLOR: RED; } }
  + @&#8203;container scroll-state((SCROLLED: TOP) AND (STUCK)) { A:hover { color: RED; } }
  ```

- [#&#8203;10964](biomejs/biome#10964) [`794ccd0`](biomejs/biome@794ccd0) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed CSS formatting for comments between declaration values and `!important`.

  ```diff
  -a { color: /* before */ /* after */ red !important; }
  +a { color: /* before */ red /* after */ !important; }
  ```

- [#&#8203;10993](biomejs/biome#10993) [`b7a9694`](biomejs/biome@b7a9694) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed the CSS formatter to preserve comments on the correct side of selector combinators and before declaration blocks.

  ```diff
  -.before > /* comment */ .after {}
  +.before /* comment */ > .after {}
  ```

  It now also keeps selectors with escaped newlines in attribute values inline when they fit.

  ```diff
  -div
  -  span[foo="bar\
  +div span[foo="bar\
   value"] {}
  ```

- [#&#8203;10978](biomejs/biome#10978) [`8ebafe1`](biomejs/biome@8ebafe1) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10870](biomejs/biome#10870): [`noUnresolvedImports`](https://biomejs.dev/linter/rules/no-unresolved-imports/) no longer reports false positives such as `import type { NextRequest } from "next/server"`.

- [#&#8203;10901](biomejs/biome#10901) [`68c10e6`](biomejs/biome@68c10e6) Thanks [@&#8203;Socialpranker](https://github.com/Socialpranker)! - Fixed [#&#8203;10622](biomejs/biome#10622): the HTML/Vue parser no longer panics on the argument-less `v-bind` shorthand (`:="props"`).

  This syntax is valid Vue and equivalent to `v-bind="props"`, so the parser now accepts it (along with the longhand `v-bind:="props"`) instead of crashing while building a diagnostic for a missing argument.

- [#&#8203;10936](biomejs/biome#10936) [`7df46f5`](biomejs/biome@7df46f5) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Improved generic tuple inference for [`useIncludes`](https://biomejs.dev/linter/rules/use-includes/). The rule now recognizes specialised tuple element types returned through generic aliases.

- [#&#8203;10941](biomejs/biome#10941) [`f787725`](biomejs/biome@f787725) Thanks [@&#8203;siketyan](https://github.com/siketyan)! - Fixed [`#10855`](biomejs/biome#10855): Biome now supports parsing and formatting CSS custom media queries declared with [`@custom-media`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@&#8203;custom-media).

- [#&#8203;10969](biomejs/biome#10969) [`72d309b`](biomejs/biome@72d309b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed an issue where Biome logs became too verbose, dumping information not relevant to user's operations.

- [`e62f6b6`](biomejs/biome@e62f6b6) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10963](biomejs/biome#10963): Biome no longer panics when a type-aware rule such as [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) checks a call to a function with multiple call signatures imported from another module.

- [#&#8203;10931](biomejs/biome#10931) [`899c60d`](biomejs/biome@899c60d) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed `check --write` command. Now the command reports code frame of the formatted code, if the formatter is enabled.

- [#&#8203;10904](biomejs/biome#10904) [`ceee4f4`](biomejs/biome@ceee4f4) Thanks [@&#8203;qzwxsaedc](https://github.com/qzwxsaedc)! - Fixed [#&#8203;10892](biomejs/biome#10892): [`noUnnecessaryConditions`](https://biomejs.dev/linter/rules/no-unnecessary-conditions/) no longer reports a false positive when checking a member of a discriminated union that is accessed through a default type-only namespace import. The following code is no longer flagged:

  ```ts
  import type Types from "./types";

  declare function parse(): Types.Result<string>;
  const result = parse();
  if (!result.success) {
  }
  ```

- [#&#8203;10962](biomejs/biome#10962) [`f0a67f2`](biomejs/biome@f0a67f2) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Biome no longer removes embedded styles and scripts in HTML files.

- [#&#8203;11000](biomejs/biome#11000) [`5039a1e`](biomejs/biome@5039a1e) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed a bug where closing one editor stopped a shared Biome daemon used by other editors. LSP proxy processes now exit when either the editor or daemon disconnects.

- [#&#8203;10957](biomejs/biome#10957) [`cf263c4`](biomejs/biome@cf263c4) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Improved the performance of the [`noThenProperty`](https://biomejs.dev/linter/rules/no-then-property/) lint rule by about 50%.

- [#&#8203;10992](biomejs/biome#10992) [`4bf9b21`](biomejs/biome@4bf9b21) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/): The rule now reports Promise-returning callbacks where a synchronous callback is expected when calls use tuple spreads or tuple rest parameters, including generic and deeply nested tuples, and when constructor signatures come from interface or object types. Recursive or excessively nested tuple spreads use a conservative fallback so analysis terminates.

  For example, the following callback is now reported.

  ```ts
  declare function consume(...args: [number, () => void]): void;
  const prefix: [number] = [1];

  consume(...prefix, async () => {});
  ```

- [#&#8203;10915](biomejs/biome#10915) [`b3b12b3`](biomejs/biome@b3b12b3) Thanks [@&#8203;Functionhx](https://github.com/Functionhx)! - Added the rule [`noNegationInEqualityCheck`](https://biomejs.dev/linter/rules/no-negation-in-equality-check/). The rule flags negated expressions on the left side of strict equality checks like `!foo === bar` — due to operator precedence this evaluates as `(!foo) === bar` which is almost always a mistake for `foo !== bar`.

  The rule provides an unsafe fix that flips the operator.

  ```js
  // Invalid
  !foo === bar;
  !foo !== bar;

  // Valid
  foo !== bar;
  foo === bar;
  ```

- [#&#8203;10970](biomejs/biome#10970) [`bd1038b`](biomejs/biome@bd1038b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Improved overload selection for [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/). Biome now handles overloaded calls, overloaded constructors, rest parameters, union arguments, and generic constraints without selecting an incompatible signature. For example, `noMisusedPromises` now reports the async callback passed to the synchronous overload:

  ```ts
  declare function consume(kind: "async", callback: () => Promise<void>): void;
  declare function consume(kind: "sync", callback: () => void): void;
  consume("sync", async () => {});
  ```

- [#&#8203;10933](biomejs/biome#10933) [`48a4abb`](biomejs/biome@48a4abb) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [`useArrayFind`](https://biomejs.dev/linter/rules/use-array-find/) to recognize bigint zero indexes.

- [#&#8203;10931](biomejs/biome#10931) [`899c60d`](biomejs/biome@899c60d) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed an orchestration issue that could lead to deadlocks when type-aware rules are enabled.

- [#&#8203;10969](biomejs/biome#10969) [`72d309b`](biomejs/biome@72d309b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Hardened the Biome Language Server by improving its synchronisation logic.

- [#&#8203;10972](biomejs/biome#10972) [`ab8c21b`](biomejs/biome@ab8c21b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed false positives in [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/) and [`useAwaitThenable`](https://biomejs.dev/linter/rules/use-await-thenable/) when Promise or thenable inference cannot complete. These rules now suppress diagnostics instead of treating incomplete type information as a definite result. For example, `useAwaitThenable` no longer reports `await value` when the value's thenability is unknown:

  ```ts
  declare const value: unknown;

  async function consume() {
    await value;
  }
  ```

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNzIuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI3Mi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Client/pulls/14
OIRNOIR pushed a commit to OIRNOIR/YouTube-Helper-Server that referenced this pull request Jul 28, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@biomejs/biome](https://biomejs.dev) ([source](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome)) | imports | patch | [`2.5.4` -> `2.5.5`](https://renovatebot.com/diffs/npm/@biomejs%2fbiome/2.5.4/2.5.5) |

---

### Release Notes

<details>
<summary>biomejs/biome (@&#8203;biomejs/biome)</summary>

### [`v2.5.5`](https://github.com/biomejs/biome/blob/HEAD/packages/@&#8203;biomejs/biome/CHANGELOG.md#255)

[Compare Source](https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.4...@biomejs/biome@2.5.5)

##### Patch Changes

- [#&#8203;10972](biomejs/biome#10972) [`ab8c21b`](biomejs/biome@ab8c21b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [`useExhaustiveSwitchCases`](https://biomejs.dev/linter/rules/use-exhaustive-switch-cases/) for unions of bigint literals. The rule now reports missing bigint cases and compares bigint literals by value, including binary, octal, hexadecimal, and separator-containing spellings. For example, this switch now reports the missing `2n` case:

  ```ts
  declare const value: 1n | 2n;
  switch (value) {
    case 1n:
      break;
  }
  ```

- [#&#8203;10972](biomejs/biome#10972) [`ab8c21b`](biomejs/biome@ab8c21b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed false positives in [`noBaseToString`](https://biomejs.dev/linter/rules/no-base-to-string/) and [`useNullishCoalescing`](https://biomejs.dev/linter/rules/use-nullish-coalescing/) when member, stringification, or nullish inference cannot complete. These rules now suppress diagnostics instead of reporting from partial type information. For example, neither expression is reported when a recursive type cannot be fully resolved:

  ```ts
  type Recursive = Recursive;
  declare const value: Recursive;

  String(value);
  value || "fallback";
  ```

- [#&#8203;10977](biomejs/biome#10977) [`0bf7486`](biomejs/biome@0bf7486) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10922](biomejs/biome#10922): the action [`useSortedAttributes`](https://biomejs.dev/assist/actions/use-sorted-attributes/) no longer triggers for HTML instructions.

- [#&#8203;10957](biomejs/biome#10957) [`cf263c4`](biomejs/biome@cf263c4) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Fixed [`noThenProperty`](https://biomejs.dev/linter/rules/no-then-property/) failing to detect `Object.fromEntries`, `Object.defineProperty`, and `Reflect.defineProperty` calls with comments between their tokens.

- [#&#8203;10983](biomejs/biome#10983) [`edc0ed7`](biomejs/biome@edc0ed7) Thanks [@&#8203;ayaangazali](https://github.com/ayaangazali)! - Fixed [#&#8203;10980](biomejs/biome#10980): [`useAriaPropsSupportedByRole`](https://biomejs.dev/linter/rules/use-aria-props-supported-by-role/) no longer reports false positives when the attribute that determines an element's implicit ARIA role is written as a shorthand attribute, such as `<a {href} aria-label="...">` in Astro and Svelte files.

  Shorthand attributes are now taken into account when computing the implicit role, so the anchor above correctly resolves to the `link` role instead of `generic`.

- [#&#8203;10889](biomejs/biome#10889) [`89526e3`](biomejs/biome@89526e3) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed CSS formatter casing for syntax-owned names while preserving author-defined names, including scoped keyframes and container scroll-state queries.

  ```diff
  - A:HOVER { COLOR: INITIAL; }
  + A:hover { color: initial; }
  - @&#8203;KEYFRAMES :GLOBAL KeepFrames { FROM { COLOR: RED; } }
  + @&#8203;keyframes :GLOBAL KeepFrames { from { color: RED; } }
  - @&#8203;CONTAINER scroll-state((SCROLLED: TOP) AND (STUCK)) { A:HOVER { COLOR: RED; } }
  + @&#8203;container scroll-state((SCROLLED: TOP) AND (STUCK)) { A:hover { color: RED; } }
  ```

- [#&#8203;10964](biomejs/biome#10964) [`794ccd0`](biomejs/biome@794ccd0) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed CSS formatting for comments between declaration values and `!important`.

  ```diff
  -a { color: /* before */ /* after */ red !important; }
  +a { color: /* before */ red /* after */ !important; }
  ```

- [#&#8203;10993](biomejs/biome#10993) [`b7a9694`](biomejs/biome@b7a9694) Thanks [@&#8203;denbezrukov](https://github.com/denbezrukov)! - Fixed the CSS formatter to preserve comments on the correct side of selector combinators and before declaration blocks.

  ```diff
  -.before > /* comment */ .after {}
  +.before /* comment */ > .after {}
  ```

  It now also keeps selectors with escaped newlines in attribute values inline when they fit.

  ```diff
  -div
  -  span[foo="bar\
  +div span[foo="bar\
   value"] {}
  ```

- [#&#8203;10978](biomejs/biome#10978) [`8ebafe1`](biomejs/biome@8ebafe1) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10870](biomejs/biome#10870): [`noUnresolvedImports`](https://biomejs.dev/linter/rules/no-unresolved-imports/) no longer reports false positives such as `import type { NextRequest } from "next/server"`.

- [#&#8203;10901](biomejs/biome#10901) [`68c10e6`](biomejs/biome@68c10e6) Thanks [@&#8203;Socialpranker](https://github.com/Socialpranker)! - Fixed [#&#8203;10622](biomejs/biome#10622): the HTML/Vue parser no longer panics on the argument-less `v-bind` shorthand (`:="props"`).

  This syntax is valid Vue and equivalent to `v-bind="props"`, so the parser now accepts it (along with the longhand `v-bind:="props"`) instead of crashing while building a diagnostic for a missing argument.

- [#&#8203;10936](biomejs/biome#10936) [`7df46f5`](biomejs/biome@7df46f5) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Improved generic tuple inference for [`useIncludes`](https://biomejs.dev/linter/rules/use-includes/). The rule now recognizes specialised tuple element types returned through generic aliases.

- [#&#8203;10941](biomejs/biome#10941) [`f787725`](biomejs/biome@f787725) Thanks [@&#8203;siketyan](https://github.com/siketyan)! - Fixed [`#10855`](biomejs/biome#10855): Biome now supports parsing and formatting CSS custom media queries declared with [`@custom-media`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@&#8203;custom-media).

- [#&#8203;10969](biomejs/biome#10969) [`72d309b`](biomejs/biome@72d309b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed an issue where Biome logs became too verbose, dumping information not relevant to user's operations.

- [`e62f6b6`](biomejs/biome@e62f6b6) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [#&#8203;10963](biomejs/biome#10963): Biome no longer panics when a type-aware rule such as [`noFloatingPromises`](https://biomejs.dev/linter/rules/no-floating-promises/) checks a call to a function with multiple call signatures imported from another module.

- [#&#8203;10931](biomejs/biome#10931) [`899c60d`](biomejs/biome@899c60d) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed `check --write` command. Now the command reports code frame of the formatted code, if the formatter is enabled.

- [#&#8203;10904](biomejs/biome#10904) [`ceee4f4`](biomejs/biome@ceee4f4) Thanks [@&#8203;qzwxsaedc](https://github.com/qzwxsaedc)! - Fixed [#&#8203;10892](biomejs/biome#10892): [`noUnnecessaryConditions`](https://biomejs.dev/linter/rules/no-unnecessary-conditions/) no longer reports a false positive when checking a member of a discriminated union that is accessed through a default type-only namespace import. The following code is no longer flagged:

  ```ts
  import type Types from "./types";

  declare function parse(): Types.Result<string>;
  const result = parse();
  if (!result.success) {
  }
  ```

- [#&#8203;10962](biomejs/biome#10962) [`f0a67f2`](biomejs/biome@f0a67f2) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Biome no longer removes embedded styles and scripts in HTML files.

- [#&#8203;11000](biomejs/biome#11000) [`5039a1e`](biomejs/biome@5039a1e) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed a bug where closing one editor stopped a shared Biome daemon used by other editors. LSP proxy processes now exit when either the editor or daemon disconnects.

- [#&#8203;10957](biomejs/biome#10957) [`cf263c4`](biomejs/biome@cf263c4) Thanks [@&#8203;dyc3](https://github.com/dyc3)! - Improved the performance of the [`noThenProperty`](https://biomejs.dev/linter/rules/no-then-property/) lint rule by about 50%.

- [#&#8203;10992](biomejs/biome#10992) [`4bf9b21`](biomejs/biome@4bf9b21) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/): The rule now reports Promise-returning callbacks where a synchronous callback is expected when calls use tuple spreads or tuple rest parameters, including generic and deeply nested tuples, and when constructor signatures come from interface or object types. Recursive or excessively nested tuple spreads use a conservative fallback so analysis terminates.

  For example, the following callback is now reported.

  ```ts
  declare function consume(...args: [number, () => void]): void;
  const prefix: [number] = [1];

  consume(...prefix, async () => {});
  ```

- [#&#8203;10915](biomejs/biome#10915) [`b3b12b3`](biomejs/biome@b3b12b3) Thanks [@&#8203;Functionhx](https://github.com/Functionhx)! - Added the rule [`noNegationInEqualityCheck`](https://biomejs.dev/linter/rules/no-negation-in-equality-check/). The rule flags negated expressions on the left side of strict equality checks like `!foo === bar` — due to operator precedence this evaluates as `(!foo) === bar` which is almost always a mistake for `foo !== bar`.

  The rule provides an unsafe fix that flips the operator.

  ```js
  // Invalid
  !foo === bar;
  !foo !== bar;

  // Valid
  foo !== bar;
  foo === bar;
  ```

- [#&#8203;10970](biomejs/biome#10970) [`bd1038b`](biomejs/biome@bd1038b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Improved overload selection for [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/). Biome now handles overloaded calls, overloaded constructors, rest parameters, union arguments, and generic constraints without selecting an incompatible signature. For example, `noMisusedPromises` now reports the async callback passed to the synchronous overload:

  ```ts
  declare function consume(kind: "async", callback: () => Promise<void>): void;
  declare function consume(kind: "sync", callback: () => void): void;
  consume("sync", async () => {});
  ```

- [#&#8203;10933](biomejs/biome#10933) [`48a4abb`](biomejs/biome@48a4abb) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed [`useArrayFind`](https://biomejs.dev/linter/rules/use-array-find/) to recognize bigint zero indexes.

- [#&#8203;10931](biomejs/biome#10931) [`899c60d`](biomejs/biome@899c60d) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed an orchestration issue that could lead to deadlocks when type-aware rules are enabled.

- [#&#8203;10969](biomejs/biome#10969) [`72d309b`](biomejs/biome@72d309b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Hardened the Biome Language Server by improving its synchronisation logic.

- [#&#8203;10972](biomejs/biome#10972) [`ab8c21b`](biomejs/biome@ab8c21b) Thanks [@&#8203;ematipico](https://github.com/ematipico)! - Fixed false positives in [`noMisusedPromises`](https://biomejs.dev/linter/rules/no-misused-promises/) and [`useAwaitThenable`](https://biomejs.dev/linter/rules/use-await-thenable/) when Promise or thenable inference cannot complete. These rules now suppress diagnostics instead of treating incomplete type information as a definite result. For example, `useAwaitThenable` no longer reports `await value` when the value's thenability is unknown:

  ```ts
  declare const value: unknown;

  async function consume() {
    await value;
  }
  ```

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNzIuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI3Mi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://git.oirnoir.dev/OIRNOIR/YouTube-Helper-Server/pulls/31
@coderabbitai coderabbitai Bot mentioned this pull request Jul 30, 2026
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-LSP Area: language server protocol A-Project Area: project 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