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

Move meteorBabelHelpers to modules package, and restrict to legacy bundle. #10596

Merged
merged 1 commit into from Jun 25, 2019

Conversation

@benjamn
Copy link
Member

commented Jun 25, 2019

Should fix #10595.

Code from the application node_modules directory becomes part of the modules package, so that it can be imported by any other package that uses the module system, regardless of package load order.

Now that we compile code from node_modules using babel-compiler and meteor-babel (#10585), node_modules code requires the same runtime environment as any other Meteor JS code. For the most part, this need is satisfied by the @babel/runtime/helpers/... modules, which are also defined in the modules package because they come from node_modules. However, in the legacy bundle, meteorBabelHelpers.sanitizeForInObject is used to fix buggy for-in iteration in older Internet Explorers.

Thankfully, this extra helper code does not need to be included in the modern or server bundles, but only in legacy code.

Move meteorBabelHelpers to modules package, and restrict to legacy bu…
…ndle.

Should fix #10595.

Code from the application `node_modules` directory becomes part of the
`modules` package, so that it can be imported by any other package that
uses the module system, regardless of package load order.

Now that we compile code from `node_modules` using `babel-compiler` and
`meteor-babel` (#10585), `node_modules` code requires the same runtime
environment as any other Meteor JS code. For the most part, this need is
satisfied by the `@babel/runtime/helpers/...` modules, which are also
defined in the `modules` package because they come from `node_modules`.
However, in the legacy bundle, `meteorBabelHelpers.sanitizeForInObject` is
used to fix buggy for-in iteration in older Internet Explorers.

Thankfully, this extra helper code does not need to be included in the
modern or server bundles, but only in legacy code.

@benjamn benjamn added this to the Release 1.8.2 milestone Jun 25, 2019

@benjamn benjamn self-assigned this Jun 25, 2019

@benjamn

This comment has been minimized.

Copy link
Member Author

commented Jun 25, 2019

By the way, I submitted this as a PR rather than just pushing to release-1.8.2 because running tests in PhantomJS is a great way to verify any functionality specific to the legacy bundle.

@benjamn benjamn merged commit a69ba49 into release-1.8.2 Jun 25, 2019

20 checks passed

CLA Author has signed the Meteor CLA.
Details
ci/circleci: Clean Up Your tests passed on CircleCI!
Details
ci/circleci: Docs Your tests passed on CircleCI!
Details
ci/circleci: Get Ready Your tests passed on CircleCI!
Details
ci/circleci: Isolated Tests Your tests passed on CircleCI!
Details
ci/circleci: Test Group 0 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 1 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 10 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 2 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 3 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 4 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 5 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 6 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 7 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 8 Your tests passed on CircleCI!
Details
ci/circleci: Test Group 9 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@benjamn benjamn deleted the move-meteorBabelHelpers-to-modules-package branch Jun 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.