Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jun 20, 2025

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

The only place we use this method is in React transform. Add a test for it there.

@github-actions github-actions bot added A-ast Area - AST A-transformer Area - Transformer / Transpiler C-bug Category - Bug labels Jun 20, 2025
Copy link
Member Author


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.

@overlookmotel overlookmotel marked this pull request as ready for review June 20, 2025 11:27
@codspeed-hq
Copy link

codspeed-hq bot commented Jun 20, 2025

CodSpeed Instrumentation Performance Report

Merging #11829 will not alter performance

Comparing 06-20-fix_ast_computedmemberexpression_static_property_name_use_cooked_for_templateelement_s (023d370) with main (816ff03)

Summary

✅ 38 untouched benchmarks

@Boshen Boshen merged commit 8627ced into main Jun 23, 2025
27 checks passed
@Boshen Boshen deleted the 06-20-fix_ast_computedmemberexpression_static_property_name_use_cooked_for_templateelement_s branch June 23, 2025 04:47
graphite-app bot pushed a commit that referenced this pull request Jun 24, 2025
…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"`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants