Commit Graph

18658 Commits

Author SHA1 Message Date
Jesse Rosenberger
23d19f08e0 Merge branch 'master' into devel 2017-04-17 13:50:30 -07:00
Jesse Rosenberger
b5ac9d2677 Merge pull request #8609 from meteor/abernix/packages/email-1.2.1
email@1.2.1
2017-04-17 13:44:22 -07:00
Erik Demaine
57b050a78a Switch to modern nodemailer 4, Node 4 version. Fix #8591 (#8605)
* 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`.
2017-04-17 12:45:38 -07:00
Erik Demaine
6d45626566 Switch to modern nodemailer 4, Node 4 version. Fix #8591 (#8605)
* 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`.
2017-04-17 12:41:44 -07:00
Ben Newman
7a9dd2b7a4 Use tokens from Google Sign-In instead of calling getTokens. (#8604)
* Use tokens from Google Sign-In instead of calling getTokens.

Follow-up to https://github.com/meteor/meteor/pull/8588.

* Bump google-oauth package version to 1.2.3.
2017-04-14 18:11:06 -04:00
Ben Newman
353bea75b7 Bump ecmascript package version to 0.7.3.
Bumping this version is necessary after upgrading babel-compiler since
ecmascript registers a compiler plugin that uses babel-compiler.
2017-04-14 02:38:27 -04:00
Ben Newman
d8fa46b5aa Update npm-shrinkwrap.json for babel-compiler package. 2017-04-14 02:37:35 -04:00
Ben Newman
895321e35f Upgrade meteor-babel and reify to fix #8595. (#8599)
* Upgrade meteor-babel to version 0.20.1 and reify to 0.7.4.
* Bump $BUNDLE_VERSION to 4.7.25 before rebuilding dev bundle.
2017-04-14 02:35:01 -04:00
Ben Newman
9bd5194fa4 Merge pull request #8529 from s7dhansh/patch-1
Add the name of the field to MiniMongo error messages.
2017-04-12 15:25:51 -04:00
Ben Newman
1887031733 Bump minimongo package version to 1.0.22. 2017-04-12 15:25:12 -04:00
Ben Newman
c41a65ce59 Bump google-oauth package version to 1.2.2. 2017-04-12 15:20:43 -04:00
Ben Newman
301c51380a Merge pull request #8588 from realyze/fix/google-oauth
Fixed Google OAuth user data fetching.
2017-04-12 15:19:09 -04:00
Ben Newman
c67540cf56 Remove underscore dependency from google-oauth package. 2017-04-12 14:36:11 -04:00
Jesse Rosenberger
27b2a04f6f Remove experimental trailing comma to avoid problems with jsdoc.
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!
2017-04-12 09:59:09 -07:00
Tomas Brambora
fde92c9d79 Fixed Google OAuth user data fetching. 2017-04-12 21:51:35 +10:00
Ben Newman
caf7f3d7dd Merge branch 'master' into devel 2017-04-07 18:46:07 -04:00
Ben Newman
06e82b845c Merge pull request #8574 from meteor/release-1.4.4.1
Release 1.4.4.1
2017-04-07 18:43:40 -04:00
Ben Newman
384023ecbd Bump package versions for the official 1.4.4.1 release. release/METEOR@1.4.4.1 2017-04-07 17:58:50 -04:00
Ben Newman
22cefeec15 Update History.md to reflect changes in Meteor 1.4.4.1. 2017-04-07 16:50:57 -04:00
Ben Newman
ce29815ae7 Bump package versions for 1.4.4.1-rc.0 release. release/METEOR@1.4.4.1-rc.0 2017-04-07 16:27:22 -04:00
Ben Newman
e1ac5bf1f3 Replace module.importSync with module.import in older Meteor versions.
Also bumping the ecmascript version because it registers a compiler plugin
that uses babel-compiler.

Fixes #8572, albeit somewhat hackily.
2017-04-07 16:27:17 -04:00
Ben Newman
6055b49f8d Wait on removal of garbage directories.
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
2017-04-07 16:21:43 -04:00
Jesse Rosenberger
f345786194 Merge pull request #8573 from meteor/add-header-for-1.4.4
Update `History.md` for Meteor 1.4.4 release.
2017-04-07 19:42:21 +03:00
Ben Newman
bbabc83d9a Add heading to History.md for Meteor 1.4.4. 2017-04-07 19:37:44 +03:00
Ben Newman
f96464f3d4 Add heading to History.md for Meteor 1.4.4. 2017-04-07 12:29:02 -04:00
Ben Newman
ac5131d1d7 Replace module.importSync with module.import in older Meteor versions.
Also bumping the ecmascript version because it registers a compiler plugin
that uses babel-compiler.

Fixes #8572, albeit somewhat hackily.
2017-04-07 11:53:46 -04:00
Jesse Rosenberger
948ec2b05f Merge branch 'master' into devel 2017-04-07 18:50:17 +03:00
Jesse Rosenberger
7b89f01f31 Merge pull request #8439 from meteor/release-1.4.3.x
Release 1.4.x.y
2017-04-07 18:46:31 +03:00
Jesse Rosenberger
ddfa7083e7 Change MinimongoError to accept field in a new options parameter.
This allows the field name to be dynamically introduced into the error
message.

Follows-up on meteor/meteor#8529.
2017-04-07 17:09:08 +03:00
Jesse Rosenberger
68afef2050 Bump package versions for the official 1.4.4 release. release/METEOR@1.4.4 2017-04-07 13:55:36 +03:00
Ben Newman
e85de8fe4b Remove mention of fs-extra npm package from History.md.
PR #8569 by @abernix undid the changes this bullet point was referring to.
2017-04-06 19:27:57 -04:00
Jesse Rosenberger
13c55e734c Bump package versions for 1.4.4-rc.9 release. release/METEOR@1.4.4-rc.9 2017-04-06 22:51:33 +03:00
Jesse Rosenberger
a4b3dd7f57 Bump $BUNDLE_VERSION to 4.7.23 before rebuilding dev bundle. 2017-04-06 21:17:24 +03:00
Jesse Rosenberger
d6665e744f Merge pull request #8569 from abernix/abernix/revert-fs-extra
Recommendation to switch `fs-extra` for an alternate implementation.
2017-04-06 21:13:01 +03:00
Jesse Rosenberger
ae35f13ed2 Use new rm_recursive_async to cleanup garbage directory w/o waiting. 2017-04-06 20:18:38 +03:00
Jesse Rosenberger
0cf0fb12c3 Remove catch-ing of EXDEV from Builder#complete.
This logic is now handled in `files.renameDirAlmostAtomically`.
2017-04-06 20:03:35 +03:00
Jesse Rosenberger
960e78c250 Sacrifice atomicity in the event that the file-system won't allow it.
/cc @benjamn
2017-04-06 19:56:17 +03:00
Jesse Rosenberger
e9a2f6d22c Just Profile the *Atomically functions directly.
...Versus reassigning them immediately after.

 (Whitespace-only view is recommended, due to indentation change)
2017-04-06 19:30:06 +03:00
Jesse Rosenberger
af1bc232d6 Hoist "Can we Fiber?" logic up to a helper function.
This also makes it possible to disable it in places where we were not
checking against the `METEOR_DISABLE_FS_FIBERS` env. variable, like in
`rm_recursive`.
2017-04-06 17:17:56 +03:00
Jesse Rosenberger
7090129f89 Re-implement renameDirAlmostAtomically in Builder#complete.
The `rename` is not sufficient on its own since it won't pave the way
for the new directory by ensuring that it's empty first.

`renameDirAlmostAtomically` will do that.
2017-04-06 17:17:55 +03:00
Jesse Rosenberger
523c7ce9d4 If EXDEV is encountered, resort to a delete and cp_r.
This operation does not have to be done atomically and this should allow
cross-device copies to be made if necessary.
2017-04-06 06:54:37 +03:00
Jesse Rosenberger
9e0f61c4b3 Revert "Use fs.move() from fs-extra to fix EXDEV cross device error in docker builds. (#8491)"
Unfortunately, `fs-extra` is still not as perfect at handling various
file system conditions as would be ideal.  It seemed sensical to try and
use a library like this however, it turns out that the Meteor suite
of file system functions stands up best on Windows, which is where I
encountered most problems.

For example, `fs-extra` still tries to create symlinks as an unprivileged
user – a forbidden task on Windows unless running as Administrator.

In addition, I ran into a constant stream of other errors: `ENOTEMPTY`,
`EBUSY`, `EEXIST` – all for various reasons.

My current recommendation is that we remove `fs-extra` and replace the
`Builder#complete` `renameDirAlmostAtomically` call (which does not
absolutely _have_ to be done atomically) with a `try`/`catch` which
resorts to a basic copy if `err.code === 'EXDEV'`.  All other
functionality stays the same.

This reverts commits:

* d49f3e2704
* 3257bafc84
* 74cb8ebdc2
* 5bbdcc9baa
* 6a0767bbac
2017-04-06 06:50:03 +03:00
Jesse Rosenberger
f62b25e3f0 Bump package versions for 1.4.4-rc.8 release. release/METEOR@1.4.4-rc.8 2017-04-05 20:09:52 +03:00
Jesse Rosenberger
6a0767bbac Don't reassign, just Profile the *Atomically functions directly. 2017-04-05 19:04:22 +03:00
Jesse Rosenberger
5bbdcc9baa Change order that functions are defined so move is wrapped correctly. 2017-04-05 18:56:05 +03:00
Max Nowack
759671dc6c add function to expose tracker inFlush variable (#8565) 2017-04-05 11:54:40 -04:00
Jesse Rosenberger
27819a164b Update installNpmModule to properly capture newer npm error formats. (#8564)
Previously, we captured and displayed shorter error messages for the
more complicated and unnecessarily verbose messages which npm produced.

While updating npm to 4.4.4, I observed the changelog for 4.4.0
indicated it would now produce less verbose messages.  In searching for
possible Meteor conflicts with this, I discovered that
`installNpmModule` had already regressed on providing pretty messages.

This fixes those messages to be parsed properly and adds tests which
ensure if npm changes again that we can capture them.

Follows-up on: https://github.com/meteor/meteor/pull/8562
2017-04-05 11:46:29 -04:00
ScaY
52fb594659 test(accounts-password): tests email verification for same email (#8555)
Test that email verification is case-insensitive.
2017-04-05 11:41:28 -04:00
mutdmour
9bcb3a47b6 Store expiresAt for all OAuth providers (#8547).
Fixes #576.
2017-04-05 11:33:05 -04:00
Hugh Willson
f4e41cbf1b Adjust Mongo.Collection._rewriteSelector to allow a custom fallback _id. (#8525)
* 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.
2017-04-05 11:25:09 -04:00