Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jun 24, 2025

Same as #11829. MemberExpression::static_property_info use cooked not raw for TemplateElements.

The value of a template literal is the cooked version. e.g. obj[`\x41`] -> property name "A" not "\x41".

@github-actions github-actions bot added A-ast Area - AST C-bug Category - Bug labels Jun 24, 2025
Copy link
Member Author

overlookmotel commented Jun 24, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 24, 2025

CodSpeed Instrumentation Performance Report

Merging #11879 will create unknown performance changes

Comparing 06-24-fix_ast_memberexpression_static_property_info_use_cooked_not_raw_for_templateelement_s (fe78dcf) with main (168f776)

Summary

🆕 38 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 codegen[RadixUIAdoptionSection.jsx] N/A 132.3 µs N/A
🆕 codegen[binder.ts] N/A 4.8 ms N/A
🆕 codegen[cal.com.tsx] N/A 38.8 ms N/A
🆕 codegen[react.development.js] N/A 2.2 ms N/A
🆕 formatter[RadixUIAdoptionSection.jsx] N/A 315.1 µs N/A
🆕 formatter[binder.ts] N/A 20 ms N/A
🆕 formatter[cal.com.tsx] N/A 156.8 ms N/A
🆕 formatter[react.development.js] N/A 9.8 ms N/A
🆕 lexer[RadixUIAdoptionSection.jsx] N/A 21 µs N/A
🆕 lexer[binder.ts] N/A 930 µs N/A
🆕 lexer[cal.com.tsx] N/A 5.8 ms N/A
🆕 lexer[react.development.js] N/A 384 µs N/A
🆕 linter[RadixUIAdoptionSection.jsx] N/A 2.6 ms N/A
🆕 linter[binder.ts] N/A 149.9 ms N/A
🆕 linter[cal.com.tsx] N/A 1.2 s N/A
🆕 linter[react.development.js] N/A 54.9 ms N/A
🆕 mangler[RadixUIAdoptionSection.jsx] N/A 14.2 µs N/A
🆕 mangler[binder.ts] N/A 805.3 µs N/A
🆕 mangler[cal.com.tsx] N/A 3.1 ms N/A
🆕 mangler[react.development.js] N/A 284.5 µs N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

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

graphite-app bot commented Jun 24, 2025

Merge activity

…raw` for `TemplateElement`s (#11879)

Same as #11829. `MemberExpression::static_property_info` use `cooked` not `raw` for `TemplateElement`s.

The value of a template literal is the cooked version. e.g. ``obj[`\x41`]`` -> property name `"A"` not `"\x41"`.
@graphite-app graphite-app bot force-pushed the 06-24-test_linter_no-console_add_more_tests branch from 3e1d6cf to 168f776 Compare June 24, 2025 13:35
@graphite-app graphite-app bot requested a review from camc314 as a code owner June 24, 2025 13:35
@graphite-app graphite-app bot force-pushed the 06-24-fix_ast_memberexpression_static_property_info_use_cooked_not_raw_for_templateelement_s branch from 25ee137 to fe78dcf Compare June 24, 2025 13:35
graphite-app bot pushed a commit that referenced this pull request Jun 24, 2025
Instead of iterating over `allow` and recalculating the static property name on each turn of the loop, check if the property name is allowed once it's already calculated with `MemberExpression::static_property_info`.

This PR also ensures that the fix made in #11879 works. If not stacked on top of that PR, one of the tests added in #11878 fails.
Base automatically changed from 06-24-test_linter_no-console_add_more_tests to main June 24, 2025 13:38
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jun 24, 2025
@graphite-app graphite-app bot merged commit fe78dcf into main Jun 24, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 06-24-fix_ast_memberexpression_static_property_info_use_cooked_not_raw_for_templateelement_s branch June 24, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants