Commit Graph

21116 Commits

Author SHA1 Message Date
Ben Newman
b0db9f3387 Bump package versions for 1.7-rc.9 release. release/METEOR@1.7-rc.9 2018-05-14 14:31:46 -04:00
Ben Newman
76ece148ba Update meteor-babel to version 7.0.0-beta.46-5. 2018-05-14 14:20:11 -04:00
Ben Newman
8273eb84e3 Avoid calling files.readlink if target not a symbolic link. 2018-05-14 14:17:46 -04:00
Ben Newman
8566c2ce24 Do not assume location.host can be used for dynamic import(). 2018-05-14 11:35:20 -04:00
Ben Newman
c4b5707747 Allow dynamic import() requests from any origin.
Another way to fix #9888: properly handle OPTIONS requests by returning
permissive CORS headers, so that the dynamic import() server can respond
to requests from any origin.
2018-05-14 11:22:12 -04:00
Ben Newman
6c91a4f0c3 Revert "Use Meteor.absoluteUrl again in dynamic-import fetchMissing function."
This reverts commit 3b77bb5197.

Should fix #9888.

Sending dynamic import() requests to any origin other than location.host
causes some browsers to send a preflight CORS request ( method:OPTIONS) to
verify that the server allows the request, which was causing problems
because the dynamic import() server expects method:POST.
2018-05-14 11:21:00 -04:00
zodern
903cd3c8b9 Fix creating symlinks on Windows April 2018 Update (#9887) 2018-05-14 11:20:56 -04:00
Lucas Hansen
36abc1a0b6 Remove EJSON.clone from the onOplogEntry handler (#9886) 2018-05-14 09:36:18 -04:00
Ben Newman
1f46a2afc3 Bump package versions for 1.7-rc.8 release. release/METEOR@1.7-rc.8 2018-05-12 14:47:54 -04:00
Lukas Strassel
612ff48c8f Polyfill Array.prototype.{flatten,flatMap} in modern bundle (#9883)
With the split of modern/legacy bundles, we no longer polyfill native features.

While Array.prototype.includes is available in modern browsers, flatten and flatMap are not.

This PR re-adds those polyfills to the modern bundle, for consistency with the legacy bundle.
2018-05-12 14:45:46 -04:00
Ben Newman
5aab6d2a12 Avoid caching Resolver on PackageSourceBatch, but cache node_modules paths.
Now that getResolver takes options, it seems inappropriate to cache only
the first resolver created, since multiple resolvers might be created with
different options.

Fortunately, caching Resolver objects is not strictly necessary (even for
performance), since Resolver.getOrCreate already caches based on the
options it receives.

The only other meaningful work PackageSourceBatch#getResolver was doing
was computing the nodeModulesPaths option, so I've cached that.
2018-05-12 13:29:09 -04:00
Ben Newman
82ef207557 Bump package versions for 1.7-rc.7 release. release/METEOR@1.7-rc.7 2018-05-12 12:49:52 -04:00
Ben Newman
dbdadc1b11 Avoid using "browser" field of package.json for inputFile.resolve.
Fixes #9870.
2018-05-12 12:43:54 -04:00
Ben Newman
e25c2fbf45 Bump $BUNDLE_VERSION to 8.11.2.4 before rebuilding dev bundle. 2018-05-12 12:05:40 -04:00
Ben Newman
9b7231bdd4 Update npm to version 5.10.0.
Release notes: https://github.com/npm/npm/releases/tag/v5.10.0

No need to update our pacote fork this time, since pacote@7.6.1 is still
what's used by npm@5.10.0:
https://github.com/npm/npm/blob/v5.10.0/package.json#L105
2018-05-12 11:57:20 -04:00
Ben Newman
1b17025cd4 Tolerate missing files in Builder#_ensureDirectory.
Fixes #9882.
2018-05-12 11:40:01 -04:00
Ben Newman
3b77bb5197 Use Meteor.absoluteUrl again in dynamic-import fetchMissing function.
Previously:
4aeb453c7b
https://github.com/meteor/meteor/pull/9274#issuecomment-348080546
2018-05-12 11:40:01 -04:00
Ben Newman
a8a97016b7 Properly join url and path with / separator in Meteor.absoluteUrl. 2018-05-12 11:40:01 -04:00
Ben Newman
5f131ffe3b Set default Meteor.absoluteUrl ROOT_URL from window.location. 2018-05-12 11:30:13 -04:00
Ben Newman
dacedda571 Use HTTPS in Meteor.absoluteUrl by default if window.location uses HTTPS.
Another attempt to fix #9879.
2018-05-12 11:30:13 -04:00
Ben Newman
9bf35f60d2 Revert "Use wss:// WebSocket URL when location.protocol is https:"
This reverts commit 65115ddab7.

The root of the problem lies in the default value of options.secure used
by Meteor.absoluteUrl.
2018-05-12 11:29:20 -04:00
Ben Newman
65115ddab7 Use wss:// WebSocket URL when location.protocol is https:
Attempt to fix #9879.
2018-05-11 18:04:51 -04:00
Ben Newman
1892633dba Avoid unnecessary files.{rm_recursive,symlink} in symlinkWithOverwrite.
When we copy node_modules directories during rebuilds, we try to create
symlinks instead of doing a full recursive copy. Very often, however, the
symlinks already exist, and they point to the right location already, so
we can avoid recreating them for even better performance.

Another optimization identified by using the qualia:profile package
created by @veered: https://atmospherejs.com/qualia/profile
2018-05-10 14:27:44 -04:00
Ben Newman
8e1287054a Bump package versions for 1.7-rc.6 release. release/METEOR@1.7-rc.6 2018-05-10 12:16:22 -04:00
Ben Newman
1dd5e5f92f Merge branch 'devel' into release-1.7 2018-05-09 20:30:53 -04:00
Ben Newman
782d774b43 Rename cache files synchronously in caching-compiler.
I've noticed that sometimes it takes a while for cache files to be fully
written and renamed, so I think we can speed things up while still
preserving the asynchronicity by doing the rename synchronously in the
async fs.writeFile callback.
2018-05-09 20:25:34 -04:00
Ben Newman
3205a8ec0a Pass cacheOptions (not just cacheDeps) to Babel.compile.
It's important not to involve cacheDirectory in the computation of cache
keys, since that introduces too much diversity, especially when running
tests, since tests use temporary directories with randomized names.
2018-05-09 19:22:03 -04:00
Ben Newman
b7579ad100 Update modules test app to Meteor 1.7-rc.5. 2018-05-09 19:12:13 -04:00
Ben Newman
60caaeb774 Bump package versions for 1.7-rc.5 release. release/METEOR@1.7-rc.5 2018-05-09 18:48:35 -04:00
Ben Newman
538bd0374b Update meteor-babel to version 7.0.0-beta.46-4.
This version no longer includes the cache directory in the computation of
the cache key, which allows repeated test runs to reuse compilation
results from previous runs.
2018-05-09 18:36:59 -04:00
Ben Newman
84c5667f7f Bump package versions for 1.7-rc.4 release. release/METEOR@1.7-rc.4 2018-05-09 16:39:37 -04:00
Ben Newman
a8b6accb11 Set .babel-cache directory correctly for command-line tool.
This depends on new functionality in meteor-babel@7.0.0-beta.46-3:
d5d2bbf81e
dea6465daf
2018-05-09 16:16:05 -04:00
Ben Newman
210a09f5e4 Bump $BUNDLE_VERSION to 8.11.2.3 before rebuilding dev bundle. 2018-05-09 16:02:46 -04:00
Ben Newman
40d408e4fb Revert "Use a custom build of Node 8.11.2 for Mac and Linux."
This reverts commit 7a2e492b6c.

The custom build had a Node version of
8.11.2-nightly1525879461436bd3e42eb10ddd15a9fc1ed225d49c87ad7214 instead
of 8.11.2, which is not something that I want Galaxy (or any other hosting
service) to have to understand.
2018-05-09 13:30:18 -04:00
Ben Newman
c54c2660bd Bump $BUNDLE_VERSION to 8.11.2.2 before rebuilding dev bundle.
That is, instead of using the official 8.11.2-rc.1 release candidate.

Note that we're still using 8.11.1 on Windows, since the official RC has a
bad process.release.headersUrl.
2018-05-09 13:06:30 -04:00
Ben Newman
7a2e492b6c Use a custom build of Node 8.11.2 for Mac and Linux. 2018-05-09 13:04:50 -04:00
Ben Newman
b8ee3d01ab Stop setting a global Babel cache directory.
Instead, the cache directory is provided as part of the third argument to
Babel.compile, which means we can set the cache directory per instance of
BabelCompiler in BabelCompiler#setCacheDir.

This became a problem because coffeescript was calling
the setCacheDir method of its own instance of BabelCompiler, which was
racing with the setCacheDir call for the ecmascript package:
f601ec9693/packages/non-core/coffeescript/compile-coffeescript.js (L27)
2018-05-09 13:03:43 -04:00
Ben Newman
faa08fd5a6 Cache previous inferExtraBabelOptions work.
TODO This should be optimistically cached across invocations of
BabelCompiler#processFilesForTarget.
2018-05-08 20:21:29 -04:00
Ben Newman
f601ec9693 Bump package versions for 1.7-rc.3 release. release/METEOR@1.7-rc.3 2018-05-08 13:14:03 -04:00
Ben Newman
81248867aa Update meteor-node-stubs to version 0.4.1.
This only affects newly created applications for now, but developers can
update to the latest meteor-node-stubs by running

  meteor npm install meteor-node-stubs@latest

https://github.com/meteor/node-stubs/issues/15
2018-05-08 12:56:03 -04:00
Ben Newman
5ef428521e More details about writing modern/legacy packages. 2018-05-08 11:20:20 -04:00
Ben Newman
5667956844 Simplify History.md description of modern/legacy system somewhat. 2018-05-08 10:59:13 -04:00
Ben Newman
835c21ccb0 Talk about the modern/legacy system in History.md.
We may want to move some of this content into a blog post or Guide
article, and then link to that from History.md.
2018-05-07 21:33:49 -04:00
Ben Newman
ce209b5c7b Add v1.7 heading to History.md. 2018-05-07 19:15:48 -04:00
Ben Newman
7baaf19020 Report an error when meteor.mainModule cannot be resolved.
https://github.com/meteor/meteor/pull/9826#issuecomment-387172568
2018-05-07 18:48:38 -04:00
Ben Newman
b21659a66c Bump $BUNDLE_VERSION to 8.11.2.1 before rebuilding dev bundle. 2018-05-07 15:51:42 -04:00
Ben Newman
9bb92ba0a9 Force Node 8.11.1 on Windows for now.
https://github.com/nodejs/node/pull/20478#issuecomment-387181249
2018-05-07 15:51:39 -04:00
Ben Newman
bc6ec63f52 Update Node to v8.11.2-rc.1. 2018-05-07 15:22:13 -04:00
Ben Newman
f489ba9f95 Bump package versions for 1.7-rc.2 release. release/METEOR@1.7-rc.2 2018-05-07 11:19:43 -04:00
Ben Newman
08a0652b7f Merge branch 'devel' into release-1.7 2018-05-07 11:09:35 -04:00