Commit Graph

9598 Commits

Author SHA1 Message Date
Ben Newman
b0db9f3387 Bump package versions for 1.7-rc.9 release. 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
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
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. 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
82ef207557 Bump package versions for 1.7-rc.7 release. 2018-05-12 12:49:52 -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
8e1287054a Bump package versions for 1.7-rc.6 release. 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
60caaeb774 Bump package versions for 1.7-rc.5 release. 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. 2018-05-09 16:39:37 -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. 2018-05-08 13:14:03 -04:00
Ben Newman
f489ba9f95 Bump package versions for 1.7-rc.2 release. 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
ochicf
9fc0251eee Fix this.toHTMLAsync call in boilerplate-generator (#9838) 2018-05-07 11:02:25 -04:00
Jan Dvorak
18360a0265 facebook-oauth: upgrade api version to v3 👮 & add new fields (#9853) 2018-05-07 11:00:48 -04:00
Ben Newman
e75f017302 Fix #9866 by passing safari10:true in uglify-es mangle options. 2018-05-07 10:53:29 -04:00
Ben Newman
6020b38dde Bump package versions for 1.7-rc.1 release. 🎉 2018-05-03 19:14:18 -04:00
Ben Newman
fb9321870e Set minimum modern versions for Electron.
This effectively means Electron 1.6.0+ will be considered modern.

Fixes #9852.
2018-05-03 13:30:34 -04:00
Ben Newman
8bfdea712a Use legacy workaround for @babel/runtime/helpers/inheritsLoose.
IE10 does not support setting the __proto__ property of objects as an
alternative to Object.setPrototypeOf. Because Babel generates code that
uses the @babel/runtime/helpers/inheritsLoose helper, and that helper
relies on setting __proto__, subclassing fails in Babel-generated code in
IE10 (and earlier), which causes a white screen of death in newly created
Meteor apps.

This commit checks whether setting __proto__ works, and (if not) overrides
the inheritsLoose helper with an implementation that does not rely on
setting __proto__. This logic applies only in legacy browsers, thanks to
api.addFiles("legacy.js", "legacy").

Although this shim isn't perfect (for example, there is no way to set up
true inheritance of static properties), it will allow inheritance to work
in browsers that would otherwise be completely broken.

Since IE10 represents only 0.1% of the world market, we should not
overinvest in keeping it working, but this seemed like a good opportunity
to take advantage of legacy bundling, without adding any new code to the
modern bundle.
2018-05-02 18:29:00 -04:00
Ben Newman
454422f9f0 Avoid const in promise package, since it is not ecmascript-compiled. 2018-05-01 17:44:56 -04:00
Ben Newman
0efe66e6a1 Bump package versions for 1.7-beta.28 release. 2018-05-01 17:08:06 -04:00
Ben Newman
182c426c6d Set Vary:User-Agent response header for static files.
The only new functionality is the res.setHeader("Vary", "User-Agent")
call; the rest of the changes in this commit are just reformatting.

@CaptainN I think this should be enough information for well-behaved
browsers and CDNs to do the right thing, though I agree it's worth
documenting.
2018-04-30 19:47:12 -04:00
Ben Newman
0765927393 Let bundle-visualizer tolerate WebAppInternals.staticFilesByArch. 2018-04-29 10:20:12 -04:00
Ben Newman
223ec46525 Use isModern(request.browser) to determine architecture of static files.
Note that WebAppInternals.staticFiles has been replaced by
WebAppInternals.staticFilesByArch.
2018-04-29 09:58:08 -04:00
Ben Newman
f9e95b3bbb Merge branch 'devel' into release-1.7 2018-04-29 09:22:01 -04:00
Ben Newman
715b96bed8 Use ecmascript in test-helpers and downgrade to latest published jquery.
Though this commit comes after the 1.1.0 version bump, these changes
should be published when that version is published (with Meteor 1.7).
2018-04-29 09:06:17 -04:00
Ben Newman
9cc9214490 Bump test-helpers package version to 1.1.0. 2018-04-29 02:16:17 -04:00
Ben Newman
029611ec6d Improve "oplog - entry skipping" test to prevent intermittent failures. 2018-04-28 23:51:01 -04:00
Ben Newman
bdc98281b1 Bump test-helpers package version to 1.0.13. 2018-04-28 23:50:53 -04:00
Ben Newman
d3df76b2b5 Allow testAsyncMulti functions to return promises. 2018-04-28 23:49:20 -04:00
Ben Newman
8e6f673fd0 Bump package versions for 1.7-beta.27 release. 2018-04-28 12:09:02 -04:00
Ben Newman
72edda6b37 Cache previously computed app.manifest files.
This is an easy optimization that we should have done a long time ago.
2018-04-28 11:58:57 -04:00
Ben Newman
7e883b337f Register app.manifest FALLBACK for non-prefixed asset URLs.
This is an alternate solution to the problems #9776 was intended to fix.
2018-04-28 11:26:10 -04:00
Ben Newman
21ffb90154 Pass arch and prefix to eachResource callback in appcache-server.js. 2018-04-28 11:21:34 -04:00
Ben Newman
a2b770e8db Merge branch 'devel' into release-1.7 2018-04-28 10:11:18 -04:00
Ben Newman
61506c64e2 Reinstate Deps as an alias for Tracker to fix #9830. 2018-04-28 10:10:47 -04:00