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.
* 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`.
The comma in question: a trailing comma a rest-parameter, within a
function argument's parameter de-structuring:
function a({
a = false,
...b,
}) {
// ...
}
Espree, the parser used by `jsdoc` (used in Meteor docs) previously
allowed this with `experimentalObjectRestSpread` enabled but now throws
an error with the addition of 652990a7bf.
It might have been argued at one point that the trailing-comma could
allow for the easy, future addition of another parameter, ala:
function a({
a = false,
...b,
c = true,
}) {
// ...
}
Having the rest-parameter in the last position is certainly more clear
(it is the "rest", after-all, and there can be only one) but I'm not
going to have that discussion at the cost of docs not deploying!
The comma in question: a trailing comma a rest-parameter, within a
function argument's parameter de-structuring:
function a({
a = false,
...b,
}) {
// ...
}
Espree, the parser used by `jsdoc` (used in Meteor docs) previously
allowed this with `experimentalObjectRestSpread` enabled but now throws
an error with the addition of 652990a7bf.
It might have been argued at one point that the trailing-comma could
allow for the easy, future addition of another parameter, ala:
function a({
a = false,
...b,
c = true,
}) {
// ...
}
Having the rest-parameter in the last position is certainly more clear
(it is the "rest", after-all, and there can be only one) but I'm not
going to have that discussion at the cost of docs not deploying!
This would have been a nice optimization if it had worked, but (in
addition to leaving garbage directories lying around sometimes if the
process was killed), it appears to have some unintended consequences for
meteorNpm.rebuildIfNonPortable and related functions, since the garbage
directories are easily confused for npm package directories.
Example stack trace:
Error: ENOENT: no such file or directory, open '/home/travis/build/meteor/galaxy-server/node_modules/heapdump-garbage-1c2jqib/package.json'
at Error (native)
=> awaited here:
at Promise.await (/home/travis/.meteor/packages/less/.2.7.9.9fh5c1++os+web.browser+web.cordova/plugin.compileLessBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:39:12)
at copyFileHelper (/tools/fs/files.js:633:6)
at Object.files.cp_r (/tools/fs/files.js:532:7)
at /tools/isobuild/meteor-npm.js:393:11
at Array.forEach (native)
at copyNpmPackageWithSymlinkedNodeModules (/tools/isobuild/meteor-npm.js:386:29)
at /tools/isobuild/meteor-npm.js:325:5
at Array.forEach (native)
at Object.rebuildIfNonPortable (/tools/isobuild/meteor-npm.js:315:17)
at NodeModulesDirectory.rebuildIfNonPortable (/tools/isobuild/bundler.js:273:22)
at /tools/isobuild/compiler.js:650:13