Skip to content

refactor(transformer/jsx): avoid span() method calls#9226

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-19-refactor_transformer_jsx_avoid_span_method_calls
Feb 19, 2025
Merged

refactor(transformer/jsx): avoid span() method calls#9226
graphite-app[bot] merged 1 commit intomainfrom
02-19-refactor_transformer_jsx_avoid_span_method_calls

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 19, 2025

Tiny refactor of JSX transform.

We already matched on name: JSXAttributeName and have a reference to the JSXIdentifier it contains, so just get span from it directly, rather than calling name.span() which branches on the type of name again.

@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label Feb 19, 2025
Copy link
Member Author

overlookmotel commented Feb 19, 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.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Feb 19, 2025
@overlookmotel overlookmotel marked this pull request as ready for review February 19, 2025 12:08
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 19, 2025

CodSpeed Performance Report

Merging #9226 will not alter performance

Comparing 02-19-refactor_transformer_jsx_avoid_span_method_calls (8fe8937) with main (90ba283)

Summary

✅ 33 untouched benchmarks

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

graphite-app bot commented Feb 19, 2025

Merge activity

Tiny refactor of JSX transform.

We already matched on `name: JSXAttributeName` and have a reference to the `JSXIdentifier` it contains, so just get `span` from it directly, rather than calling `name.span()` which branches on the type of `name` again.
@graphite-app graphite-app bot force-pushed the 02-19-refactor_transformer_jsx_avoid_span_method_calls branch from 4251524 to 8fe8937 Compare February 19, 2025 14:45
@graphite-app graphite-app bot merged commit 8fe8937 into main Feb 19, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-19-refactor_transformer_jsx_avoid_span_method_calls branch February 19, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants