Skip to content

fix(parser): update ident reference check in jsx#13819

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/09-16-fix_parser_update_ident_reference_check_in_jsx
Sep 16, 2025
Merged

fix(parser): update ident reference check in jsx#13819
graphite-app[bot] merged 1 commit intomainfrom
c/09-16-fix_parser_update_ident_reference_check_in_jsx

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Sep 16, 2025

https://github.com/microsoft/typescript/blob/1c4083f4edc71cb1744a62013732e3c95d05a035/src/compiler/utilities.ts#L6189-L6192

This directly copies TS's implementation - non-ascii characters are always references (vs intrinsic elements)

closes #13817

@github-actions github-actions bot added A-parser Area - Parser C-bug Category - Bug labels Sep 16, 2025
Copy link
Contributor Author

camc314 commented Sep 16, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 requested a review from Boshen September 16, 2025 09:31
@camc314 camc314 marked this pull request as ready for review September 16, 2025 09:31
Copilot AI review requested due to automatic review settings September 16, 2025 09:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the JSX element name parsing logic to properly identify component references versus intrinsic elements, aligning with TypeScript's implementation. The key change is that non-ASCII characters are now always treated as component references rather than intrinsic elements.

  • Updated the logic for determining JSX element references to match TypeScript's behavior
  • Simplified ASCII character checking using is_ascii_lowercase() instead of manual byte comparison
  • Added proper handling for non-ASCII Unicode identifiers as component references

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 16, 2025

CodSpeed Instrumentation Performance Report

Merging #13819 will not alter performance

Comparing c/09-16-fix_parser_update_ident_reference_check_in_jsx (00e4477) with main (4bc12d0)1

Summary

✅ 37 untouched

Footnotes

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

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Sep 16, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 16, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/09-16-fix_parser_update_ident_reference_check_in_jsx branch from 4e5f887 to 00e4477 Compare September 16, 2025 10:11
@graphite-app graphite-app bot merged commit 00e4477 into main Sep 16, 2025
27 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 16, 2025
@graphite-app graphite-app bot deleted the c/09-16-fix_parser_update_ident_reference_check_in_jsx branch September 16, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants