Commit Graph

21252 Commits

Author SHA1 Message Date
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
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
Ben Newman
1a8cb855ba Bump package versions for the official 1.6.1.3 release. release/METEOR@1.6.1.3 2018-06-16 14:56:11 -04:00
Ben Newman
921e55bd3c Bump package versions for 1.6.1.3-rc.0 release. release/METEOR@1.6.1.3-rc.0 2018-06-16 11:44:34 -04:00
Ben Newman
536cf34910 Bump $BUNDLE_VERSION to 8.11.3-meteor-1.6.1.3 before rebuilding dev bundle. 2018-06-16 11:15:54 -04:00
Ben Newman
1a265b39ce Update Node to version 8.11.3. 2018-06-16 11:09:55 -04:00
Ben Newman
62c6917f8d Bump package versions for 1.7.1-beta.4 release. release/METEOR@1.7.1-beta.4 2018-06-16 11:04:21 -04:00
Ben Newman
81554e1ddf Merge branch 'devel' into release-1.7.1 2018-06-16 11:03:34 -04:00
Ben Newman
281a849432 Be more defensive about lazy stylesheets that fail to compile.
I should have paid more attention to @abernix's analysis here, as it was
exactly right: https://github.com/meteor/meteor/pull/9983#issuecomment-397240476

cc @pagesrichie
2018-06-16 11:02:29 -04:00
Ben Newman
fd7cb50c7a Bump package versions for 1.7.1-beta.3 release. release/METEOR@1.7.1-beta.3 2018-06-15 16:12:11 -04:00
Ben Newman
fa75ed91b8 Merge branch 'devel' into release-1.7.1 2018-06-15 16:11:03 -04:00
Ben Newman
ce34a60387 Source maps and minification for dynamic CSS modules. (#9998)
When a CSS (or compiled-to-CSS) module is lazy (e.g., in `imports/` or
`node_modules`) and not otherwise imported by another CSS module, Meteor
automatically turns it into a JS module so that it can be handled by the
`ImportScanner`, and imported dynamically by other JS modules.

Until now, there were two problems with CSS handled in this way: it did
not have proper source maps, and the CSS text was not minified in
production.

This commit introduces a special minification step for dynamic CSS, which
must take place before we create the dynamic JS module. Waiting for the
usual minification of CSS would be a mistake, since that happens long
after the `ImportScanner` and `Linker` have already processed JavaScript
modules. Modifying the contents of JS modules at that point would be
impossible without recomputing source maps, etc.

Since the JS module dynamically creates a `<style>` tag and appends it to
the `<head>` of the document, the code of the JS module has no meaningful
relationship to the lines of CSS text that are actually evaluated by the
browser, so it would be a mistake to give the JS module the same source
map as the original CSS resource.

Instead, when there is a source map, we write it out as an asset that can
be requested at runtime, and append a sourceMappingURL comment to the end
of the CSS text referring to this asset URL. Note that this only happens
in development, which makes sense because minification in production
invalidates the source map, and we don't want to expose source code in
production anyway.
2018-06-15 16:10:26 -04:00
Ben Newman
0ca6202aab Bump package versions for 1.7.1-beta.2 release. release/METEOR@1.7.1-beta.2 2018-06-13 19:53:48 -04:00
Ben Newman
a664ff220c Merge branch 'devel' into release-1.7.1 2018-06-13 19:52:23 -04:00
Ben Newman
a1f4e94c59 Merge branch 'master' into devel 2018-06-13 19:51:26 -04:00
Ben Newman
14c135668d Merge pull request #9994 from meteor/release-1.7.0.3
Release 1.7.0.3
2018-06-13 19:50:33 -04:00
Ben Newman
d3b1847c03 Bump package versions for the official 1.7.0.3 release.
https://github.com/meteor/meteor/pull/9994
release/METEOR@1.7.0.3
2018-06-13 19:00:18 -04:00
Ben Newman
ec5c356d0d Update History.md for Meteor 1.7.0.3. 2018-06-13 18:42:27 -04:00
Ben Newman
3c4944479d Bump package versions for 1.7.0.3-rc.0 release. release/METEOR@1.7.0.3-rc.0 2018-06-13 18:03:21 -04:00
Ben Newman
ea394be6e8 Don't ignore tests/ directory if meteor.testModule defined.
According to traditional Meteor file loading rules, tests/ directories are
completely ignored: https://guide.meteor.com/structure.html#special-directories

However, if you specify a meteor.testModule in your package.json that
refers to a file inside a tests/ directory, Meteor should permit modules
to be loaded from tests/, as well as any modules that are imported by the
meteor.testModule entry point.

Fixes #9991.
2018-06-13 17:59:40 -04:00
Ben Newman
23fd4158ef Bump package versions for 1.7.1-beta.1 release. release/METEOR@1.7.1-beta.1 2018-06-13 16:48:49 -04:00
Ben Newman
dcc5756604 Bump $BUNDLE_VERSION to 8.11.3.2 before rebuilding dev bundle. 2018-06-13 16:26:24 -04:00
Ben Newman
8fa1dbe45d Merge branch 'devel' into release-1.7.1 2018-06-13 15:52:30 -04:00
Ben Newman
e2c9e95663 Bump $BUNDLE_VERSION to 8.11.3.1 before rebuilding dev bundle. 2018-06-13 15:49:51 -04:00
Ben Newman
85a66caa89 Merge branch 'master' into devel 2018-06-13 15:30:10 -04:00
Ben Newman
1c4536072a Merge pull request #9990 from meteor/release-1.7.0.2
Release 1.7.0.2
2018-06-13 15:28:28 -04:00
Ben Newman
4324c90b25 Bump package versions for the official 1.7.0.2 release.
https://github.com/meteor/meteor/pull/9990
release/METEOR@1.7.0.2
2018-06-13 14:21:23 -04:00
Ben Newman
9b28ece2ba Bump @babel/runtime version in starter application skeletons. 2018-06-13 14:21:20 -04:00
Ben Newman
2297807516 Mention PR #9977 in History.md. 2018-06-13 13:30:10 -04:00
Rob Fallows
a9af151df9 Update default and --minimal app skeletons. Fixes #9961 (#9977) 2018-06-13 13:22:39 -04:00
Ben Newman
923949c7eb Bump package versions for 1.7.0.2-rc.0 release. release/METEOR@1.7.0.2-rc.0 2018-06-13 12:57:53 -04:00
Ben Newman
41c2dd02f6 Bump ecmascript patch version to 0.11.1.
This is necessary when we bump the babel-compiler package, since the
compile-ecmascript plugin is registered by the ecmascript package.
2018-06-13 12:43:36 -04:00
Ben Newman
56a04f83c9 Bump $BUNDLE_VERSION to 8.11.3.0 before rebuilding dev bundle. 2018-06-13 12:39:19 -04:00
Ben Newman
655cd9a7ca Update Node to version 8.11.3. 2018-06-13 12:38:01 -04:00
Ben Newman
5eeb81a32d Update meteor-babel to version 7.0.0-beta.51. 2018-06-13 12:33:35 -04:00
Ben Newman
e5e35804b9 Merge pull request #9983 from meteor/inputFile.addJavaScript-lazyFinalizer-thunk
Support lazy inputFile.addJavaScript for substantial (re)build time savings.
2018-06-13 11:08:34 -04:00
Ben Newman
f373219e42 Statically import SockJS in both modern and legacy bundles. (#9985)
Not including SockJS in the modern JS bundle was a nice bundle size
savings (28KB before gzip), but SockJS works better than a native
WebSocket for clients that are stuck in unusual networking situations, and
the fallback of using dynamic import() to load SockJS when the native
WebSocket failed was much slower than simply including SockJS in the
bundle and using it from the start.

Moreover, the new `meteor create --minimal` starter app does not use
socket-stream-client (nor DDP), so going back to including SockJS in both
the modern and the legacy bundles should have no impact on the minimal
modern bundle size.

If you want to continue using a native WebSocket instead of SockJS, you
can always pin the older version of the socket-stream-client package:

  meteor add socket-stream-client@0.2.1
2018-06-12 17:30:01 -04:00
Ben Newman
7a68a0d9ca Push inputFile.getFileOptions() call down to single usage site. 2018-06-12 11:41:33 -04:00
Ben Newman
2b505936b4 Tolerate async lazyFinalizer functions when immediately invoked. 2018-06-12 11:02:37 -04:00
Ben Newman
baa6108f0c Stop representing JS compilation errors as file objects. 2018-06-11 21:55:50 -04:00
Ben Newman
479e505d71 Avoid calling compileOneFileLater during compiler plugin self-tests. 2018-06-11 19:51:51 -04:00
Ben Newman
d791447411 Use async compileOneFile to avoid Future usage in LESS plugin. 2018-06-11 19:40:47 -04:00
Ben Newman
64e86b54b2 Allow compileOneFile and compileOneFileLater to return Promises. 2018-06-11 19:39:44 -04:00
Ben Newman
df712b6b7a Allow lazyFinalizer functions to return Promises. 2018-06-11 19:35:42 -04:00
Ben Newman
f1f5451517 Stop checking isRoot before calling compileOneFileLater.
Now that compilation of compile-to-CSS files in imports/ and node_modules/
is actually lazy, we can safely call compileOneFileLater for all
inputFiles without worrying about accidental compilation.
2018-06-11 17:18:08 -04:00