fix(grit): fix queries for export { $foo } ...#9586
Conversation
🦋 Changeset detectedLatest commit: 7bd2c4a 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 |
Parser conformance results onjs/262
jsx/babel
markdown/commonmark
symbols/microsoft
ts/babel
ts/microsoft
|
Merging this PR will not alter performance
Comparing Footnotes
|
|
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 (1)
WalkthroughThis PR enables Grit pattern matching for named export-from statements by introducing Possibly related PRs
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)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/biome_js_syntax/src/export_ext.rs (1)
62-65: Doc comments reference outdated type name.The example output at lines 63-65 still shows
AnyIdentifier::JsLiteralExportName("foo")andAnyIdentifier::JsLiteralExportName("baz"), but the type has been changed toAnyJsLiteralExportName.📝 Suggested doc update
/// [ -/// ExportedItem { identifier: Some(AnyIdentifier::JsLiteralExportName("foo")), exported: None, is_default: false }, -/// ExportedItem { identifier: Some(AnyIdentifier::JsLiteralExportName("baz")), exported: None, is_default: false }, +/// ExportedItem { identifier: Some(AnyIdentifier::AnyJsLiteralExportName("foo")), exported: None, is_default: false }, +/// ExportedItem { identifier: Some(AnyIdentifier::AnyJsLiteralExportName("baz")), exported: None, is_default: false }, /// ]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/biome_js_syntax/src/export_ext.rs` around lines 62 - 65, Update the doc comment example in export_ext.rs to reflect the new type name: replace occurrences of AnyIdentifier::JsLiteralExportName(...) with the updated AnyJsLiteralExportName(...) so the sample ExportedItem output uses identifier: Some(AnyJsLiteralExportName("foo")) and identifier: Some(AnyJsLiteralExportName("baz")); ensure the rest of the ExportedItem fields (exported, is_default) remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@crates/biome_js_syntax/src/export_ext.rs`:
- Around line 62-65: Update the doc comment example in export_ext.rs to reflect
the new type name: replace occurrences of
AnyIdentifier::JsLiteralExportName(...) with the updated
AnyJsLiteralExportName(...) so the sample ExportedItem output uses identifier:
Some(AnyJsLiteralExportName("foo")) and identifier:
Some(AnyJsLiteralExportName("baz")); ensure the rest of the ExportedItem fields
(exported, is_default) remain unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f619c6ae-3db6-41aa-8f56-afaf7bdcf940
⛔ Files ignored due to path filters (5)
crates/biome_grit_patterns/tests/specs/ts/export_named_from_patterns.snapis excluded by!**/*.snapand included by**crates/biome_js_factory/src/generated/node_factory.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_js_factory/src/generated/syntax_factory.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_js_syntax/src/generated/nodes.rsis excluded by!**/generated/**,!**/generated/**and included by**crates/biome_js_syntax/src/generated/nodes_mut.rsis excluded by!**/generated/**,!**/generated/**and included by**
📒 Files selected for processing (13)
.changeset/fix-grit-export-named-from.mdcrates/biome_grit_patterns/src/grit_target_language.rscrates/biome_grit_patterns/src/pattern_compiler/snippet_compiler.rscrates/biome_grit_patterns/tests/specs/ts/export_named_from_patterns.gritcrates/biome_grit_patterns/tests/specs/ts/export_named_from_patterns.tscrates/biome_js_analyze/src/lint/nursery/no_redundant_default_export.rscrates/biome_js_formatter/src/generated.rscrates/biome_js_formatter/src/js/any/literal_export_name.rscrates/biome_js_formatter/src/js/any/mod.rscrates/biome_js_parser/src/syntax/module.rscrates/biome_js_syntax/src/export_ext.rscrates/biome_js_syntax/src/identifier_ext.rsxtask/codegen/js.ungram
✅ Files skipped from review due to trivial changes (8)
- crates/biome_grit_patterns/src/grit_target_language.rs
- crates/biome_grit_patterns/tests/specs/ts/export_named_from_patterns.grit
- crates/biome_js_analyze/src/lint/nursery/no_redundant_default_export.rs
- crates/biome_grit_patterns/tests/specs/ts/export_named_from_patterns.ts
- .changeset/fix-grit-export-named-from.md
- crates/biome_js_formatter/src/js/any/mod.rs
- crates/biome_js_formatter/src/js/any/literal_export_name.rs
- crates/biome_js_formatter/src/generated.rs
🚧 Files skipped from review as they are similar to previous changes (2)
- crates/biome_js_parser/src/syntax/module.rs
- xtask/codegen/js.ungram
Summary
This pr fixes queries like
`export { $foo } from "..."`that previously didn't workgenerated by gpt 5.4
fixes #8828
Test Plan
snapshots, tests
Docs