Skip to content

fix(ast_visit): fix visitation order for TSTemplateLiteralType in Utf8ToUtf16Converter#11007

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-13-fix_ast_visit_fix_visitation_order_for_tstemplateliteraltype_in_utf8toutf16converter_
May 14, 2025
Merged

fix(ast_visit): fix visitation order for TSTemplateLiteralType in Utf8ToUtf16Converter#11007
graphite-app[bot] merged 1 commit intomainfrom
05-13-fix_ast_visit_fix_visitation_order_for_tstemplateliteraltype_in_utf8toutf16converter_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented May 13, 2025

Fix visitation order in Utf8ToUtf16Converter to process span offsets in ascending order in TSTemplateLiteralType.

quasis and types are interleaved, so to visit them in source order, need to visit quasis[0], types[0], quasis[1], types[1], quasis[2], etc.

Copy link
Member Author

overlookmotel commented May 13, 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 May 13, 2025

CodSpeed Instrumentation Performance Report

Merging #11007 will create unknown performance changes

Comparing 05-13-fix_ast_visit_fix_visitation_order_for_tstemplateliteraltype_in_utf8toutf16converter_ (282420c) with main (d0d04e3)

Summary

🆕 36 new benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 codegen[checker.ts] N/A 22.8 ms N/A
🆕 codegen_sourcemap[checker.ts] N/A 67 ms N/A
🆕 formatter[antd.js] N/A 714.7 ms N/A
🆕 formatter[react.development.js] N/A 8.1 ms N/A
🆕 formatter[typescript.js] N/A 1.1 s N/A
🆕 isolated-declarations[vue-id.ts] N/A 58.4 ms N/A
🆕 lexer[RadixUIAdoptionSection.jsx] N/A 21.7 µs N/A
🆕 lexer[antd.js] N/A 25 ms N/A
🆕 lexer[cal.com.tsx] N/A 6.1 ms N/A
🆕 lexer[checker.ts] N/A 14.9 ms N/A
🆕 lexer[pdf.mjs] N/A 4 ms N/A
🆕 linter[RadixUIAdoptionSection.jsx] N/A 2.8 ms N/A
🆕 linter[cal.com.tsx] N/A 1.2 s N/A
🆕 linter[checker.ts] N/A 3.1 s N/A
🆕 mangler[antd.js] N/A 16 ms N/A
🆕 mangler[react.development.js] N/A 293.9 µs N/A
🆕 mangler[typescript.js] N/A 39.6 ms N/A
🆕 minifier[antd.js] N/A 164.4 ms N/A
🆕 minifier[react.development.js] N/A 1.8 ms N/A
🆕 minifier[typescript.js] N/A 288.8 ms N/A
... ... ... ... ...

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

@overlookmotel overlookmotel force-pushed the 05-13-fix_ast_visit_fix_visitation_order_for_tstemplateliteraltype_in_utf8toutf16converter_ branch from 35caa35 to 53a2430 Compare May 13, 2025 17:09
@overlookmotel overlookmotel force-pushed the 05-12-fix_ast_visit_fix_visitation_order_for_bindingpattern_in_utf8toutf16converter_ branch from 3c210ef to 021aa8b Compare May 13, 2025 17:09
@overlookmotel overlookmotel marked this pull request as ready for review May 13, 2025 17:13
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label May 14, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented May 14, 2025

Merge activity

…Utf8ToUtf16Converter` (#11007)

Fix visitation order in `Utf8ToUtf16Converter` to process span offsets in ascending order in `TSTemplateLiteralType`.

`quasis` and `types` are interleaved, so to visit them in source order, need to visit `quasis[0]`, `types[0]`, `quasis[1]`, `types[1]`, `quasis[2]`, etc.
@graphite-app graphite-app bot force-pushed the 05-12-fix_ast_visit_fix_visitation_order_for_bindingpattern_in_utf8toutf16converter_ branch from 021aa8b to d0d04e3 Compare May 14, 2025 01:22
@graphite-app graphite-app bot force-pushed the 05-13-fix_ast_visit_fix_visitation_order_for_tstemplateliteraltype_in_utf8toutf16converter_ branch from 53a2430 to 282420c Compare May 14, 2025 01:23
Base automatically changed from 05-12-fix_ast_visit_fix_visitation_order_for_bindingpattern_in_utf8toutf16converter_ to main May 14, 2025 01:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 14, 2025
@graphite-app graphite-app bot merged commit 282420c into main May 14, 2025
27 checks passed
@graphite-app graphite-app bot deleted the 05-13-fix_ast_visit_fix_visitation_order_for_tstemplateliteraltype_in_utf8toutf16converter_ branch May 14, 2025 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant