Skip to content

refactor(napi/parser): freeze visitorKeys export#14012

Merged
graphite-app[bot] merged 1 commit intomainfrom
09-22-refactor_napi_parser_freeze_visitorkeys_export
Sep 22, 2025
Merged

refactor(napi/parser): freeze visitorKeys export#14012
graphite-app[bot] merged 1 commit intomainfrom
09-22-refactor_napi_parser_freeze_visitorkeys_export

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Sep 22, 2025

Freeze visitorKeys which oxc-parser exports. This follows TS-ESLint, and will be useful for oxlint.

@github-actions github-actions bot added A-parser Area - Parser A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Sep 22, 2025
Copy link
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 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 September 22, 2025 20:45
Copilot AI review requested due to automatic review settings September 22, 2025 20:45
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

This PR adds immutability to the visitorKeys export from oxc-parser by wrapping it with Object.freeze(). This follows the pattern established by TS-ESLint and enhances the API design for consumers like oxlint.

Key Changes

  • Wraps the exported visitor keys object with Object.freeze() to prevent runtime modifications

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@overlookmotel overlookmotel self-assigned this Sep 22, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Sep 22, 2025
Copy link
Member Author

overlookmotel commented Sep 22, 2025

Merge activity

Freeze `visitorKeys` which `oxc-parser` exports. This follows TS-ESLint, and will be useful for `oxlint`.
@graphite-app graphite-app bot force-pushed the 09-22-refactor_napi_parser_freeze_visitorkeys_export branch from 536a2ac to e0be08b Compare September 22, 2025 20:50
@graphite-app graphite-app bot merged commit e0be08b into main Sep 22, 2025
17 checks passed
@graphite-app graphite-app bot deleted the 09-22-refactor_napi_parser_freeze_visitorkeys_export branch September 22, 2025 20:54
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 22, 2025
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 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