As discovered in #8947, creating an app with
meteor create --release 1.4.4.1 new-app
does not actually constrain core packages to have the same minor versions
they had when Meteor 1.4.4.1 was published. Rather (as of Meteor 1.4.3),
the Meteor release only constrains core packages to have versions at least
as recent as the versions they had when the release was published, and to
have the same major version. Any later minor version is fair game.
What we need is a new kind of package version constraint, more like
semver's ~ range operator:
https://www.npmjs.com/package/semver#tilde-ranges-123-12-1
This commit implements that functionality, though it stops short of
supporting all possible semver range syntax.
Backports: b7645a4d1f
In a previous commit, I changed
doc = _.extend({}, doc);
to avoid using underscore, thus:
doc = { ...doc };
While this may seem harmless, it broke a few Mongo.Collection tests
because _.extend copies *all* properties, both own and inherited, whereas
object ...spread only copies own properties.
However, the correct way to fix this problem is *not* to revert to the old
behavior, since flattening the inherited properties of a document was
never actually what we wanted. The old behavior was subtly broken, too.
Instead, we need to create a new object with the same prototoype as the
provided document, then shallow-copy the own properties. Any properties or
methods inherited from the original prototype will then be available on
the new object, even though they didn't get copied over.
I've intentionally left some trivial formatting changes in this commit to
remind myself which broken tests were fixed by this change.
The `accessToken` isn't always immediately provided (for example on
Android devices) but instead needs to be retrieved by exchanging the
`serverAuthCode`.
Fixes https://github.com/meteor/meteor/issues/8613.
* Switch to modern nodemailer 4, Node 4 version. Fix#8591
* Most critically, use a pool instead of direct SMTP connection,
to handle dropped connections and increase throughput,
like mail module 1.1. (#8591)
* New nodemailer's sendMail wants an options object, not a MailComposer
object. Luckily, a MailComposer object has a "mail" field that
remembers the original options, so we can keep original behavior.
* However, we no longer support the mailComposer option set to a compiled
MailComposer object (functionality that was briefly added in 1.2.0).
* nodemailer does SMTP URL parsing now automatically for us, simplifying code.
* Tests' outputs now end with additional "\r\n"
* Drop underscore package dependency (no longer needed)
* General formatting/style cleanup for `packages/email`.
* snake_cased => camelCased for some local variables.
* Added curly-brackets to `if`s.
* Removed trailing spaces.
* Removed commented-out code.
* Removed older doc text and changed some links.
* Get rid of back-and-forth assigning of `mailUrlString`.
When Minimongo throws an error, most of the times, the field names are not present, making it a bit difficult to debug. Updated the error messages to include the field name for which it threw the error.
* Adjust Mongo.Collection._rewriteSelector to allow a custom fallback _id.
* Adjusted insertedId fallback handling to include the options.insertedId.
* Adjusted _rewriteSelector to use an options object for fallbackId.