Fix reexporting init-less variable in systemjs#12110
Merged
JLHwung merged 1 commit intobabel:mainfrom Sep 28, 2020
Merged
Conversation
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/28836/ |
JLHwung
commented
Sep 25, 2020
| exportValues.push(t.cloneNode(specifier.local)); | ||
| } | ||
| // only globals also exported this way | ||
| else if (!binding) { |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
JLHwung
commented
Sep 25, 2020
| var foo; | ||
|
|
||
| _export("foo", void 0); | ||
| _export("bar", void 0); |
Contributor
Author
There was a problem hiding this comment.
JLHwung
commented
Sep 25, 2020
| var foo; | ||
|
|
||
| _export("foo", void 0); | ||
| _export("default", void 0); |
Contributor
Author
There was a problem hiding this comment.
JLHwung
commented
Sep 25, 2020
|
|
||
| _export({ | ||
| foo: void 0, | ||
| default: void 0, |
Contributor
Author
There was a problem hiding this comment.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0fe715e:
|
JLHwung
commented
Sep 25, 2020
| nextOdd: nextOdd, | ||
| a: void 0 | ||
| }); | ||
| _export("nextOdd", nextOdd); |
Contributor
Author
There was a problem hiding this comment.
8bbd608 to
0fe715e
Compare
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Sep 25, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Sep 25, 2020
3 tasks
guybedford
approved these changes
Sep 26, 2020
Contributor
guybedford
left a comment
There was a problem hiding this comment.
Looks great, thanks @JLHwung for finding these.
nicolo-ribaudo
approved these changes
Sep 26, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Sep 28, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Sep 29, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Sep 29, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Sep 30, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Oct 9, 2020
JLHwung
added a commit
to JLHwung/babel
that referenced
this pull request
Oct 12, 2020
nicolo-ribaudo
pushed a commit
that referenced
this pull request
Oct 14, 2020
nicolo-ribaudo
pushed a commit
that referenced
this pull request
Oct 14, 2020
* feat: parse moduleExportName * feat: add validators * Support string specifier name in commonjs transform * Support string specifier name in export-ns-from * test: add loose testcases * test: add testcases for amd and umd * feat: support systemjs * test: update fixtures fixed in #12110 * add plugin name typings * test: rename test layout * feat: implement under moduleStringNames flag * chore: add plugin syntax module string names * feat: support ModuleExportName as ModuleExportName * test: update test fixtures * fix flow errors * docs: update AST spec * feat: support { "some imports" as "some exports" } * feat: support { "some imports" as "some exports" } in systemjs * test: add test on `import { "foo" }` * Address review comments * add moduleStringNames to missing plugin helpers * Apply suggestions from code review * update test fixtures * Update packages/babel-parser/src/parser/error-message.js * update test fixtures Co-Authored-By: Kai Cataldo <kai@kaicataldo.com> Co-authored-by: Brian Ng <bng412@gmail.com>
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.
This PR checks exportMap when hoisting variables so we don't accidentally push unexported variables to
_exportcall. We also pushexportedinstead of thelocalvariable so it respects cases like/cc @guybedford