Skip to content

refactor(estree/tokens): move JSON-related code into subdirectory#19869

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-01-refactor_estree_tokens_move_json-related_code_into_subdirectory
Mar 1, 2026
Merged

refactor(estree/tokens): move JSON-related code into subdirectory#19869
graphite-app[bot] merged 1 commit intomainfrom
om/03-01-refactor_estree_tokens_move_json-related_code_into_subdirectory

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 1, 2026

Pure refactor.

After #19867, TokenType is only used in JSON serialization. Create a subdirectory to contain JSON-related code and types, and move token_type.rs and u32_string.rs into it, since they're not used in raw transfer conversion.

Copy link
Member Author

overlookmotel commented Mar 1, 2026


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 March 1, 2026 10:05
Copilot AI review requested due to automatic review settings March 1, 2026 10:05
@overlookmotel overlookmotel self-assigned this Mar 1, 2026
@overlookmotel overlookmotel added A-parser Area - Parser A-linter-plugins Area - Linter JS plugins labels Mar 1, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors oxc_estree_tokens to better scope JSON-only helpers by moving TokenType and U32String into the json/ submodule, reflecting that they are only used during JSON serialization.

Changes:

  • Remove top-level module declarations for token_type and u32_string.
  • Add json/token_type.rs and json/u32_string.rs and wire them into json/mod.rs.
  • Update json/mod.rs imports to use the new submodule locations.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
crates/oxc_estree_tokens/src/lib.rs Stops declaring JSON-only helper modules at the crate root.
crates/oxc_estree_tokens/src/json/mod.rs Declares and imports token_type / u32_string as JSON-internal submodules.
crates/oxc_estree_tokens/src/json/token_type.rs Adds TokenType wrapper colocated with JSON serialization code.
crates/oxc_estree_tokens/src/json/u32_string.rs Adds U32String wrapper colocated with JSON serialization code.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 1, 2026

Merging this PR will not alter performance

✅ 53 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/03-01-refactor_estree_tokens_move_json-related_code_into_subdirectory (229a1e9) with om/03-01-refactor_estree_tokens_shorten_code (13e7557)2

Open in CodSpeed

Footnotes

  1. 3 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 om/03-01-refactor_estree_tokens_shorten_code (3226c14) during the generation of this report, so 62a08d8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 1, 2026

Merge activity

@graphite-app graphite-app bot changed the base branch from om/03-01-refactor_estree_tokens_shorten_code to graphite-base/19869 March 1, 2026 17:07
@graphite-app graphite-app bot changed the base branch from graphite-base/19869 to main March 1, 2026 17:14
…9869)

Pure refactor.

After #19867, `TokenType` is only used in JSON serialization. Create a subdirectory to contain JSON-related code and types, and move `token_type.rs` and `u32_string.rs` into it, since they're not used in raw transfer conversion.
@graphite-app graphite-app bot force-pushed the om/03-01-refactor_estree_tokens_move_json-related_code_into_subdirectory branch from 6ef7e2f to 4636d4f Compare March 1, 2026 17:14
@graphite-app graphite-app bot merged commit 4636d4f into main Mar 1, 2026
21 checks passed
@graphite-app graphite-app bot deleted the om/03-01-refactor_estree_tokens_move_json-related_code_into_subdirectory branch March 1, 2026 17:20
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter-plugins Area - Linter JS plugins A-parser Area - Parser 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