refactor: simplify __export runtime helper to create target object internally#6114
Merged
graphite-app[bot] merged 1 commit intomainfrom Sep 10, 2025
Merged
Conversation
Member
Author
How to use the Graphite Merge QueueAdd the label graphite: merge to this PR to add it to 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. |
__export
✅ Deploy Preview for rolldown-rs canceled.
|
__export runtime helper to create target object internally
488ab5c to
9ddb743
Compare
@rolldown/browser
@rolldown/debug
@rolldown/pluginutils
rolldown
@rolldown/binding-android-arm64
@rolldown/binding-darwin-arm64
@rolldown/binding-darwin-x64
@rolldown/binding-freebsd-x64
@rolldown/binding-linux-arm-gnueabihf
@rolldown/binding-linux-arm64-gnu
@rolldown/binding-linux-arm64-musl
@rolldown/binding-linux-x64-gnu
@rolldown/binding-linux-x64-musl
@rolldown/binding-openharmony-arm64
@rolldown/binding-wasm32-wasi
@rolldown/binding-win32-arm64-msvc
@rolldown/binding-win32-ia32-msvc
@rolldown/binding-win32-x64-msvc
commit: |
Contributor
Benchmarks Rust
|
349f751 to
e563318
Compare
Contributor
Merge activity
|
e563318 to
496b52f
Compare
hyf0
approved these changes
Sep 10, 2025
…internally (#6114) Since the first argument of `__export` is always `{}`, moving it into the function body could reduce output size a little.
1b26f9f to
dccd0f3
Compare
496b52f to
47633cd
Compare
Base automatically changed from
09-10-revert_chore_revert_refactor_simplify_module_namespace_construction_5939_6117_
to
main
September 10, 2025 14:12
Boshen
added a commit
that referenced
this pull request
Sep 10, 2025
## [1.0.0-beta.37] - 2025-09-10 ### 🚀 Features - partial align with const inline strategy with oxc in smart mode (#6126) by @IWANABETHATGUY - dev: use PathsMut for non-debounced RecommendedWatcher (#6120) by @sapphi-red - dev: return whether the build is already scheduled from `scheduleBuildIfStale` method (#6116) by @sapphi-red - handle errors from `BundlerBuilder#build` (#6104) by @shulaoda - add debounceTickRate option for debounced watchers (#6113) by @hyf0 - support full build in `incrementalBuild` mode (#6098) by @IWANABETHATGUY - add compare_contents_for_polling option to dev watcher (#6108) by @hyf0 - dev: add `scheduleBuildIfStale` method to DevEngine (#6087) by @sapphi-red - dev: return changed files in onHmrUpdates callback (#6086) by @sapphi-red - support function config with custom CLI arguments (#6076) by @IWANABETHATGUY - improve `MISSING_EXPORT` warning to suggest `type` modifier (#6085) by @sapphi-red - crates/rolldown_watcher: introduce `PathsMut` to batch watch/unwatch behaviors (#6075) by @hyf0 - enable `treeshake.commonjs` by default (#6072) by @IWANABETHATGUY - dev: add debounce control and PollWatcher support to DevWatchOptions (#6070) by @hyf0 ### 🐛 Bug Fixes - use kqueue for file watch on mac (#6124) by @sapphi-red - use patched notify for better file change event debouncing (#6125) by @sapphi-red - support passing all js primitive value for `alias` plugin (#6123) by @IWANABETHATGUY - track spans in member expression properties for accurate sourcemaps (#6100) by @IWANABETHATGUY - correctly handle inlined CommonJS exports in member expressions (#6090) by @IWANABETHATGUY - dev: ensure patch file names to be unique (#6096) by @sapphi-red - dev: normalize slash on Windows before comparing paths (#6095) by @sapphi-red - dev/watch: debounce duration should default to 10 (#6078) by @hyf0 ### 🚜 Refactor - simplify `__export` runtime helper to create target object internally (#6114) by @IWANABETHATGUY - simplify module_namespace construction second try (#6118) by @IWANABETHATGUY - simplify module_namespace construction (#5939) by @IWANABETHATGUY - optimize member expression creation in AstSnippet (#6091) by @IWANABETHATGUY - test-dev-server: sensible watcher configuration for CI env (#6077) by @hyf0 ### 🧪 Testing - dev: apply HMR edits on Windows (#6094) by @sapphi-red ### ⚙️ Miscellaneous Tasks - Revert "chore: adjust breaking change template of cliff (#6069)" (#6130) by @IWANABETHATGUY - test-dev-server: improve hmr test configuration (#6115) by @hyf0 - deps: update dependency rolldown-plugin-dts to v0.16.2 (#6128) by @renovate[bot] - Revert "refactor: simplify module_namespace construction (#5939)" (#6117) by @IWANABETHATGUY - test-dev-server: optimize test log output (#6107) by @hyf0 - enable compare_contents_for_polling and update poll interval for CI test-dev-server (#6110) by @hyf0 - deps: update dependency vite to v7.1.5 [security] (#6111) by @renovate[bot] - fix warnings reported by `just lint` (#6105) by @shulaoda - deps: update dependency tsdown to v0.15.0 (#6102) by @renovate[bot] - use debug builds for browser tests in CI (#6092) by @hyf0 - test-dev-server: update polling interval and add retry logic for CI tests (#6088) by @hyf0 - adjust breaking change template of cliff (#6069) by @IWANABETHATGUY ###◀️ Revert - "fix: replace_plugin does not work as expected with .ts config (#5920)" (#6074) by @IWANABETHATGUY Co-authored-by: Boshen <[email protected]>
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 24, 2025
…dule-lexer` (#7640) Closes #7634 Rename `__export` to `__exportAll` to ensure compatibility with `cjs-module-lexer` versions older than 2.1.1 (which covers most Node.js versions). `cjs-module-lexer` has special handling for `__export` (a pattern used by TypeScript). Since it uses pattern matching to detect exports, it fails to parse `__export` when there is only one argument (e.g., `__export({ ... })`), expecting the form `__export(exports, { ... })` instead. By using a different name, we avoid triggering this faulty heuristic entirely. Background: why we change the `__export` runtime helper 1. #6114 2. #5926
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Since the first argument of
__exportis always{}, moving it into the function body could reduce output size a little.