Commit Graph

8286 Commits

Author SHA1 Message Date
Ben Newman
b1aa458e38 Bump package versions for 1.5-beta.10 release. 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
Ben Newman
ec3341e7ad Inline put(store, object) helper function since used only once. 2017-03-08 14:58:35 -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
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
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
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. 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
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
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
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
Dave Workman
1fe319306b Implemented $bitsAllClear, $bitsAllSet, $bitsAnyClear, $bitsAnySet in minimongo (#8350)
* Implemented $bitsAllSet, $bitsAllClear, $bitsAnyClear, $bitsAnySet in mini-mongo

* Refactored bitwise operator implementations in minimongo

* Use _.isUndefined instead of typeof

* Removed unnecessary comment.

* Refactored bit comparisons into functions
2017-03-01 18:33:52 +02:00
Khang Nguyen-Le
241c92d590 Add callback to DDPRateLimiter.addRule, run after a rule is executed (#8237)
* Add callback to DDPRateLimiter.addRule, run after a rule is executed

* Change signature and add tests for DDPRuleLimter callback
2017-03-01 18:14:47 +02:00
Jesse Rosenberger
97226b511d Merge branch 'master' into devel 2017-03-01 13:09:23 +02:00
Jesse Rosenberger
6ec8143518 Bump package version in preparation for publishing. 2017-03-01 12:39:56 +02:00
Jesse Rosenberger
8fdea33cfb Remove version constraint from minifier-css in standard-minifier-css.
This restriction was preventing the standard-minifier-css from getting
the latest updates to minifier-css.  Typically, when publishing
a package outside of a release cycle, I believe we need to manually add
this constraint since `meteor publish-release` normally takes care of it
automatically, however in most cases, I don't believe this should be
(permanently) committed.

I may stand to be corrected, but will find out soon!
2017-03-01 12:24:33 +02:00
Jesse Rosenberger
71f0876b4c Merge branch 'master' into devel 2017-03-01 01:43:59 +02:00
Jesse Rosenberger
1503dd1d9c Remove version constraint from standard-minifier-js.
This was only intended to be there during the publishing of
`standard-minifier-js` as part of meteor/meteor#8414 and is normally
not necessary as part of the `meteor publish-release` process.
2017-03-01 01:39:37 +02:00
Jesse Rosenberger
c6b7c8db17 Merge branch 'master' into devel 2017-02-28 16:37:05 +02:00
Jesse Rosenberger
aeee279d6d Remove -beta.* suffixes in preparation for publishing. 2017-02-28 14:41:34 +02:00
Jesse Rosenberger
394812df15 Add version constraint on minifier-js@1.2.18-beta.0. 2017-02-28 14:29:46 +02:00
Jesse Rosenberger
c24cb71c11 Bump package versions in preparation for publishing. 2017-02-28 13:42:39 +02:00
Jesse Rosenberger
6c4507f004 Allow minified.code to be an empty string.
In order to allow for a blank `app.js` which occurs in the case of
a Meteor app using a fully-"package"-based structure with no actual
application code in the top-level.  See meteor/meteor#8414 for more.
2017-02-28 13:42:39 +02:00
Jesse Rosenberger
4e6d07d2a3 Undangle dangling semi-colon. 2017-02-28 13:42:38 +02:00
Jesse Rosenberger
e898c3a25f Bump package versions in preparation for publishing. 2017-02-28 13:42:38 +02:00
Jesse Rosenberger
aa111f83f1 Remove underscore dependency which is not used in this package. 2017-02-28 13:42:38 +02:00
Jesse Rosenberger
1a380f5532 Improve minifiers to capture error from UglifyJS.
The error messages which come from UglifyJS tend to be quite cryptic, as
seen in issues like meteor/meteor#8370 or meteor/meteor#8020.  The file,
line, and column are provided, however the message is garbled and the
stacktrace long and acutely harrowing.  Since these errors are occurring
on automatically concatenated files, even the line number is sometimes
not helpful.  Additionally, sourceMaps are not available in production
builds, intentionally.  (I wasn't able to access them from
`file.getSourceMap()` or `file.sourceMap` at all.)

In addition to actually providing the name of the encapsulating file,
which provides _some_visibility, this commit implements a parser around
the UglifyJS error which detects the error and location information of
the error, seeks to the line in the concatenated source, reads the
inline filename, and provides it in the output.

Crude, but incredibly helpful in diagnosing this problem until a better
solution is reached.
2017-02-28 13:42:38 +02:00
Maciej Trębacz
c3547666e9 Remove jQuery dependency from http package (#8389)
`jquery` is no longer necessary as of 4e922fd709 and thus the removal of this dependency is warranted.
2017-02-23 12:38:40 +02:00
Maciej Trębacz
705ff31062 Remove jQuery dependency from http package (#8389)
`jquery` is no longer necessary as of 4e922fd709 and thus the removal of this dependency is warranted.
2017-02-23 12:31:04 +02:00