-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Disallows specifiers after export * as ns #15385
Disallows specifiers after export * as ns #15385
Conversation
export * as default from "foo"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExportSpecifier4
is removed, then I renamed ExportSpecifier16
into ExportSpecifier4
to fill the hole.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/53828/ |
/cc @fisker The e2e tests are failing, for good reasons. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
I was stupid, you can just rm tests/format/js/exports/jsfmt.spec.js |
Thanks, hopefully we will release this patch soon and reenable this test. |
Co-authored-by: fisker Cheung <lionkay@gmail.com>
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.