Rely on npm babel-runtime instead of Meteor helper implementations #7995
The more I've thought about the underlying issues involved in #7956, the more I believe the time has come for Meteor to stop providing custom implementations of
This pull request adds
I'm torn about whether to include this in 126.96.36.199 or wait for 1.4.3, though I believe it is the most reliable fix for #7956, which is (rightfully) in the 188.8.131.52 milestone.
In light of issues like #7956, I would very much like for app developers to be responsible for providing node_modules/babel-runtime, and for the Meteor babel-runtime package to stop attempting to implement a subset of the helpers.
At this point, the only dependencies installed in this way are babel-runtime and meteor-node-stubs, but that set of packages will expand in the future as we move more dependencies to npm.
Though this may seem like a significant change, this package will still work for older apps as long as the developer follows the instructions about installing the babel-runtime npm package. Helps with #7956.
Tests were broken by the new dependency on the babel-runtime npm package, but fortunately all those tests run `meteor --prepare-app` whenever an app is created by a self-test, so this change should fix most of the breakages.
Some tests disable the --prepare-app step, but still need babel-runtime to be installed.
This is another way to fix the bug I previously fixed by passing options.allowSyntaxError to optimisticReadJsonOrNull. To reproduce the bug (and/or verify that it is fixed), run the following commands in a terminal: rm -rf meteor/packages/npm-mongo/.npm meteor/meteor --get-ready Before these two commits, optimisticReadJsonOrNull would throw a SyntaxError when reading one of the .meteor-portable files because an asynchronous write to the same file had not yet finished.
This extraction was necessary because importing tools/cli/commands.js is not entirely side-effect-free, and was interfering with older tests.
This test has been failing intermittently on Circle CI.