Skip to content

fix(transformer/styled-components): template literal expressions order is wrong after minification#12211

Merged
graphite-app[bot] merged 1 commit intomainfrom
07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification
Jul 11, 2025
Merged

fix(transformer/styled-components): template literal expressions order is wrong after minification#12211
graphite-app[bot] merged 1 commit intomainfrom
07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Jul 11, 2025

Related: #12202

swap_remove will swap the last element to the index you want to remove, so this will cause the expression's order to be incorrect. Here is order sensitive, so we can't use swap_remove.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-bug Category - Bug labels Jul 11, 2025
Copy link
Member Author

Dunqing commented Jul 11, 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 Jul 11, 2025

CodSpeed Instrumentation Performance Report

Merging #12211 will not alter performance

Comparing 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification (e93e4c8) with main (1920c6b)

Summary

✅ 34 untouched benchmarks

@Dunqing Dunqing marked this pull request as ready for review July 11, 2025 01:50
@Dunqing Dunqing requested a review from overlookmotel as a code owner July 11, 2025 01:50
@Dunqing Dunqing force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 5529cef to 0c432f4 Compare July 11, 2025 01:58
@Dunqing Dunqing force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 0c432f4 to 6347a6c Compare July 11, 2025 03:03
@Dunqing Dunqing force-pushed the 07-10-test_transformer_styled-components_add_failing_test_case_for_comment_removal branch from 6749f11 to 75fb8cc Compare July 11, 2025 05:18
@Dunqing Dunqing force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 6347a6c to 23644b5 Compare July 11, 2025 05:18
@Dunqing Dunqing force-pushed the 07-10-test_transformer_styled-components_add_failing_test_case_for_comment_removal branch from 75fb8cc to a2be0e0 Compare July 11, 2025 05:20
@Dunqing Dunqing force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 23644b5 to 0928f4a Compare July 11, 2025 05:20
@Dunqing Dunqing force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 0928f4a to bdccba7 Compare July 11, 2025 07:09
@Dunqing Dunqing force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from bdccba7 to 00cd55e Compare July 11, 2025 07:40
@graphite-app graphite-app bot changed the base branch from 07-10-test_transformer_styled-components_add_failing_test_case_for_comment_removal to graphite-base/12211 July 11, 2025 09:09
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Copy link
Member

overlookmotel commented Jul 11, 2025

Merge activity

  • Jul 11, 9:10 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 11, 9:10 AM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Jul 11, 9:21 AM UTC: The Graphite merge queue couldn't merge this PR because it had conflicts with the trunk branch.
  • Jul 11, 9:39 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 11, 9:47 AM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Jul 11, 9:55 AM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
@graphite-app graphite-app bot changed the base branch from graphite-base/12211 to main July 11, 2025 09:19
@overlookmotel overlookmotel force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 00cd55e to 08bc7ca Compare July 11, 2025 09:39
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
…r is wrong after minification (#12211)

Related: #12202

`swap_remove` will swap the last element to the index you want to remove, so this will cause the expression's order to be incorrect. Here is order sensitive, so we can't use `swap_remove`.
@graphite-app graphite-app bot force-pushed the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch from 08bc7ca to e93e4c8 Compare July 11, 2025 09:47
@graphite-app graphite-app bot merged commit e93e4c8 into main Jul 11, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 07-11-fix_transformer_styled-components_template_literal_expressions_order_is_wrong_after_minification branch July 11, 2025 09:55
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants