Commit Graph

17840 Commits

Author SHA1 Message Date
Ben Newman
548a288c61 Call Npm.require("meteor-babel") only when needed.
In practice, the non-isopacket version of meteor-babel is only used by the
shell-server package, so this saves ~200ms of reload time.
2016-10-22 21:14:39 -04:00
Ben Newman
5ae7a0954d Mark JS hot-code-push test "slow" so CircleCI will skip it.
This test has been the primary source of test suite unreliability in
recent weeks. By marking it "slow" I'm effectively disabling it on
CircleCI, which I think is acceptable because (1) it is, in fact, quite
slow; (2) it passes locally on Linux; and (3) it depends on the timing of
file change notifications, which is a recipe for test flakiness due to the
general non-determinism of file watching, but not necessarily a sign of a
broken developer experience.

Like other "slow" tests, I will keep running this test locally via

  meteor self-test --slow 'javascript hot code push'

as part of the manual QA testing that we do.
2016-10-22 13:56:06 -04:00
Ben Newman
0492b21333 Attempt to fix hot-code-push test by adding additional timeout. 2016-10-22 11:59:45 -04:00
Ben Newman
b938e089e6 Bump package versions for 1.4.2-rc.2 release. release/METEOR@1.4.2-rc.2 2016-10-21 22:20:34 -04:00
Ben Newman
4ecfaad4b1 Bump $BUNDLE_VERSION to 4.6.1 before rebuilding dev bundle.
For once, this version coincides exactly with the Node version!
2016-10-21 22:16:29 -04:00
Ben Newman
e2be0bbc8a Upgrade the npm npm package to version 3.10.9. 2016-10-21 22:16:29 -04:00
Ben Newman
0308e38d51 Merge branch 'release-1.4.1.3' into release-1.4.2 2016-10-21 22:03:54 -04:00
Ben Newman
0d3c74d11c Only call watchersByIno.set(ino, entry) if ino > 0. 2016-10-21 21:39:39 -04:00
Ben Newman
35da19ab4e Avoid "The handle(...) returned by watching..." errors on Linux.
It's a shame that Pathwatcher issues this warning using console.error,
without taking any verbosity options into account:
https://github.com/atom/node-pathwatcher/blob/7ef76e5dfd/src/main.coffee#L53

Fortunately, I believe I've identified the underlying reason why this
happens, which may help resolve the following issue:
https://github.com/atom/node-pathwatcher/issues/98

If all goes well, I'll submit an upstream pull request.

I've also reinstated an old file watching test that I mistakenly removed
when I attempted to switch to chokidar instead of pathwatcher.
2016-10-21 21:14:44 -04:00
Ben Newman
f419899ce7 Bump package versions for the official 1.4.1.3 release. release/METEOR@1.4.1.3 2016-10-21 20:15:28 -04:00
Ben Newman
48a2ccbde7 Dirty optimistic functions when node_modules directories change.
This is a bit different from the previous strategy of invalidating
optimistic functions for specific npm package names.

Now, whenever we make changes to the contents of a specific node_modules
directory, or whenever the developer independently modifies an app's
node_modules directory, all optimistic results derived from paths
contained within that node_modules directory will be marked as dirty, and
thus may need to be recomputed.

This strategy prioritizes starting fewer watchers (just one per
node_modules directory) while still allowing npm packages to be added or
removed while the app is running:

  https://github.com/meteor/meteor/pull/7668#issuecomment-255120373

The drawback is that changes within subdirectories of node_modules will
not be detected until the server is fully restarted, but that seems like
an acceptable tradeoff, since npm packages change much less often than
application code.
2016-10-21 20:06:23 -04:00
Ben Newman
5df8f89f7b Warn about babel-runtime helpers not provided by the Meteor package. 2016-10-21 17:56:01 -04:00
Ben Newman
42a9d37326 Tolerate missing files in ImportScanner#_readModule. 2016-10-21 14:00:13 -04:00
Ben Newman
e50d916709 Don't swallow JSON.parse SyntaxErrors in optimisticReadJsonOrNull. 2016-10-21 14:00:13 -04:00
Ben Newman
247fa7b8ae Bump package versions for 1.4.1.3-rc.1 release. release/METEOR@1.4.1.3-rc.1 2016-10-21 12:38:09 -04:00
Ben Newman
c6975d8eb7 Upgrade mongodb npm package to version 2.2.11. 2016-10-21 12:28:34 -04:00
Ben Newman
dc91fee73f Remove version constraints from packages/accounts-base/package.js.
Version constraints are unnecessary when publishing a release, and tend to
complicate things when the constraints are out of date with packages that
are updated by the release.
2016-10-21 12:27:50 -04:00
Christian Klaussner
f9b0f2f60d Update links to MongoDB driver docs 2016-10-21 11:25:18 -04:00
Ben Newman
47d3546b3a Fix problems in request callback that broke getUrlWithResuming tests. 2016-10-21 11:25:17 -04:00
Ben Newman
545493b34a Report an error when HTTP request body is incomplete.
When a download aborts prematurely, the status code is often 200 OK, even
though we probably should not proceed with any further processing of the
downloaded information.

This silent failure leads to problems like the dreaded "Error: ENOENT: no
such file or directory, open... os.json" (#7806 and others), which were
hard to diagnose properly because the failure occurred only later, when
extracting a buffer that downloaded incompletely.

The getUrlWithResuming helper should be able to retry after this error is
thrown, which will result in a more helpful warning, even if in the most
common case, i.e. MaxCDN failure, it will never actually succeed.

Note that this change will not help until Meteor 1.4.2 is officially
released and becomes the implementation used to download later releases.

Mitigates #7806.
2016-10-21 11:25:17 -04:00
Ben Newman
aa68060445 Protect against null return values from getDevBundleForRelease. (#7841)
Fixes #7838.
2016-10-21 11:25:17 -04:00
Ben Newman
c167309e7f Support meteor <command> for any dev_bundle/bin/<command> executable.
This will make it easier to use tools like https://yarnpkg.com/ with the
right version of Node, etc.

With this commit, here's all you have to do:

  meteor npm install -g yarnpkg

Then test that it works:

  meteor yarn info

Note that any commands registered by Meteor itself will not be honored.
2016-10-21 11:12:55 -04:00
Ben Newman
5d3e2bd884 Bump mongo package version to 1.1.12_5. 2016-10-21 11:12:54 -04:00
Ben Newman
0344f58b06 Set mongoOptions.server.reconnectTries = Infinity.
Setting mongoOptions.server.auto_reconnect was removed by #7880 via commit
0ffb9ac824, though it seems the Server
options still respect autoReconnect, even in version 2.2 of the driver:
http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html

That said, having inspected the code of the `mongodb` package, I do not
believe this change is really critical, since the default value for
autoReconnect appears to be true.

More importantly, I can't find any support in the code of the `mongodb`
npm package or its dependencies for the claim that setting
mongoOptions.server.reconnectTries to 0 is the same as making it infinite,
so this commit sets it to Infinity.
2016-10-21 11:12:54 -04:00
Ben Newman
037e9b8820 Use npm-mongo@2.2.10_1 in mongo@1.1.12_4. 2016-10-21 11:12:54 -04:00
Ben Newman
ef4f547a94 Make npm-mongo package version match npm mongodb package. 2016-10-21 11:12:53 -04:00
Tom Coleman
554eb628eb Reconnect to mongo indefinitely. (#7880)
* Reconnect to mongo indefinitely.

A fix for https://github.com/meteor/meteor/issues/7822

It seems the driver now always autoReconnects, but only for 30s.

To get the old (sensible) behavior of endlessly reconnecting, we set `reconnectTries` to 0.

* Releasing an rc of mongo package
2016-10-21 11:12:53 -04:00
Ben Newman
738f7560b4 Add note about killing mongod on shutdown to History.md. 2016-10-21 11:12:50 -04:00
Ben Newman
c20609022f Kill mongo when server process exits.
We try to kill any mongod processes before starting new ones, but this
change kills it when the development server shuts down, too.

Killing mongo on shutdown is particularly important for tests that run
meteor multiple times in a row, and for whatever reason fail to find and
kill running mongod processes on startup, e.g. because the --port has
changed (#7563).

This comment by @glasser seems to suggest this is a reasonable idea:
https://github.com/meteor/meteor/issues/2182#issuecomment-45685614

Fixes #2182 and possibly other related bugs.
2016-10-21 11:12:32 -04:00
Ben Newman
b8d872fa77 Automatically reconfigure Mongo replication set when --port differs.
Fixes #7563.
2016-10-21 11:12:26 -04:00
Ben Newman
61d647f9f7 Don't try to use native tar command on Windows.
Fixes #7689.
2016-10-21 10:56:46 -04:00
Ben Newman
94754ca9e9 Bump $BUNDLE_VERSION to 4.6.0 before rebuilding dev bundle. 2016-10-20 17:51:04 -04:00
Ben Newman
9ff66d11c7 Ugrade the meteor-promise npm package to version 0.8.0.
Most notably, this update provides error stack traces that include context
from Promise.await calls and await expressions, so (for example) you can
tell where a certain yielding files.* method was originally called,
instead of only getting a useless native stack trace.
2016-10-20 17:51:03 -04:00
Ben Newman
73519c2b79 Fix shrink_fibers function in generate-dev-bundle.sh.
This logic needs to agree with the following expression:
https://github.com/laverdet/node-fibers/blob/8d7e4ffeb5151ade/build.js#L31
2016-10-20 17:19:56 -04:00
Ben Newman
6b06f440f1 Upgrade the fibers npm package to version 1.0.15.
This should hopefully improve performance in the rare event that a large
number of fibers get created simultaneously.
2016-10-20 17:19:55 -04:00
Ben Newman
0f7d725ebe Bump package versions for 1.4.1.3-rc.0 release. release/METEOR@1.4.1.3-rc.0 2016-10-20 13:56:00 -04:00
Ben Newman
cfb8a572c8 Bump $BUNDLE_VERSION to 4.4.1 before rebuilding dev bundle. 2016-10-20 13:53:01 -04:00
Ben Newman
982853e727 Update Node to version 4.6.1.
https://nodejs.org/en/blog/release/v4.6.1/
2016-10-20 13:38:48 -04:00
Ben Newman
0168065d17 Fix shrink_fibers function in generate-dev-bundle.sh.
This logic needs to agree with the following expression:
https://github.com/laverdet/node-fibers/blob/8d7e4ffeb5151ade/build.js#L31
2016-10-20 13:37:14 -04:00
Ben Newman
ba7f0169f7 Upgrade the fibers npm package to version 1.0.15.
This should hopefully improve performance in the rare event that a large
number of fibers get created simultaneously.
2016-10-20 13:20:00 -04:00
Ben Newman
04056db28f Bump package versions for 1.4.2-rc.1 release. release/METEOR@1.4.2-rc.1 2016-10-19 18:12:27 -04:00
Ben Newman
04b5227d43 Bump $BUNDLE_VERSION to 4.3.7 before rebuilding dev bundle. 2016-10-19 17:26:26 -04:00
Ben Newman
6af6eee022 Update Node to version 4.6.1.
https://nodejs.org/en/blog/release/v4.6.1/
2016-10-19 17:26:00 -04:00
Ben Newman
f731bda922 Merge branch 'devel' into release-1.4.2 2016-10-19 16:01:24 -04:00
Ben Newman
fec8303c21 Use Array#forEach in twitter_client.js. 2016-10-19 16:00:00 -04:00
Jesse Rosenberger
c67f782743 Support additional params on oAuth1 authorize URL
Using a the previously-supported ability to pass a function (versus a string) for an oAuth1 URL, this commit implements (and relocates) a function which safely applies whitelisted params to that URL.

This introduces a twitter_common.js file shared between server and client which indicates which Twitter-supported params are permitted on the authorize step.  The two params which Twitter supports right now are `force_login` and `screen_name`.  (See: https://dev.twitter.com/oauth/reference/get/oauth/authenticate)

This commit removes the non-functional implementation of `force_login` introduced by meteor/meteor#6987 and implements it via the aforementioned method.

As a precaution (and since neither `ecmascript` nor `es5-shim` are used by this package), I stuck with JS ES3.

Closes meteor/meteor#7584
2016-10-19 16:00:00 -04:00
dhrubins
3e1a449f5e Fix CSP2 script digests in browser policy (#7911). 2016-10-19 14:56:06 -04:00
Jesse Rosenberger
90f65cdac7 Remove message about filing an issue if nofile ulimit can't be raised
While this seems like a good idea to find any edge-cases I wasn't thinking of, I'm afraid this would be be displayed frequently for users that set their `ulimit -n` higher in their shell profile since `ulimit -n` can only be lowered once explicitly set in a particular session.
2016-10-19 14:38:53 -04:00
Jesse Rosenberger
36f0eb667d Raise ulimit for nofile to the system maximum
This should permit watching as many files as the system permits.  Previously, if the default ulimit was set to a value higher than 16384, it was lowered and if the user had configured their system to have a higher ulimit, Meteor wouldn't have take advantage of it.
2016-10-19 14:38:53 -04:00
Jesse Rosenberger
fb5ceb62ff Increase the value of the first ulimit max open files change attempt
Make the first attempt 32768 instead of 16384 since some users have large numbers of files or node_modules trees (meteor/meteor#6952).  This hasn't been raised since Meteor started watching many more files nor since the addition of native NPM.
2016-10-19 14:38:53 -04:00