Disallows specifiers after export * as ns#15385
Merged
JLHwung merged 4 commits intobabel:mainfrom Feb 2, 2023
Merged
Conversation
JLHwung
commented
Jan 30, 2023
| @@ -1 +1 @@ | |||
| export * as foo, { bar } from "foo"; No newline at end of file | |||
| export * as default from "foo"; No newline at end of file | |||
Contributor
Author
There was a problem hiding this comment.
ExportSpecifier4 is removed, then I renamed ExportSpecifier16 into ExportSpecifier4 to fill the hole.
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53828/ |
Contributor
Author
|
/cc @fisker The e2e tests are failing, for good reasons. |
This comment was marked as outdated.
This comment was marked as outdated.
4 tasks
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
|
I was stupid, you can just rm tests/format/js/exports/jsfmt.spec.js |
Contributor
Author
Thanks, hopefully we will release this patch soon and reenable this test. |
fisker
reviewed
Jan 31, 2023
Co-authored-by: fisker Cheung <lionkay@gmail.com>
nicolo-ribaudo
approved these changes
Jan 31, 2023
existentialism
approved these changes
Feb 1, 2023
coderaiser
added a commit
to putoutjs/recast
that referenced
this pull request
Feb 12, 2023
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
export * as ns, { foo } from "module"The current ExportFromClause production
does not allow named exports after a namespace export, i.e.
is invalid. Currently they are allowed (long since the babylon era). I don't know if it reflects on an earlier version of the export-ns-from proposal but we have to disallow it from now on to align with the spec. Besides, my local experiment reveal that V8, SM and Webkit all disallow such production, so it is very likely not a spec oversight.
The test cases are updated accordingly.