Skip to content
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

Tolerate undeclared exports until @babel/parser@7.5.0 is released. #230

Merged
merged 1 commit into from Jun 20, 2019

Conversation

benjamn
Copy link
Owner

@benjamn benjamn commented Jun 20, 2019

Workaround until this PR is released: babel/babel#9864

This hack narrowly targets @babel/parser@7.4.x by tricking Array.from(this.scope.undefinedExports) into returning an empty array, thereby simulating the effect of enabling the allowUndeclaredExports option (which will become available in @babel/parser@7.5.0).

babel/babel#9864

This hack narrowly targets @babel/parser@7.4.x by tricking
Array.from(this.scope.undefinedExports) into returning an empty array,
thereby simulating the effect of enabling the allowUndeclaredExports
option (which will become available in @babel/parser@7.5.0).
@benjamn benjamn self-assigned this Jun 20, 2019
@benjamn benjamn merged commit 588bef9 into master Jun 20, 2019
@benjamn benjamn deleted the make-@babel/parser-tolerate-undeclared-exports branch June 20, 2019 17:17
benjamn added a commit to meteor/babel that referenced this pull request Jun 20, 2019
benjamn added a commit to meteor/babel that referenced this pull request Jun 20, 2019
benjamn added a commit that referenced this pull request Jul 4, 2019
After updating @babel/parser to version 7.5.0, I can verify that the
monkey-patching changes in PR #230 are no longer necessary, though it
doesn't hurt to leave them in place, since the interception logic is
restricted to versions in the 7.4.x range.

The allowUndeclaredExports option is now required, as anticipated:
babel/babel#9864
benjamn added a commit to meteor/babel that referenced this pull request Jul 4, 2019
Now that @babel/parser@7.5.0 is out, we no longer need to simulate the
effect of babel/babel#9864.

See also benjamn/reify#230.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant