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.
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.
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.
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.
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.
Setting METEOR_DISABLE_FS_FIBERS broke these tests because
CachingCompiler#_writeFileAsync was still asynchronous, whereas other FS
operations became synchronous.
Set METEOR_DISABLE_FS_FIBERS=false to un-disable files.* fibers if you
suspect this commit has introduced a problematic difference in behavior.
cc @veered
By removing the `--allow-superuser` and `--unsafe-perm` arguments before springboarding, it prevents older versions of Meteor from objecting to its use. Catching it at the highest level should be sufficient to discourage root usage as intended in meteor/meteor#7821
Intended to fix... meteor/meteor#7959
This is important for `meteor npm`, since we don't parse or pass through
Meteor-specific command-line arguments when running `meteor npm`.
When METEOR_UNSAFE_PERM is set, its value is now propagated to any npm
commands via the NPM_CONFIG_UNSAFE_PERM variable.
Helps with #7959.
Follow-up to #7821.