fix: avoid unresolved embedded CSS tag ranges#9631
Conversation
🦋 Changeset detectedLatest commit: d537d39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR resolves a crash that occurred when Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Fixes #9625 by keeping JS embedded-snippet delegation aligned with the service's current extraction behavior.
The service currently only extracts single-chunk tagged templates as embedded snippets, but the JS formatter could still emit embedded markers for later multi-chunk templates in the same file. When a file mixed a formatable styled-components template with a later interpolation like
${({ theme }) => css``};, that left unresolved embedded tags and triggered an internal formatter error.This change only delegates embedded formatting for single-chunk template literals, which matches the service today and avoids the unresolved-tag crash. It also adds a workspace regression test for the exact reported styled-components repro and a changeset for the user-visible formatter fix.
Test Plan
cargo test -p biome_service issue_9625cargo test -p biome_service format_js_with_embedded_csscargo fmt --all --checkExpected end tag of kind Embedded but found Groupformatter error afterward.Docs