Commit Graph

21295 Commits

Author SHA1 Message Date
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
Ben Newman
156f167d52 Merge branch 'devel' into release-1.7.1 2018-06-25 16:45:30 -04:00
Ben Newman
24865b28a0 Wrap Module.prototype.require instead of using options.wrapRequire.
a630b5c2ac
7a9abeca88
2018-06-25 16:43:46 -04:00
Ben Newman
9f06a6f6c5 Allow resolving index.* modules with non-.js file extensions. (#10027)
The previous commit enabled importing index.* modules at runtime, but
unfortunately the build-time Resolver logic also needed updating, which
will require a new Meteor release.
2018-06-25 14:36:45 -04:00
Ben Newman
445fd3714a Update install package used by modules-runtime to version 0.11.1.
This enables using index.* modules with non-.js file extensions to make
the containing directory importable (cc @justinanastos):
c417044421

Since this is a core package patch update, you can update to this version
of the modules-runtime package by running

  meteor update modules-runtime

This should give you modules-runtime@0.10.1.
2018-06-25 13:25:15 -04:00
Ben Newman
f804132d7b Bump package versions for 1.7.1-beta.5 release. release/METEOR@1.7.1-beta.5 2018-06-23 10:22:28 -04:00
Ben Newman
35e6d912e0 Fix compiler plugins caching self-test for the stylus plugin. 2018-06-23 09:57:38 -04:00
James Burgess
fbea42ca7c Replace generic bundle names with arch names in bundle-visualizer (#10021) 2018-06-22 16:46:34 -04:00
Ben Newman
211d0b25fa 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-22 16:43:55 -04:00
Ben Newman
fb8bcf44b0 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-22 16:43:54 -04:00
Ben Newman
a355eaa5f3 Merge branch 'devel' into release-1.7.1 2018-06-18 16:19:23 -04:00
Ben Newman
f42629ce5e Merge branch 'master' into devel 2018-06-16 15:21:11 -04:00
Ben Newman
3fe7fb9ebf Merge branch 'release-1.6.1.3' 2018-06-16 15:18:44 -04:00