Commit Graph

18528 Commits

Author SHA1 Message Date
Ben Newman
b1aa458e38 Bump package versions for 1.5-beta.10 release. release/METEOR@1.5-beta.10 2017-03-08 17:56:59 -05:00
Ben Newman
780cbf7896 Move dynamic-import/README.md to TODO.md and shorten README.md. 2017-03-08 17:56:53 -05:00
Ben Newman
db968ad975 Merge branch 'devel' into release-1.5 2017-03-08 17:33:45 -05:00
Ben Newman
525568c80c Merge pull request #8446 from mattmccutchen/shell-syntaxerror
Shell: Don't be confused by SyntaxErrors thrown by command execution.
2017-03-08 15:14:24 -05:00
Jesse Rosenberger
c2c92b9b01 Allow malformed package.json when determining binary dependencies. (#8468)
We now check `package.json` in order to help make an educated decision
as to whether or not a package has binary dependencies which need to be
rebuilt.  In some cases, such as the `npmconf` npm which is included
as a dependency of `flow-router, the `package.json` is invalid (i.e.
empty), and we should silently permit this.

Fixes meteor/meteor#8427
2017-03-08 15:12:58 -05:00
Ben Newman
621d148909 Decompose maybeClearDynamicImportCache to declutter tests. 2017-03-08 14:58:35 -05:00
Ben Newman
ec3341e7ad Inline put(store, object) helper function since used only once. 2017-03-08 14:58:35 -05:00
Ben Newman
b6b4cd6a21 Set PhantomJS offline storage path/quota for dynamic import tests.
Telling PhantomJS where it can put offline data is critical for enabling
IndexedDB, which is critical for caching dynamically imported modules.
2017-03-08 14:46:17 -05:00
Ben Newman
ac451ac73f Respect METEOR_PHANTOMJS_* env vars in dispatch:phantomjs-tests.
Same changes as 185d8e9bc5
2017-03-08 14:46:17 -05:00
Ben Newman
f955d7610c Clone dispatch:phantomjs-tests package locally in dynamic-import app.
Revision: 831dfd19bd
2017-03-08 14:46:17 -05:00
Ben Newman
30f901bf02 Increase timeout for dynamic import(...) self-tests from 60s to 90s. 2017-03-08 14:46:17 -05:00
Jesse Rosenberger
0281012fdc Rename appMiddleware to connectApp.
Because as @hwillson rightfully points out:

> that's what we're really exposing and `connect` themselves refer to the container that holds the defined middleware (the result of calling the `connect()` function) as a connect "app"."
2017-03-08 20:27:32 +02:00
domq
63b8dc04eb Export "app"
As per the comment on line 653, this appears to be the best (only?) way to let users do things like set up a custom error page to catch app-rendering-time exceptions.
2017-03-08 20:27:32 +02:00
Jesse Rosenberger
2d0fa6483e [dx] Provide warning when METEOR_SETTINGS are used in development. (#8458)
This is a developer experience (DX) change.

In production, the `METEOR_SETTINGS` environment variable is used to
pass parameters which will be available in the `Meteor.settings` within
the app.  However, `METEOR_SETTINGS` is ignored when using the
`meteor-tool` itself as in development, environment variables are
often less desirable.  Additionally, there would be no reactivity when
changing settings was necessary, instead requiring that the `meteor`
tool be restarted entirely.

On more than one occasion, developers have been confused as to why the
`METEOR_SETTINGS` are not respected in development.  To make it more
clear when this is attempted (and clarify that they will _not_ be used),
provide the a clear warning before ignoring the `METEOR_SETTINGS`
variable.

Aims to avoid meteor/meteor#8455.
2017-03-08 11:57:01 -05:00
Jesse Rosenberger
4ce0de7b16 Bump version in preparation for publishing. 2017-03-08 18:50:37 +02:00
Hugh Willson
44bb4b6506 Added missing docs for Meteor.apply's options.throwStubExceptions. 2017-03-08 11:45:08 -05:00
Ben Newman
05f6705d15 Merge pull request #8431 from hwillson/issue-8154
Added CLI help text for meteor update --all-packages.
2017-03-08 11:40:17 -05:00
Ben Newman
aab14126d1 Refresh to-do list in packages/dynamic-import/README.md. 2017-03-08 08:25:17 -05:00
Ben Newman
52c6c99b4d Remove versionsById IndexedDB object store.
Keeping track of the latest version for each module identifier was more
important when we were using localStorage, because it helped with
periodically removing unused module sources.

Since the storage limits for IndexedDB are substantially higher than for
localStorage, we can safely keep old versions in the cache, and reap the
benefits if those versions are ever needed again.

Eliminating this extra logic simplifies the caching logic considerably,
and also improves cache read performance.
2017-03-07 18:18:05 -05:00
Ben Newman
8c44044cd1 Ensure checkCount is decremented even if individual checks fail. 2017-03-07 18:14:37 -05:00
Ben Newman
23e82bb1ef Include more error information when IndexedDB operations fail. 2017-03-07 16:43:54 -05:00
Ben Newman
732915c9a2 Revert "Share cache.checkMany transaction between simultaneous calls."
This reverts commit 027d3e15a7.

This optimization was not safe in all browsers. In particular, Firefox
complained about requests against inactive transactions.
2017-03-06 21:30:36 -05:00
Ben Newman
7c37aae7cd Run meteor --help instead of --get-ready in test-in-console/run.sh.
The --help command will retrieve the dev bundle as desired, and is far
less expensive (in terms of both time and memory) than --get-ready.
2017-03-06 20:48:55 -05:00
Ben Newman
2071bdd820 Fix tests by throwing real Error objects when IndexedDB fails. 2017-03-06 20:48:54 -05:00
Ben Newman
35f488e140 Force garbage collection more aggressively during package DB sync.
This is an effort to keep the `meteor --get-ready` command from running
out of memory during Circle CI tests, as mentioned in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
2017-03-06 20:48:54 -05:00
Ben Newman
f6df21ff1e Force garbage collection more aggressively during meteor --get-ready.
This is an effort to keep the `meteor --get-ready` command from running
out of memory during Circle CI tests, as mentioned in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
2017-03-06 20:48:53 -05:00
Ben Newman
b18b1e2755 Force garbage collection more aggressively during package DB sync.
This is an effort to keep the `meteor --get-ready` command from running
out of memory during Circle CI tests, as mentioned in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
2017-03-06 20:34:56 -05:00
Ben Newman
ab0f9ba290 Force garbage collection more aggressively during meteor --get-ready.
This is an effort to keep the `meteor --get-ready` command from running
out of memory during Circle CI tests, as mentioned in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-284431618
2017-03-06 20:34:56 -05:00
Ben Newman
b0a5bd51f1 Fix tests by rejecting proper Error objects. 2017-03-04 20:56:07 -05:00
Ben Newman
4225528646 Try harder to find the indexedDB API object. 2017-03-04 20:56:00 -05:00
Ben Newman
6def3891e1 Bump package versions for 1.5-beta.9 release. release/METEOR@1.5-beta.9 2017-03-04 20:09:27 -05:00
Ben Newman
1401a3be6e Merge branch 'master' into release-1.5 2017-03-04 20:08:50 -05:00
Ben Newman
027d3e15a7 Share cache.checkMany transaction between simultaneous calls.
If import(...) is called multiple times in quick succession, these changes
should allow cache.checkMany to avoid the overhead of creating multiple
IndexedDB transactions.
2017-03-04 19:56:11 -05:00
Ben Newman
eb33152ce3 Prevent IndexedDB from auto-committing too early.
Discussion: https://twitter.com/benjamn/status/838108246841917441
2017-03-04 19:56:11 -05:00
Ben Newman
ae59532f12 Delete MeteorDynamicImportCache database before running tests.
Also run the tests a third time without deleting the database, to exercise
the caching logic.
2017-03-04 19:56:10 -05:00
Ben Newman
f9de0a7b65 Use NODE_ENV (with --production) to run production import(...) tests. 2017-03-04 19:56:10 -05:00
Ben Newman
7c48703a13 Split dynamic import(...) tests into development/production runs.
Though running the tests twice in the same app mostly worked, the error
reporting was confusing because it did not indicate which run was which.
2017-03-04 19:51:15 -05:00
Ben Newman
be68fb8d2f Call this.unblock() in __dynamicImport method.
This prevents __dynamicImport from blocking other method calls made by the
application, but introduces the possibility that __dynamicImport method
results could be delivered out of order, which is now handled in the
fetchMissing function.
2017-03-04 19:00:32 -05:00
Ben Newman
e8f224638c Postpone cache.setMany if cache.checkMany currently underway. 2017-03-04 19:00:32 -05:00
Ben Newman
afb7e31c51 Use IndexedDB instead of localStorage for caching dynamic modules.
I was able to achieve tolerable performance by using only one (read-only)
transaction for each cache.getMany call, and only one (read+write)
transaction for each cache.setMany call.
2017-03-04 19:00:31 -05:00
Jesse Rosenberger
4a9ddb6404 Add TODO about Node.js 6 repl changes.
Just a note to revisit this/clean-up in Node 6 as the `Recoverable` is now exported from Node 6's `eval` and this is no longer necessary.

* https://github.com/nodejs/node/blob/v6.x/lib/repl.js#L1398
* https://nodejs.org/api/repl.html#repl_custom_evaluation_functions
2017-03-03 17:16:39 +02:00
Jesse Rosenberger
513c270013 Add quotes around "meteor update" command. 2017-03-03 16:46:13 +02:00
Matt McCutchen
28309de07b Shell: Don't be confused by SyntaxErrors thrown by command execution.
Apply the check for a SyntaxError indicating an incomplete command only
to the ECMAScript translation and parsing of a command and not to the
execution, following the example of Node's defaultEval function.

Fixes #8290.
2017-03-02 16:23:30 -05:00
Jesse Rosenberger
ad11a741bd Add brackets around package name.
To indicate that it's a variable, in the same way that `<target-version>` is notated (as well as other places in the `help.txt`).
2017-03-01 19:40:00 +02:00
Hugh Willson
8b431c6f80 Removed additional "newer versions" message reference; not needed. 2017-03-01 12:03:59 -05:00
Hugh Willson
56ad858559 Prevent accounts configuration UI warning from showing when using service-configuration. (#8429) 2017-03-01 19:01:19 +02:00
Jesse Rosenberger
eb458300e8 Change formatting on isArray helper method. 2017-03-01 18:46:05 +02:00
brucejo
5f0de68975 Added vm generated array test, commented isArray function 2017-03-01 18:46:04 +02:00
brucejo
429529fbaf created function to test isArray, updated tests 2017-03-01 18:46:04 +02:00
brucejo
138ceb1ca4 Complete fix for #8160, handle subclassed objects. Added test 2017-03-01 18:46:04 +02:00