As reported by @mariusrak here:
https://github.com/meteor/meteor/issues/10220#issuecomment-425244894
Only errors thrown by @babel/parser have the e.loc property. Other errors
thrown by Babel transforms do not have e.loc, but do (usually) have line
number information embedded in e.message. Either way, it's better to use
inputFile.error than to throw the error, since throwing here crashes the
build process.
These deprecation warnings were introduced in mongodb@3.1.2:
https://github.com/mongodb/node-mongodb-native/commit/a5d0f1d7e1
Fortunately, the deprecated Collection methods still work, and the
deprecation relies on Node's require("util").deprecate API, which can be
silenced permanently for a given function by temporarily setting
`process.noDeprecation = true` while defining the function:
https://github.com/nodejs/node/blob/2ae98ce7cb/lib/internal/util.js#L23-L29
Fixing #10174 by updating mongodb seems more important than reverting the
update to silence these harmless deprecation warnings (which, it bears
repeating, were introduced in a patch update).
Thanks to @klaussner for raising this concern!
Note: since Babel 7 is out of beta now, not all Babel-related packages
have been bumped to 7.1.0. In particular, the @babel/runtime package is
still at version 7.0.0. This is great news, because it means we're back to
genuine semantic versioning for all Babel packages!
My attempt at fixing #10195.
@klaussner Feel free to submit your PR if it's ready, or just review this
one if you prefer. It's important to get this right, so it's not a
terrible idea for both of us to attempt it independently.
Meteor 1.6.x through 1.7.0.x use the `babel-runtime@1.2.x` packages, and
this change is only intended to affect those versions.
This will no longer be necessary in Meteor 1.7.1, since we account for
the changes to `@babel/runtime` through changes to the `meteor/babel`
package, but this ensures that anyone who updates to `@babel/runtime@7` (the
final, latest release), or anything newer, isn't surprised by their broken
application.