Skip to content

feat(napi/transform): expose optimizeConstEnums and optimizeEnums options#21388

Merged
graphite-app[bot] merged 1 commit intomainfrom
feat/napi-transform-optimize-enums-options
Apr 15, 2026
Merged

feat(napi/transform): expose optimizeConstEnums and optimizeEnums options#21388
graphite-app[bot] merged 1 commit intomainfrom
feat/napi-transform-optimize-enums-options

Conversation

@Dunqing
Copy link
Copy Markdown
Member

@Dunqing Dunqing commented Apr 13, 2026

Surface the TypeScript transformer's optimize_const_enums and
optimize_enums options through the napi bindings so JavaScript
consumers can opt into const enum inlining and regular (non-const)
enum inlining. Previously both were hardcoded to false in the
From<TypeScriptOptions> conversion, making them unreachable from JS.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Copy link
Copy Markdown
Member Author

Dunqing commented Apr 13, 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 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.

@github-actions github-actions Bot added A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request labels Apr 13, 2026
@Dunqing Dunqing marked this pull request as ready for review April 14, 2026 02:06
@Dunqing Dunqing requested a review from Boshen April 14, 2026 02:06
@Dunqing
Copy link
Copy Markdown
Member Author

Dunqing commented Apr 14, 2026

I forgot to export in #20508

@Dunqing Dunqing force-pushed the feat/napi-transform-optimize-enums-options branch from 60a8717 to efa847a Compare April 15, 2026 01:13
@Dunqing
Copy link
Copy Markdown
Member Author

Dunqing commented Apr 15, 2026

The PR is clean and obvious, so merge it without reviewing.

@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Apr 15, 2026
Copy link
Copy Markdown
Member Author

Dunqing commented Apr 15, 2026

Merge activity

… options (#21388)

Surface the TypeScript transformer's `optimize_const_enums` and
`optimize_enums` options through the napi bindings so JavaScript
consumers can opt into const enum inlining and regular (non-const)
enum inlining. Previously both were hardcoded to `false` in the
`From<TypeScriptOptions>` conversion, making them unreachable from JS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@graphite-app graphite-app Bot force-pushed the feat/napi-transform-optimize-enums-options branch from efa847a to f5deb55 Compare April 15, 2026 03:22
@graphite-app graphite-app Bot merged commit f5deb55 into main Apr 15, 2026
24 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 15, 2026
@graphite-app graphite-app Bot deleted the feat/napi-transform-optimize-enums-options branch April 15, 2026 03:26
Dunqing added a commit that referenced this pull request Apr 16, 2026
### 💥 BREAKING CHANGES

- 24fb7eb allocator: [**BREAKING**] Rename `Box` and `Vec` methods
(#21395) (overlookmotel)

### 🚀 Features

- ce5072d parser: Support `turbopack` magic comments (#20803) (Kane
Wang)
- f5deb55 napi/transform: Expose `optimizeConstEnums` and
`optimizeEnums` options (#21388) (Dunqing)
- 24b03de data_structures: Introduce `NonNullConst` and `NonNullMut`
pointer types (#21425) (overlookmotel)

### 🐛 Bug Fixes

- d7a359a ecmascript: Treat update expressions as unconditionally
side-effectful (#21456) (Dunqing)
- 56af2f4 transformer/async-to-generator: Correct scope of inferred
named FE in async-to-generator (#21458) (Dunqing)
- b3ed467 minifier: Avoid illegal `var;` when folding unused arguments
copy loop (#21421) (fazba)
- b0e8f13 minifier: Preserve `var` inside `catch` with same-named
parameter (#21366) (Dunqing)
- 4fb73a7 transformer/typescript: Preserve execution order for accessor
with `useDefineForClassFields: false` (#21369) (Dunqing)

### ⚡ Performance

- da3cc16 parser: Refactor out `LexerContext` (#21275) (Ulrich Stark)

### 📚 Documentation

- c5b19bb allocator: Reformat comments in `Arena` (#21448)
(overlookmotel)
- 091e88e lexer: Update doc comment about perf benefit of reading
through references (#21423) (overlookmotel)
- 922cbee allocator: Remove references to "bump" from comments (#21397)
(overlookmotel)

Co-authored-by: Dunqing <29533304+Dunqing@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant