Commit Graph

22356 Commits

Author SHA1 Message Date
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
Ben Newman
79cb14afbe Avoid accessing .data in ImportScanner until files get scanned. 2018-06-11 17:18:08 -04:00
Ben Newman
6f93bd1def Use custom CssOutputResource class in ResourceSlot#addStylesheet. 2018-06-11 17:18:08 -04:00
Ben Newman
98ed767522 Use custom JsOutputResource class in ResourceSlot#addJavaScript. 2018-06-11 16:45:32 -04:00
Ben Newman
7ec5d446d1 Bump minor version of less package to 2.8.0.
We should really update to the latest version of the less npm package
(3.0.4 at the time this commit message was written).
2018-06-11 11:02:19 -04:00
Ben Newman
7cfba6e002 Bump minor version of babel-compiler package to 7.2.0. 2018-06-11 11:02:19 -04:00
Ben Newman
98d853551f Bump minor version of caching-compiler package to 1.2.0. 2018-06-11 11:02:19 -04:00
Ben Newman
a5751003a7 Use lazyFinalizer function when calling addJavaScript in BabelCompiler. 2018-06-11 11:02:19 -04:00
Ben Newman
c28065aedc Let CachingCompiler subclasses implement compileOneFileLater.
If you're subclassing `CachingCompiler` or `MultiFileCachingCompiler`, you
can now implement a `compileOneFileLater` (emphasis on `Later`) to opt into
the new lazy compilation strategy.

If you implement this method, and `inputFile.supportsLazyCompilation` is
true, then the `addCompileResult` will not be called, though it is
probably a good idea to keep any existing `addCompileResult` methods, just
in case `inputFile.supportsLazyCompilation` is not truthy.

This will be an important part of a proper solution to the issues I
described (but failed to fix) in my broken PR #9968.
2018-06-11 11:02:19 -04:00
Ben Newman
9cc739078c Support lazy compilation of inputFile.add{JavaScript,Stylesheet,...} resources.
One limitation of Meteor's current compiler plugins system is that every
file we *might* use must be compiled before we know whether it *will* be
used by the application (which is something we only find out when we later
run the `ImportScanner`). More specifically, when inputFile.addJavaScript
is called, any information relevant to the current file must already have
been computed, even if the file will never be used.

This commit begins the process of supporting a lazy version of the
`inputFile.addJavaScript` method. For consistency, this interface is
supported by other methods like `inputFile.addStylesheet`, though it may
not make as much sense for non-JavaScript resources.

In this very basic initial implementation, the `lazyFinalizer` function is
called immediately, so that subsequent code can keep pretending that all
relevant information was eagerly provided.

The next step will be waiting to call `lazyFinalizer` until the last
possible moment, so that we can skip a potentially huge amount of
unnecessary compilation time.
2018-06-11 11:02:19 -04:00
Ben Newman
2bd67f334f Use the lru-cache package from dev_bundle in caching-compiler. 2018-06-11 11:02:18 -04:00
Ben Newman
ff82847cd6 Replace async.eachLimit usage in caching-compiler with Promises. 2018-06-11 11:02:18 -04:00
Rob Fallows
a52b462f55 Update default and --minimal app skeletons. Fixes #9961 (#9977) 2018-06-11 09:15:39 -04:00
Ben Newman
0a336175c4 Let any client request any static resource. (#9965)
Fixes #9953.
2018-06-07 16:20:38 -04:00
Ben Newman
ab87f48f1b Bump dynamic-import package version before republishing. 2018-06-07 11:38:44 -04:00
Ben Newman
f0e04facd2 Update dynamic-import test app to Meteor 1.7.0.1. 2018-06-07 11:36:34 -04:00
Ben Newman
43211a0526 Style tweaks for access-control-request-headers echoing. 2018-06-07 11:11:48 -04:00
Adriaan Callaerts
0244680131 Allow dynamic import() requests from any origin on any device. (#9954)
A tweak to the change introduced in c4b5707747 to fix #9952.

This will allow clients that don't support the * value in `Access-Control-Allow-Headers`,
but do specify the `Access-Control-Request-Headers` (such as electron 2.0.2) to use dynamic import.
2018-06-07 09:41:21 -04:00
Toine van Kampen
499bb7ea25 Merge remote-tracking branch 'meteor/devel' into devel
Rebaseline
2018-06-06 20:28:03 +10:00
StorytellerCZ
32858b1fcd Merge remote-tracking branch 'origin/devel' into accounts-remove-underscore 2018-06-06 11:21:24 +02:00
Ben Newman
6725b7046e Bump package versions for 1.7.1-beta.0 release. release/METEOR@1.7.1-beta.0 2018-06-05 13:27:52 -04:00
Ben Newman
76d45bdb3e Bump $BUNDLE_VERSION to 8.11.2.9 before rebuilding dev bundle. 2018-06-05 13:14:41 -04:00
Ben Newman
237f20da01 Update npm to version 6.1.0 and pacote to 8.1.6.
Fixes #9940.
2018-06-05 13:07:28 -04:00
Ben Newman
38f570abc0 Ensure npm scripts find correct meteor executable. (#9941)
In my local development environment, the `meteor` command resolves to my
Meteor checkout, and I use `~/.meteor/meteor` explicitly when I want to run
a released version of Meteor.

If I run

  ~/.meteor/meteor npm test

and the `package.json` file defines an npm `test` script that refers to
`meteor`, in my environment this `meteor` won't be the same as the one I
used to run `~/.meteor/meteor npm test`, which can introduce weirdness
such as pinning the versions of packages in `meteor/packages/non-core`,
and all the usual Meteor version inconsistency risks.

This commit fixes that problem by prepending the directory that contains
the `meteor` (or `meteor.bat`) executable to the `PATH` before running
`meteor npm ...` commands.
2018-06-05 13:06:51 -04:00
StorytellerCZ
7ba5ea11e7 Accounts: Report duplicate keys before general error. 2018-06-05 10:34:11 +02:00
StorytellerCZ
f4927faddc Merge devel into accounts-remove-underscore and modernize 2018-06-05 10:06:23 +02:00
Ben Newman
e595bae374 Fix jsdoc for Mongo.Collection#raw{Collection,Database}. 2018-06-04 10:21:55 -04:00
Ben Newman
ebbec6a71d Merge branch 'master' into devel 2018-05-30 11:44:23 -04:00
Ben Newman
e364ca35ea Merge pull request #9917 from meteor/release-1.7.0.1
Release 1.7.0.1
2018-05-30 11:43:54 -04:00
Ben Newman
d78a17d7e9 Bump package versions for the official 1.7.0.1 release.
https://github.com/meteor/meteor/pull/9917
release/METEOR@1.7.0.1
2018-05-30 10:03:34 -04:00
Ben Newman
c92c6590ce Recommend updating @babel/runtime and meteor-node-stubs in History.md. 2018-05-29 18:30:05 -04:00
Ben Newman
f41e3f17ce Bump package versions for 1.7.0.1-rc.0 release. release/METEOR@1.7.0.1-rc.0 2018-05-29 18:13:22 -04:00
Ben Newman
6b7df3fb0d When checking for existing builds, tolerate web.browser.legacy better.
This is a follow-up to b4a68e99c1, which
allowed obtaining a simplified list of build architectures (without
web.browser.legacy) by calling isopack.buildArchitectures(true), which was
helpful for matching existing builds of packages that were published
before the web.browser.legacy architecture was introduced in Meteor 1.7.

Now that some packages have been published with the web.browser.legacy
architecture as part of the Meteor 1.7 release, it's important to try
matching the full unsimplified list of architectures, while still falling
back to the simplified list for other packages.
2018-05-29 18:13:19 -04:00
Ben Newman
1697d79c51 Mention reverting #9825 in History.md for Meteor 1.7.0.1. 2018-05-29 16:30:37 -04:00
Ben Newman
7f9706d0f2 Revert "Stop scanning node_modules directories in PackageSource#_findSources. (#9825)"
This reverts commit c5302bb2ba.

Based on conversation with @KoenLav, it seems this optimization was more
of a breaking change than anticipated, and the workaround of creating a
symbolic link to induce compilation is not just annoying on Windows but
also does not satisfy the goal of being able to import from node_modules
(as before) rather than importing via the symbolic link.

We will need to revisit this pitfall in Meteor 1.7.1, but it's important
to unbreak it ASAP in Meteor 1.7.0.1 (since 1.7 is unfortunately final).

https://github.com/meteor/meteor/pull/9826#issuecomment-392596129
https://github.com/mozfet/meteor-autoform-materialize/issues/43

For apps that are accidentally compiling too many LESS or SCSS files, the
recommended workaround (for now) is to add the offending directories
and/or files to a .meteorignore file.
2018-05-29 16:20:30 -04:00
Christian Klaussner
4e59d8bb65 Fix Meteor version number in History.md (#9916) 2018-05-29 05:34:15 -04:00
James Burgess
0a61dae68d Docs typo (#9898) 2018-05-28 14:06:53 -04:00
Ben Newman
39295cc136 Support both mobile_safari and mobileSafari for isModern testing.
https://github.com/meteor/meteor/issues/9717#issuecomment-392521536
2018-05-28 12:22:19 -04:00
Ben Newman
274e2b1ed2 Make chrome{,Mobile{,IOS}} synonymous for isModern testing. 2018-05-28 12:19:05 -04:00
Ben Newman
0fcf29eaee Update modules test app to Meteor 1.7. 2018-05-27 20:38:01 -04:00
Ben Newman
03fc7ba06e Merge branch 'master' into devel 2018-05-27 20:19:37 -04:00
Ben Newman
507d0d0d84 Merge pull request #9826 from meteor/release-1.7
Release 1.7
2018-05-27 20:17:57 -04:00
Ben Newman
4a76fe3fe6 Bump package versions for the official 1.7 release. release/METEOR@1.7 2018-05-27 19:29:46 -04:00
Ben Newman
2d0f5f2435 Update Meteor 1.7 release date in History.md again. 2018-05-27 19:27:33 -04:00
Ben Newman
240855777a Bump package versions for 1.7-rc.14 release. release/METEOR@1.7-rc.14 2018-05-27 18:01:51 -04:00
Ben Newman
d2ec52b777 History.md wording tweaks. 2018-05-27 18:00:49 -04:00
Ben Newman
a126cf5641 Update reify to version 0.16.2. 2018-05-27 18:00:48 -04:00