Commit Graph

18615 Commits

Author SHA1 Message Date
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
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
Jesse Rosenberger
eb827b2515 Bump package versions for 1.4.4-rc.7 release. release/METEOR@1.4.4-rc.7 2017-04-05 14:43:43 +03:00
Jesse Rosenberger
e9f7238819 Updates to History.md for 1.4.4.
* Remove: Duplicate `reify` mention.
* Add: `fs-extra` updates.
* Add: `Accounts.config` now supports `ambiguousErrorMessages`.
* Add: `mailcomposer` & `smtp-connection` npm updates.
* Add: Bugfix for enrollment tokens.
* Change: Windows note about Node.js version mismatch.
2017-04-05 14:40:26 +03:00
Jesse Rosenberger
eb578e864b Bump $BUNDLE_VERSION to 4.7.22 before rebuilding dev bundle. 2017-04-05 12:59:57 +03:00
Jesse Rosenberger
74cb8ebdc2 Improve fs-extras move calls for Windows platform. (#8560)
* Improve `fs-extra.move` calls for Windows platform.

This is a follow-up to meteor/meteor#8491 which worked properly on Unix
platforms, but failed in a variety of ways on Windows due to its lack
of Fiber-awareness and desire to create symlinks as unprivileged users
(something not always possible on Windows).

The Fiber issue was observed when trying to remove "src" directories
within the `move` function (which tries a variety of OS/OS/arch-specific
techniques to accomplish its goal) after they had been copied to "dest".
On Windows, this resulted in `EDIRNOTEMPTY` errors since Windows appears
to temporarily cache the file-handle or doesn't release the file-handle
until the next tick.

The symlink issue will hopefully improve in an upcoming release of
Windows (Creator Edition) when Microsoft makes it possible to create
symlinks as an unprivileged user, however it will still require enabling
"Developer" mode in Windows settings.  This implements the same catch
which was already in place for `fs.rename` on the `fs.move` provided by
`fs-extra`.

Performance gains were the same in tests comparing before and after
these changes.

Relates to:
https://github.com/meteor/meteor/issues/8558#issuecomment-291194385

* A few code-cleanups to my original commit.
2017-04-05 12:58:32 +03:00
Jesse Rosenberger
5068fa9aa5 Merge pull request #8562 from abernix/abernix/201704-update-core-deps
[1.4.3.x-series] Update Node.js, npm, node-gyp, node-pre-gyp.
2017-04-05 10:49:24 +03:00
Jesse Rosenberger
76ea56ad49 Add History.md entries about core package updates. 2017-04-05 09:56:16 +03:00
Ben Newman
fc626eaf4c Use fork of cordova-plugin-googleplus to ease iOS keychain sharing.
https://github.com/meteor/meteor/issues/8253
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/pull/366
2017-04-04 15:26:28 -04:00
Jesse Rosenberger
cba8c63340 Update node-gyp and node-pre-gyp packages.
* `node-gyp` - Adds support for Visual Studio 2017.
  - https://github.com/nodejs/node-gyp/blob/master/CHANGELOG.md#v360-2017-03-16
* `node-pre-gyp` - Nothing notable.
  - https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#0634
2017-04-04 19:42:03 +03:00
Jesse Rosenberger
7915afbbc1 Update npm package to v4.4.4.
Notable changes:
  https://github.com/npm/npm/releases/tag/v4.4.4
2017-04-04 19:42:03 +03:00
Jesse Rosenberger
8bdd0142cd Disable display of update msg about npm itself, since it's bundled.
As of npm 4.4.0 this is necessary as it will now self-check once per day
for updates.  Meteor pre-bundles the version of npm though so this
message will be confusing to users of the `meteor` tool.

https://github.com/npm/npm/releases/tag/v4.4.0
2017-04-04 19:37:20 +03:00
Jesse Rosenberger
a376c909cf Update Node.js to v4.8.1.
Notable changes:
  https://nodejs.org/en/blog/release/v4.8.1/
2017-04-04 19:35:50 +03:00
Ben Newman
f3c2eaf5bf Bump package versions for 1.4.4-rc.6 release. release/METEOR@1.4.4-rc.6 2017-04-03 20:24:06 -04:00
Ben Newman
87d0a33067 Get Cordova plugin test to pass by adding time. 2017-04-03 18:43:54 -04:00
Ben Newman
954efa7f5a Support Google Sign-In in google-oauth package. (#8549)
* Support Google Sign-In in google-oauth package.

Addresses #8253.

* Use Meteor.startup instead of listening for deviceready event.

* Fix mobile-config.js typo.

* Bump accounts-google and google-oauth package versions.

I'm only bumping the patch versions, even though the recent changes to
these packages may seem significant, for two reasons:

1. Bumping the minor versions would force Meteor 1.4.3 developers to
   upgrade to Meteor 1.4.4 if they wanted to use these changes.

2. The accounts-google and google-oauth packages without these changes
   will stop working completely in two weeks, which is much worse than the
   risks of upgrading.
2017-04-03 17:07:55 -04:00
Ben Newman
0a73a80b4b Upgrade uglify-js in an attempt to fix #8536. 2017-04-03 16:54:20 -04:00
Jesse Rosenberger
ef265077a9 Merge branch 'abernix/fix-windows-dev-bundle-extract-error' into release-1.4.3.x release/METEOR@1.4.4-rc.5 2017-03-30 20:16:24 +03:00
Jesse Rosenberger
ab111e7800 Detect dev_bundle download errors and fail appropriately on Windows.
This is in an attempt to resolve a situation which could occur when the
extraction of the dev_bundle.tar fails with an EOF error, but the tool
continues as if the file was fine.  Ultimately the, error preference
set in the PS1 script is only observed in the case of PowerShell
ErrorLevel and not just an error condition encountered in a command.
2017-03-30 16:12:19 +03:00
Jesse Rosenberger
2fd61b83a7 Bump package versions for 1.4.4-rc.5 release. 2017-03-30 15:47:07 +03:00
Jesse Rosenberger
e3d9bac133 Add -rc.n suffix to rate-limit. release/METEOR@1.4.4-rc.4 2017-03-30 03:14:45 +03:00
Jesse Rosenberger
de11f73477 Add -rc.n suffix to modules-runtime. 2017-03-30 02:17:18 +03:00
Jesse Rosenberger
276f828359 Bump package versions for 1.4.4-rc.4 release. 2017-03-30 02:16:40 +03:00
Jesse Rosenberger
d24cd94f20 Merge branch 'release-1.4.3.x' of https://github.com/meteor/meteor into release-1.4.3.x 2017-03-30 02:15:20 +03:00
Ben Newman
fcbd398ab7 Appending module identifier extensions should not match directories.
This logic needed to change not only in meteor/tools/isobuild/resolver.js
but also in the runtime module system:
cfcc422725

Fixes #8539.
2017-03-29 18:50:41 -04:00
Jesse Rosenberger
3257bafc84 Change wrapFsFunc for "move" to acknowledge _both_ arguments as paths.
The `wrapFsFunc` function accepts an array of indexes indicating which
arguments are paths.  This is particularly important on Windows, due to
the path-conversation which takes place on those strings.

The docs say:
> Indices of arguments that have paths, these arguments will be
> converted to the correct OS slashes

This follows up on the change made from meteor/meteor#8491 which failed
in our release pipeline when publishing for the Windows architecture
for `1.4.4-rc.3`.
2017-03-30 01:46:42 +03:00
Jesse Rosenberger
6d2b7c8070 Merge pull request #8520 from dhrubins/accounts-password-ambiguous-errors
Add ambiguous error messages option to Accounts config
2017-03-29 23:54:52 +03:00
Jesse Rosenberger
3a9bd40c81 Merge pull request #8520 from dhrubins/accounts-password-ambiguous-errors
Add ambiguous error messages option to Accounts config
2017-03-29 23:49:49 +03:00
Jesse Rosenberger
08d6d9f722 Add 1.4.4 -rc.n suffixes on accounts-base/accounts-server versions. 2017-03-29 23:17:37 +03:00
Jesse Rosenberger
fdef0dd972 Fixed trailing whitespace introduced into accounts-*.
Follows-up on 3c011c9dc.
2017-03-29 23:17:24 +03:00
Gabriel Engel
6f25191d03 Remove ES6 from ddp-client (#8516)
Follow-up to 05be2c784c which added new ES6 syntax, but failed to add `ecmascript`.

* Remove ecmascript Object function shorthand notation.
   as the `rate-limit` package doesn't currently use `ecmacsript` and using it for just this one instance of ES6 isn't worth it.
* Remove `ecmascript` from `rate-limit` as it is now unused.
* Bump `rate-limit` version in preparation for publishing.
Fixes #8515
2017-03-29 23:12:58 +03:00
Jesse Rosenberger
e30f30f04c Add TOOL_NODE_FLAGS support for Windows in the same way as Unix. (#8517)
In Unix we support adding `TOOL_NODE_FLAGS` when debugging the Meteor
tool itself, however Windows did not currently support it.  This should
add that support.  As this is a .bat file, I have every reason to
believe that this syntax should work on older versions of Windows as the
syntax of .bat files hasn't changed much.

Helps with meteor/meteor#8513.
2017-03-29 23:12:50 +03:00
mutdmour
3c011c9dc6 [fix #8218] cleaning up reset tokens also cleans up enroll tokens (#8474)
* solved issue 8218 with expireresettoken removing enroll tokens

* style fix

* tests fix

* solved issue 8218 with expireresettoken removing enroll tokens

* style fix
2017-03-29 23:12:34 +03:00
Jesse Rosenberger
ac4decbdae Maintain braces on if conditionals + other style changes.
This file leaves a lot to be desired, but strong preference to not
remove existing curly-braces on if-statements.

Also removed trailing whitespaces and slight indentation changes
following the changes in meteor/meteor#8520.
2017-03-29 21:57:27 +03:00
Gabriel Engel
43a7e174d1 Remove ES6 from ddp-client (#8516)
Follow-up to 05be2c784c which added new ES6 syntax, but failed to add `ecmascript`.

* Remove ecmascript Object function shorthand notation.
   as the `rate-limit` package doesn't currently use `ecmacsript` and using it for just this one instance of ES6 isn't worth it.
* Remove `ecmascript` from `rate-limit` as it is now unused.
* Bump `rate-limit` version in preparation for publishing.
Fixes #8515
2017-03-29 18:30:11 +03:00
Jesse Rosenberger
455bf5b6e0 Add TOOL_NODE_FLAGS support for Windows in the same way as Unix. (#8517)
In Unix we support adding `TOOL_NODE_FLAGS` when debugging the Meteor
tool itself, however Windows did not currently support it.  This should
add that support.  As this is a .bat file, I have every reason to
believe that this syntax should work on older versions of Windows as the
syntax of .bat files hasn't changed much.

Helps with meteor/meteor#8513.
2017-03-29 11:25:33 -04:00
mutdmour
1f8314348c [fix #8218] cleaning up reset tokens also cleans up enroll tokens (#8474)
* solved issue 8218 with expireresettoken removing enroll tokens

* style fix

* tests fix

* solved issue 8218 with expireresettoken removing enroll tokens

* style fix
2017-03-29 18:21:14 +03:00