Skip to content

refactor(oxfmt): handle gql-in-js by oxc_formatter_graphql#23319

Merged
graphite-app[bot] merged 1 commit into
mainfrom
06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql
Jun 29, 2026
Merged

refactor(oxfmt): handle gql-in-js by oxc_formatter_graphql#23319
graphite-app[bot] merged 1 commit into
mainfrom
06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql

Conversation

@leaysgur

@leaysgur leaysgur commented Jun 12, 2026

Copy link
Copy Markdown
Member
  • To use oxc_formatter_graphql in gql-in-js context, ground level refactoring was needed
  • Extracted common logic for handling embeddings into oxc_formatter_core
  • Updated other xxx-in-js callers to reflect these changes
  • Added a format_to_ir() method to each formatter in addition to the existing format() method

@github-actions github-actions Bot added A-cli Area - CLI A-formatter Area - Formatter labels Jun 12, 2026

leaysgur commented Jun 12, 2026

Copy link
Copy Markdown
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 changes, fast-track this PR to the front of the merge queue

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

codspeed-hq Bot commented Jun 12, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 4.92%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 5 improved benchmarks
✅ 47 untouched benchmarks
⏩ 19 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation formatter[errors.ts] 613.7 µs 571 µs +7.48%
Simulation isolated-declarations[vue-id.ts] 52.8 ms 49.7 ms +6.26%
Simulation formatter[handle-comments.js] 2.9 ms 2.8 ms +4.16%
Simulation formatter[index.tsx] 3.9 ms 3.8 ms +3.49%
Simulation formatter[core.js] 1.6 ms 1.6 ms +3.27%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql (72c79af) with 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql (f1baa02)2

Open in CodSpeed

Footnotes

  1. 19 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql (8a37dfb) during the generation of this report, so d8de5f7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch 2 times, most recently from ef8d246 to 16da3fc Compare June 12, 2026 07:47
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 324f25b to 722de94 Compare June 12, 2026 07:47
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch 2 times, most recently from a74bf8f to a48a730 Compare June 15, 2026 01:28
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 722de94 to 3638431 Compare June 15, 2026 01:28
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 3638431 to b7f2951 Compare June 15, 2026 09:19
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch from a48a730 to 9d2bc3d Compare June 15, 2026 09:19
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from b7f2951 to 7ae7015 Compare June 16, 2026 03:59
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch from 9d2bc3d to 328ceef Compare June 16, 2026 03:59
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 7ae7015 to faabba1 Compare June 16, 2026 09:33
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch from 328ceef to 3c01b58 Compare June 16, 2026 09:33
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch 2 times, most recently from 3596608 to 9fcdfd4 Compare June 25, 2026 00:58
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 3cade3e to 72d6ff3 Compare June 25, 2026 01:05
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch 4 times, most recently from e8e75dd to e95645e Compare June 25, 2026 15:02
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch from e95645e to ed1619f Compare June 26, 2026 07:00
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 3b3f0ae to f1baa02 Compare June 26, 2026 07:00
@leaysgur leaysgur force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from f1baa02 to 8a37dfb Compare June 29, 2026 02:31
@leaysgur leaysgur force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch from ed1619f to 72c79af Compare June 29, 2026 02:31
@graphite-app graphite-app Bot added the 0-merge Merge with Graphite Merge Queue label Jun 29, 2026
@graphite-app

graphite-app Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Merge activity

- To use `oxc_formatter_graphql` in gql-in-js context, ground level refactoring was needed
- Extracted common logic for handling embeddings into `oxc_formatter_core`
- Updated other `xxx-in-js` callers to reflect these changes
- Added a `format_to_ir()` method to each formatter in addition to the existing `format()` method
@graphite-app graphite-app Bot force-pushed the 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql branch from 8a37dfb to 01de9ec Compare June 29, 2026 02:55
@graphite-app graphite-app Bot force-pushed the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch from 72c79af to a7fd35e Compare June 29, 2026 02:56
Base automatically changed from 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql to main June 29, 2026 02:58
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jun 29, 2026
@graphite-app graphite-app Bot merged commit a7fd35e into main Jun 29, 2026
31 checks passed
@graphite-app graphite-app Bot deleted the 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql branch June 29, 2026 03:00
camc314 pushed a commit that referenced this pull request Jul 3, 2026
- To use `oxc_formatter_graphql` in gql-in-js context, ground level refactoring was needed
- Extracted common logic for handling embeddings into `oxc_formatter_core`
- Updated other `xxx-in-js` callers to reflect these changes
- Added a `format_to_ir()` method to each formatter in addition to the existing `format()` method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-formatter Area - Formatter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant