Commit Graph

18480 Commits

Author SHA1 Message Date
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
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
3d17958f5d Merge pull request #8437 from meteor/abernix/feature/remove-minifier-css-pin
Remove version constraint from minifier-css in standard-minifier-css.
2017-03-01 13:07:36 +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
63dfd101c3 Merge pull request #8436 from meteor/abernix/feature/remove-pin-version
Remove version constraint from `standard-minifier-js`.
2017-03-01 01:41:15 +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
58a5fdbde7 Merge pull request #8414 from meteor/abernix/feature/minifier-catch-error
Improve minifiers to capture error from UglifyJS.
2017-02-28 16:27:24 +02:00
Jesse Rosenberger
fc606016e2 Add History.md entry for standard-minifier-js changes. (#8414) 2017-02-28 14:46:20 +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
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
Ben Newman
a78b09fa85 Check arguments to __dynamicImport method call.
This prevents the audit-argument-checks package from complaining about
this method in production.
2017-02-22 12:28:59 -05:00
Ben Newman
cd62d4284e Enable eval if browser-policy-content is used. 2017-02-22 10:46:39 -05:00
Ben Newman
a9ac309fb9 Bump package versions for 1.5-beta.8 release. release/METEOR@1.5-beta.8 2017-02-21 13:26:01 -05:00
Ben Newman
7031ea1dd5 Bump LINKER_CACHE_SALT for good measure.
Recent changes to the way the linker works might not be reflected unless
we invalidate .meteor/local/bundler-cache.
2017-02-21 13:25:58 -05:00
Ben Newman
41e9ee857e Evaluate dynamic module code in package scope.
This should elegantly address the issues described in this comment:
https://github.com/meteor/meteor/pull/8327#issuecomment-280881830

I toyed with the possibility of turning package variables (both imports
from other packages and intercepted "global" variable assignments) into
properties on a shared namespace object, but that would have been a major
breaking change for existing package code, because it would have required
automatically rewriting variable references in package modules.
2017-02-21 11:47:31 -05:00
Ben Newman
2c172db31a Merge branch 'devel' into release-1.5 2017-02-21 11:33:00 -05:00
Ben Newman
2a32faf27a Bump package versions for 1.5-beta.7 release. release/METEOR@1.5-beta.7 2017-02-16 18:34:03 -05:00
Ben Newman
15135a65df Test importing lazy packages and dynamic package modules. 2017-02-16 18:20:42 -05:00
Ben Newman
a1c4df3f57 Call api.use("ddp") in dynamic-import/package.js.
Though I am still considering alternatives to DDP, the dynamic-import
package should depend on the packages that it uses.
2017-02-16 18:20:42 -05:00
Ben Newman
edb4e0664c Walk dynamic module graph synchronously.
I made this code asynchronous at first to accommodate the asynchronous
cache API, but walking the graph needs to happen synchronously so that
near-simultaneous dynamic import(...)s do not interleave.
2017-02-16 18:20:41 -05:00
Ben Newman
eadd954115 Use alias instead of stub module for meteor/package imports.
Aliases are lighter weight than stub module functions, and easier for the
dynamic import(...) dependency traversal logic to understand.
2017-02-16 18:20:41 -05:00
tcastelli
907e1d9183 Update help text to clarify the use of external npm commands (#8355)
* Update help text to clarify the use of external npm commands

First attempt to improve the help text regarding the external npm commands that can be run directly with 'meteor'.
#8277
Further enhancements could include listing also the "current" available external commands by parsing a ls/dir command or 'meteor npm list -g -depth 0'. If they command is uninstalled between the call of 'meteor help' and 'meteor <external command>' we are not the ones to be blamed but the user instead :)

* Update 'external command' to 'npm command'

* Joining new suggestions and cleaning some redundancy

Included @abernix suggestions (with some variations) to include references to npm and node. Also clarified how to install a npm package and run it afterwards

* Typo

Changed to global context

* Reword description of "other" npm commands

These commands are similar to `node` and `npm`, but we didn't want
them to be confused with `npm command` commands.

* Avoid repetition of `meteor npm install --global`
2017-02-15 15:46:53 -05:00
Jesse Rosenberger
de2e16b313 Bump version of check package to 1.2.5 in preparation for publishing. 2017-02-15 21:42:28 +02:00
Jesse Rosenberger
da91afd54f Add History.md entry about updating check package.
To document the updating of the `jQuery.isPlainObject` for meteor/meteor#7354.
2017-02-15 21:41:31 +02:00
Ben Newman
c2e4b77636 Protect against edge case when resolved is a string.
In particular, if the "main" field of the package.json file cannot be
resolved, then the `resolved` variable will be "missing", which is a
truthy value that silently rejects property assignments. Ugh!
2017-02-15 14:09:36 -05:00
Ben Newman
0b26890d97 Protect against edge case when resolved is a string.
In particular, if the "main" field of the package.json file cannot be
resolved, then the `resolved` variable will be "missing", which is a
truthy value that silently rejects property assignments. Ugh!
2017-02-15 14:07:27 -05:00