Commit Graph

21307 Commits

Author SHA1 Message Date
Ben Newman
183d5ff950 Bump package versions for 1.7.1-beta.14 release. release/METEOR@1.7.1-beta.14 2018-07-02 21:35:42 -04:00
Ben Newman
6cea010800 Use Reify Visitor to reimplement findImportedModuleIdentifiers.
Now possible because of https://github.com/benjamn/reify/pull/202.

Similar in spirit to a62a2adf77.
2018-07-02 20:09:12 -04:00
Ben Newman
b19f9fadf2 Bump $BUNDLE_VERSION to 8.11.3.3 before rebuilding dev bundle. 2018-07-02 20:09:12 -04:00
Ben Newman
c5c5a36052 Update reify npm package to version 0.16.3. 2018-07-02 20:09:12 -04:00
Ben Newman
a62a2adf77 Tolerate multiple meteorInstall calls when scanning bundle stats.
Because of 8b04c25390, there may now be
multiple calls to meteorInstall in the modules package bundle.

The code for extracting module sizes from the minified bundle previously
assumed there would be only one call to meteorInstall, so this commit
allows for more than one call.

While I was at it, I deleted the simplistic Visitor implementation this
code was using in favor of the more sophisticated Visitor provided by the
reify package, which has the abitlity to skip whole subtrees that do not
contain the identifier(s) we care about.
2018-07-02 18:12:34 -04:00
Ben Newman
6075ba5c8c Bump package versions for 1.7.1-beta.13 release. release/METEOR@1.7.1-beta.13 2018-07-02 11:37:30 -04:00
Ben Newman
83156b0055 Merge branch 'devel' into release-1.7.1 2018-07-02 11:22:51 -04:00
Ben Newman
187b2e9f42 Replace uglify-es with terser, a more actively maintained fork. (#10045)
This may help with lots of issues, most recently #10044 but also #10034, #9976, #9711, and #9568,
to name a few. In particular, since we silently fall back to
`Babel.minify` when `uglify-es` (now `terser`) fails, there should be
fewer problems with `Babel.minify` (parse errors, performance, memory
usage) if `terser` succeeds more often.

Note: because we have bumped the minor versions of `minifier-js` and
`standard-minifier-js`, and they are core packages, you'll have to be
using the next beta version of Meteor 1.7.1 in order to update to these
versions, unless you clone those packages into your local `packages/`
directory. However, if we can validate that `terser` is fully backwards
compatible with `uglify-es`, we might be able to back-port this fix as a
patch update, or publish a Meteor 1.7.0.4 release that permits
`minifier-js@2.4.x`.
2018-07-02 11:21:16 -04:00
Ben Newman
d546f9d0c4 Bump package versions for 1.7.1-beta.12 release. release/METEOR@1.7.1-beta.12 2018-06-30 13:22:01 -04:00
Ben Newman
781b6547b3 Regenerate eslint/package-lock.json with current npm version. 2018-06-30 13:20:10 -04:00
Ben Newman
e860549bf0 Ignore a few more Babel presets in .babelrc files. 2018-06-30 13:17:29 -04:00
Ben Newman
e8d85362d1 Ensure getPrelinkedOutputCached cannot mix modern/legacy output. 2018-06-30 13:02:21 -04:00
Ben Newman
1e8ef00280 Bump package versions for 1.7.1-beta.11 release. release/METEOR@1.7.1-beta.11 2018-06-30 12:09:15 -04:00
Ben Newman
1cd91b5409 Cache File#getPrelinkedOutput in linker.js.
Another big win thanks to optimistic caching.
2018-06-30 11:44:25 -04:00
Ben Newman
1ed095c36d Cache minified CSS in minifyCssFiles rather than relying on plugins.
Static CSS gets merged in development as well as production by
ClientTarget#minifyCss; the only difference is that the CSS is also
minified in production. This development-time merging is especially
expensive because it involves source maps, and happens on every rebuild of
the app. That's why ClientTarget#minifyCss consistently shows up in
METEOR_PROFILE output for rebuilds.

The standard-minifier-css package tries to cache the merging based on the
hashes of the input files:
8a562523a4/packages/standard-minifier-css/plugin/minify-css.js (L58-L62)

However, not all CSS minifier plugins use a strategy like this, and
https://atmospherejs.com/juliancwirko/postcss is an increasingly popular
one that does not.

The time has come to move this caching logic into the Meteor build tool
itself, so that CSS minifier plugins no longer have to worry about basic
caching, and everyone who uses CSS minifiers with Meteor will benefit.

This implementation leverages Meteor's powerful optimistic caching
techniques to keep previous results in memory only as long as the minifier
object remains reachable.
2018-06-30 11:34:40 -04:00
Ben Newman
7b6fd0ee10 Let buildmessage.markBoundary take optional context argument.
Since markBoundary is essentially creating a bound wrapper function,
there's no reason we can't actually bind the function to a specific
context (this) object at the same time, instead of having to bind the
function and then wrap it with buildmessage.markBoundary.
2018-06-30 11:02:02 -04:00
Ben Newman
2ced13a180 Bump package versions for 1.7.1-beta.10 release. release/METEOR@1.7.1-beta.10 2018-06-29 18:17:55 -04:00
Ben Newman
0097cd1f2b Make processFilesForTarget methods async in caching-compiler.
This ensures that the entire compilation batch runs in its own Fiber,
since each async function invocation recycles a Fiber from the pool.
2018-06-29 18:17:52 -04:00
Ben Newman
2558f623b0 Avoid creating massive Promise.all blocks in caching-compiler.
With lazy compilation, it should be cheap to pass a ton of files to
processFilesForTarget, as long as only a small percentage of them are
actually used by the application.

Before this change, every inputFile passed to processFilesForTarget would
get its own async function, which took considerably more time to resolve
than using Promise.await inside getResult to handle any Promise returned
by the compileOneFile method.

In other words, this change should significantly reduce the METEOR_PROFILE
timings for items like "other plugin less..." especially during rebuilds,
when very few files actually need to be recompiled.
2018-06-29 17:40:48 -04:00
Ben Newman
32dc8833a1 Bump package versions for 1.7.1-beta.9 release. release/METEOR@1.7.1-beta.9 2018-06-29 12:26:52 -04:00
Ben Newman
105abf850f Merge branch 'devel' into release-1.7.1 2018-06-29 12:25:23 -04:00
Ben Newman
8a562523a4 Bump webapp package version to 1.6.2. 2018-06-29 12:23:24 -04:00
Ben Newman
d291dffbb3 Fix ROOT_URL path prefix stripping in webapp_server.js. (#10040)
Thanks to @Zodiase for doing most of the investigation here:
https://github.com/meteor/meteor/issues/10019#issuecomment-401225148

Fixes #10019.
2018-06-29 12:22:03 -04:00
Ben Newman
a8b4a30f8e Remove some trailing whitespace from bundle-visualizer files. 2018-06-29 11:53:51 -04:00
James Burgess
9b0f38cec4 Split bundles into separate sunbursts in bundle-visualizer (#10025) 2018-06-29 11:43:45 -04:00
Ben Newman
b920f6fe15 Bump package versions for 1.7.1-beta.8 release. release/METEOR@1.7.1-beta.8 2018-06-28 19:08:08 -04:00
Ben Newman
e53c74c2cb Merge branch 'devel' into release-1.7.1 2018-06-28 19:04:15 -04:00
Ben Newman
4502ad6e57 Merge pull request #10029 from meteor/isomorphic-fetch
Provide isomorphic implementation of WHATWG fetch() API.
2018-06-28 18:58:53 -04:00
Ben Newman
9abd2ce4c8 Add another basic fetch() test. 2018-06-28 18:52:58 -04:00
James Burgess
a20f4e74d8 Replace http with fetch in bundle-visualizer (#10031) 2018-06-28 18:33:44 -04:00
Ben Newman
a024544b45 Switch appcache tests from HTTP to fetch(). 2018-06-28 18:32:31 -04:00
Ben Newman
4363c4d0ec Removed unused http dependency from ddp-client. 2018-06-28 18:32:31 -04:00
Ben Newman
6e4b7b4d3d Remove unused http and random dependencies from autoupdate. 2018-06-28 18:32:30 -04:00
Ben Newman
2be9902a1e Switch dynamic-import from HTTP to fetch. 2018-06-28 18:32:30 -04:00
Ben Newman
06ea07d14b Provide isomorphic implementation of WHATWG fetch() API. 2018-06-28 18:25:14 -04:00
Ben Newman
8b04c25390 Emit multiple meteorInstall calls for distinct meteorInstallOptions.
I recently noticed a bug whereby modules transferred from the application
bundle to the modules bundle would lose their application-specific import
extensions, since all modules installed in the modules bundle have only
.js and .json as import extensions, matching default Node behavior.

This commit fixes that bug by emitting one meteorInstall call per distinct
meteorInstallOptions object. This logic would work if every module had a
different meteorInstallOptions object, but in practice the modules bundle
should end up with exactly two meteorInstall calls, because a single
options object is shared among all modules from the same source batch.
2018-06-28 18:07:34 -04:00
Ben Newman
ae609e0d96 Improve file.imported logic in the ImportScanner. 2018-06-28 14:12:24 -04:00
Ben Newman
6b572c6ad3 Bump package versions for 1.7.1-beta.7 release. release/METEOR@1.7.1-beta.7 2018-06-26 15:48:08 -04:00
Ben Newman
ce4197cb71 Mention update of install npm package in History.md. 2018-06-26 15:46:21 -04:00
Ben Newman
eee2557a44 Update meteor-babel to version 7.0.0-beta.51-1. 2018-06-26 15:45:45 -04:00
Ben Newman
b425a82afe Merge branch 'devel' into release-1.7.1 2018-06-26 15:13:45 -04:00
Ben Newman
6fa99a9923 Merge pull request #10033 from meteor/improve-lazy-output-resource-error-reporting
Improve lazy OutputResource error reporting.
2018-06-26 15:11:39 -04:00
Ben Newman
ea69f4ece1 Make unchecked pending errors fatal in OutputResource#_get. 2018-06-26 14:37:09 -04:00
Ben Newman
cf804f22e4 Do not return files with errors from ImportScanner#getOutputFiles.
This works whether or not the file object is a JsOutputResource.
2018-06-26 14:25:32 -04:00
Ben Newman
59eecf9dad Ensure at least one error reported when lazyFinalizer fails. 2018-06-26 14:24:16 -04:00
Ben Newman
5abc8fbdd2 Always record ResourceSlot errors in InputFile#addError. 2018-06-26 13:54:09 -04:00
Ben Newman
9f7ef9cdb1 Fix compiler plugins caching self-test for the stylus plugin. 2018-06-26 13:09:37 -04:00
Ben Newman
de3fef17ca Stop eagerly forcing compilation of lazy CssOutputResources.
This should be a better fix for the problem I tried to fix with
479e505d71.

If we're going to be using compileOneFileLater by default, that's what we
should be testing in the compiler plugins self-tests.
2018-06-26 13:09:28 -04:00
Ben Newman
f7f3d34181 Mark non-isRoot files lazy in MultiFileCachingCompiler.
The concept of a "root" file is specific to MultiFileCachingCompiler, so
we need to normalize it into a representation that makes sense to the rest
of the compiler plugin system.

Should help with #10014.
2018-06-26 13:09:14 -04:00
Ben Newman
2d4019ddd9 Bump package versions for 1.7.1-beta.6 release. release/METEOR@1.7.1-beta.6 2018-06-25 16:47:33 -04:00