Repository navigation
fix(link): treat re-exports of the same external binding as one export - #11069
Merged
graphite-app[bot] merged 1 commit intoOct 2, 2026
Merged
Conversation
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
IWANABETHATGUY
marked this pull request as ready for review
October 2, 2026 08:38
Merging this PR will not alter performance
Comparing Footnotes
|
hyfdev
approved these changes
Oct 2, 2026
Member
Merge activity
|
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
#11069) When two `export *` paths re-exported the same name from the same external module, rolldown dropped the name from the exports without a warning, and importing it through the barrel failed with `AMBIGUOUS_EXTERNAL_NAMESPACES`. ```js // a.js and b.js export { InjectionToken } from 'ext'; // index.js export * from './a.js'; export * from './b.js'; ``` Per [`ResolveExport`](https://tc39.es/ecma262/#sec-resolveexport), both paths resolve to `InjectionToken` of `ext`, so the name is not ambiguous. This PR also reports `NAMESPACE_CONFLICT` when the conflicting bindings come from an external module, which were dropped silently before. Rollup warns there too: ``` [NAMESPACE_CONFLICT] Conflicting namespaces: "main.js" re-exports "T" from one of the modules "a.js" and "b.js" (will be ignored). ╭─[ a.js:1:10 ] 1 │ export { A as T, S, U } from 'ext'; │ ┬ │ ╰── One matching export is here. ├─[ b.js:1:10 ] 1 │ export { B as T, S } from 'ext'; │ ┬ │ ╰── One matching export is here. ───╯ ``` Names re-exported from an internal CommonJS module have the same problem, but each importer gets its own namespace object there, so it needs a different fix that I left out of this PR. fixes #11058
graphite-app
Bot
force-pushed
the
fix/11058-star-export-same-external-binding
branch
from
October 2, 2026 09:43
97fe9b8 to
b45eca9
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
#11069) When two `export *` paths re-exported the same name from the same external module, rolldown dropped the name from the exports without a warning, and importing it through the barrel failed with `AMBIGUOUS_EXTERNAL_NAMESPACES`. ```js // a.js and b.js export { InjectionToken } from 'ext'; // index.js export * from './a.js'; export * from './b.js'; ``` Per [`ResolveExport`](https://tc39.es/ecma262/#sec-resolveexport), both paths resolve to `InjectionToken` of `ext`, so the name is not ambiguous. This PR also reports `NAMESPACE_CONFLICT` when the conflicting bindings come from an external module, which were dropped silently before. Rollup warns there too: ``` [NAMESPACE_CONFLICT] Conflicting namespaces: "main.js" re-exports "T" from one of the modules "a.js" and "b.js" (will be ignored). ╭─[ a.js:1:10 ] 1 │ export { A as T, S, U } from 'ext'; │ ┬ │ ╰── One matching export is here. ├─[ b.js:1:10 ] 1 │ export { B as T, S } from 'ext'; │ ┬ │ ╰── One matching export is here. ───╯ ``` Names re-exported from an internal CommonJS module have the same problem, but each importer gets its own namespace object there, so it needs a different fix that I left out of this PR. fixes #11058
graphite-app
Bot
force-pushed
the
fix/11058-star-export-same-external-binding
branch
from
October 2, 2026 09:45
b45eca9 to
3161dcd
Compare
graphite-app Bot
pushed a commit
that referenced
this pull request
Oct 2, 2026
#11069) When two `export *` paths re-exported the same name from the same external module, rolldown dropped the name from the exports without a warning, and importing it through the barrel failed with `AMBIGUOUS_EXTERNAL_NAMESPACES`. ```js // a.js and b.js export { InjectionToken } from 'ext'; // index.js export * from './a.js'; export * from './b.js'; ``` Per [`ResolveExport`](https://tc39.es/ecma262/#sec-resolveexport), both paths resolve to `InjectionToken` of `ext`, so the name is not ambiguous. This PR also reports `NAMESPACE_CONFLICT` when the conflicting bindings come from an external module, which were dropped silently before. Rollup warns there too: ``` [NAMESPACE_CONFLICT] Conflicting namespaces: "main.js" re-exports "T" from one of the modules "a.js" and "b.js" (will be ignored). ╭─[ a.js:1:10 ] 1 │ export { A as T, S, U } from 'ext'; │ ┬ │ ╰── One matching export is here. ├─[ b.js:1:10 ] 1 │ export { B as T, S } from 'ext'; │ ┬ │ ╰── One matching export is here. ───╯ ``` Names re-exported from an internal CommonJS module have the same problem, but each importer gets its own namespace object there, so it needs a different fix that I left out of this PR. fixes #11058
graphite-app
Bot
force-pushed
the
fix/11058-star-export-same-external-binding
branch
from
October 2, 2026 09:46
3161dcd to
55d2868
Compare
#11069) When two `export *` paths re-exported the same name from the same external module, rolldown dropped the name from the exports without a warning, and importing it through the barrel failed with `AMBIGUOUS_EXTERNAL_NAMESPACES`. ```js // a.js and b.js export { InjectionToken } from 'ext'; // index.js export * from './a.js'; export * from './b.js'; ``` Per [`ResolveExport`](https://tc39.es/ecma262/#sec-resolveexport), both paths resolve to `InjectionToken` of `ext`, so the name is not ambiguous. This PR also reports `NAMESPACE_CONFLICT` when the conflicting bindings come from an external module, which were dropped silently before. Rollup warns there too: ``` [NAMESPACE_CONFLICT] Conflicting namespaces: "main.js" re-exports "T" from one of the modules "a.js" and "b.js" (will be ignored). ╭─[ a.js:1:10 ] 1 │ export { A as T, S, U } from 'ext'; │ ┬ │ ╰── One matching export is here. ├─[ b.js:1:10 ] 1 │ export { B as T, S } from 'ext'; │ ┬ │ ╰── One matching export is here. ───╯ ``` Names re-exported from an internal CommonJS module have the same problem, but each importer gets its own namespace object there, so it needs a different fix that I left out of this PR. fixes #11058
graphite-app
Bot
force-pushed
the
fix/11058-star-export-same-external-binding
branch
from
October 2, 2026 09:48
55d2868 to
7baaf3b
Compare
graphite-app
Bot
deleted the
fix/11058-star-export-same-external-binding
branch
October 2, 2026 09:58
Merged
shulaoda
added a commit
that referenced
this pull request
Oct 7, 2026
## [1.2.13] - 2026-10-07 ### 🚀 Features - rolldown_plugin_vite_import_glob: follow file creation and deletion via hotUpdate (#10550) by @shulaoda - inline-common-chunks: deduplicate shared code along known loading paths (#11093) by @hyfdev - rolldown_plugin_vite_import_glob: record a matcher per glob call in dev (#10592) by @shulaoda - rolldown_plugin_vite_import_glob: watch the directory each glob reads (#10549) by @shulaoda - watch: hand watch.exclude to notify as its ignore filter (#11008) by @shulaoda - dev: add `experimental.devMode.hotUpdate` option (#11123) by @h-a-n-a ### 🐛 Bug Fixes - renamer: check the printed name of namespace-alias imports for captures (#11129) by @IWANABETHATGUY - devtools: honor `devtools.sessionId` by @Brooooooklyn - renamer: keep a renamed nested binding off its module's top-level bindings (#11128) by @IWANABETHATGUY - dev: keep `this` undefined when calling an imported function in HMR patches and lazy chunks (#11126) by @h-a-n-a - dev: read string-named imports correctly in HMR patches and lazy chunks (#11127) by @h-a-n-a - sanitize preserveModules chunk names after resolving the relative path (#11087) by @waltuov - keep the `with` clause on bare external imports (#11100) by @IWANABETHATGUY - generator: filter DISABLE_JS_HOOK bits from generated HookUsage (#10346) by @Brooooooklyn - dev: make the module factory async for top-level await (#11118) by @h-a-n-a - node: give each renderChunk call its own meta object (#11115) by @Brooooooklyn - honor `externalLiveBindings` for imported exports (#11048) by @camc314 - dev: keep a late payload from replacing newer module code (#11030) by @h-a-n-a - binding: use-after-free in async `transform` with a `TsconfigCache` (#11080) by @shulaoda - fail on chunk syntax errors and escape export names once (#11051) by @hyfdev - dev: ship newly imported modules the client never received (#11029) by @h-a-n-a - code-splitting: avoid cycles from redundant re-export initialization (#11073) by @hyfdev - link: treat re-exports of the same external binding as one export (#11069) by @IWANABETHATGUY - escape namespace properties in IIFE and UMD output (#11085) by @hyfdev - escape dependency paths in CJS and UMD output (#11084) by @hyfdev - use computed access for arbitrary import names (#11083) by @hyfdev - generate valid bindings for shimmed exports (#11082) by @hyfdev - dev: reload the page when an HMR update fails after merging its edit (#11031) by @h-a-n-a - dev/lazy: ship the deps of a module that a patch shipped but never ran (#11028) by @h-a-n-a - code-splitting: don't move init calls in front of unwrapped JSON modules (#11062) by @IWANABETHATGUY - escape export names in `defineProperty` calls (#11047) by @camc314 ### 📚 Documentation - say the CLI bundles multiple configs one after another (#11111) by @Brooooooklyn - add `renderChunk` hook filter docs (#11065) by @sapphi-red ### ⚡ Performance - use `concat_string!` instead of `format!` for plain string joins (#11139) by @IWANABETHATGUY - utils: evaluate each `concat_string!` argument once (#11105) by @IWANABETHATGUY - json: escape `JSON.parse` string with `json-escape-simd` (#11104) by @IWANABETHATGUY - unwrap JSON modules with a non-object root (#11066) by @IWANABETHATGUY ### 🧪 Testing - inline-common-chunks: fix flaky inlineCommonChunks concurrent imports (#11088) by @hyfdev ### ⚙️ Miscellaneous Tasks - deps: upgrade oxc to 0.153.0 (#11109) by @camc314 - update pnpm to v12 (#10876) by @btea - deps: update pnpm to v11.28.0 (#11049) by @renovate[bot] - deps: update rollup submodule for tests to v4.64.0 (#11116) by @rolldown-guard[bot] - deps: update napi (#11137) by @renovate[bot] - scripts: spawn the rolldown CLI without a shell in setup-vite (#10875) by @Brooooooklyn - deps: bump `@napi-rs/wasm-runtime` to `~1.2.5` (#11117) by @shulaoda - deps: update napi (#11108) by @renovate[bot] - deps: update taiki-e/install-action action to v2.87.22 (#11096) by @renovate[bot] - deps: update npm packages (#11095) by @renovate[bot] - deps: update rust crates (#11097) by @renovate[bot] - deps: update napi (#11063) by @renovate[bot] - deps: update dependency rust to v1.99.0 (#11071) by @renovate[bot] - deps: update dependency vite-plus to v1 (#11056) by @renovate[bot] Co-authored-by: shulaoda <[email protected]>
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.
When two
export *paths re-exported the same name from the same external module, rolldown dropped the name from the exports without a warning, and importing it through the barrel failed withAMBIGUOUS_EXTERNAL_NAMESPACES.Per
ResolveExport, both paths resolve toInjectionTokenofext, so the name is not ambiguous.This PR also reports
NAMESPACE_CONFLICTwhen the conflicting bindings come from an external module, which were dropped silently before. Rollup warns there too:Names re-exported from an internal CommonJS module have the same problem, but each importer gets its own namespace object there, so it needs a different fix that I left out of this PR.
fixes #11058