feat(napi): export all options using wildcard exports#15663
feat(napi): export all options using wildcard exports#15663
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the export strategy for three NAPI packages by switching from selective exports to wildcard exports (pub use module::*), ensuring all option types and supporting types are properly exposed to TypeScript/JavaScript consumers. This addresses issue #15618 where TreeShakeOptions and other types were missing from the public API.
- Replaced selective exports with wildcard exports in minify, parser, and playground packages
- Added missing TypeScript documentation for sort import options
- Removed redundant import statements in playground
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| napi/minify/src/lib.rs | Changed from selective exports to wildcard export to expose all minify option types including TreeShakeOptions |
| napi/parser/src/lib.rs | Changed from selective exports to wildcard export to expose all module record types (Span, ImportName, etc.) |
| napi/playground/src/lib.rs | Added wildcard export and removed redundant imports that are now exported via the wildcard |
| napi/playground/index.d.ts | Updated TypeScript declarations with new sort import options fields (newlinesBetween, groups) and improved documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
6134c64 to
f5ce55a
Compare
Closes #15618
🤖 Generated with Claude Code