-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Normative: make re-exporting a namespace object in 2 steps behave like 1 step #3715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bakkot
wants to merge
3
commits into
main
Choose a base branch
from
unambiguous-export-star-from
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3
−2
Conversation
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
|
The rendered spec for this PR is available at https://tc39.es/ecma262/pr/3715. |
nicolo-ribaudo
approved these changes
Nov 8, 2025
guybedford
approved these changes
Nov 8, 2025
bakkot
commented
Nov 8, 2025
Co-authored-by: Nicolò Ribaudo <[email protected]>
michaelficarra
approved these changes
Nov 13, 2025
lando-prod-mozilla bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Nov 26, 2025
…=jonco This patch implements tc39/ecma262#3715, to make import * as ns from "mod"; export { ns }; behave the same as export * as ns from "mod"; Tested by tc39/test262#4606 Differential Revision: https://phabricator.services.mozilla.com/D274013
nicolo-ribaudo
added a commit
to nicolo-ribaudo/WebKit
that referenced
this pull request
Nov 27, 2025
https://bugs.webkit.org/show_bug.cgi?id=303141 Reviewed by NOBODY (OOPS!). This patch changes JSC's handling of `import * as ns; export { ns }` to align with tc39/ecma262#3715, which reached consensus in the Nov 2025 TC39 meeting. This will be tested by tc39/test262#4606, for now I manually verified that the relevant tests in that PR are failing before this patch and passing after it. * Source/JavaScriptCore/parser/ModuleAnalyzer.cpp: (JSC::ModuleAnalyzer::exportVariable):
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Nov 27, 2025
…=jonco This patch implements tc39/ecma262#3715, to make import * as ns from "mod"; export { ns }; behave the same as export * as ns from "mod"; Tested by tc39/test262#4606 Differential Revision: https://phabricator.services.mozilla.com/D274013 UltraBlame original commit: d14a908552e6d040c7538351430b3152a4a36887
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Nov 27, 2025
…=jonco This patch implements tc39/ecma262#3715, to make import * as ns from "mod"; export { ns }; behave the same as export * as ns from "mod"; Tested by tc39/test262#4606 Differential Revision: https://phabricator.services.mozilla.com/D274013 UltraBlame original commit: d14a908552e6d040c7538351430b3152a4a36887
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Nov 27, 2025
…=jonco This patch implements tc39/ecma262#3715, to make import * as ns from "mod"; export { ns }; behave the same as export * as ns from "mod"; Tested by tc39/test262#4606 Differential Revision: https://phabricator.services.mozilla.com/D274013 UltraBlame original commit: d14a908552e6d040c7538351430b3152a4a36887
nicolo-ribaudo
added a commit
to nicolo-ribaudo/WebKit
that referenced
this pull request
Nov 28, 2025
https://bugs.webkit.org/show_bug.cgi?id=303141 Reviewed by NOBODY (OOPS!). This patch changes JSC's handling of `import * as ns; export { ns }` to align with tc39/ecma262#3715, which reached consensus in the Nov 2025 TC39 meeting. This will be tested by tc39/test262#4606, for now I manually verified that the relevant tests in that PR are failing before this patch and passing after it. * Source/JavaScriptCore/parser/ModuleAnalyzer.cpp: (JSC::ModuleAnalyzer::exportVariable):
i3roly
pushed a commit
to i3roly/firefox-dynasty
that referenced
this pull request
Dec 3, 2025
…=jonco This patch implements tc39/ecma262#3715, to make import * as ns from "mod"; export { ns }; behave the same as export * as ns from "mod"; Tested by tc39/test262#4606 Differential Revision: https://phabricator.services.mozilla.com/D274013
webkit-commit-queue
pushed a commit
to nicolo-ribaudo/WebKit
that referenced
this pull request
Dec 5, 2025
https://bugs.webkit.org/show_bug.cgi?id=303141 Reviewed by Yusuke Suzuki and Sosuke Suzuki. This patch changes JSC's handling of `import * as ns; export { ns }` to align with tc39/ecma262#3715, which reached consensus in the Nov 2025 TC39 meeting. This will be tested by tc39/test262#4606, for now I manually verified that the relevant tests in that PR are failing before this patch and passing after it. * Source/JavaScriptCore/parser/ModuleAnalyzer.cpp: (JSC::ModuleAnalyzer::exportVariable): Canonical link: https://commits.webkit.org/303952@main
Member
|
The change has been implemented in SpiderMonkey and JavaScriptCore. It has not been implemented in V8 yet, but V8 also did not match the original behavior. |
Member
Author
|
Since this is just making an error into a non-error I think that's good enough, no need to wait for them to ship. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
has consensus
This has committee consensus.
has test262 tests
normative change
Affects behavior required to correctly evaluate some ECMAScript source text
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.
Fixes #3710. Specifically, this makes it so that the example under "this throws" in this comment no longer throws, matching the behavior for re-exporting bindings rather than full namespaces.
I also added an explanatory comment about why we're doing this rewriting.
cc @nicolo-ribaudo @guybedford