Commit Graph

5 Commits

Author SHA1 Message Date
Seba Kerckhof
2dc21ba37f Update core-js imports in es runtime packages (#10760)
As far as I can tell, object.entries and object.values were already supported
on all browsers supporting native async/await.
This is the current cutoff between modern/legacy

ref: https://github.com/meteor/babel-preset-meteor/blob/master/modern.js
https://caniuse.com/#search=object.entries
https://caniuse.com/#search=object.values

Furthermore I added following new ES2018/2019 features:
Object.fromEntries / String.prototype.trimStart / String.prototype.trimEnd
2019-11-06 10:59:21 -05:00
Ben Newman
330a6cfe3d Update ecmascript-runtime-{client,server} to use core-js@3.1.4. (#10588)
* Update ecmascript-runtime-{client,server} to core-js@3.1.4.

Also added a polyfill for Symbol.asyncIterator to server, modern, and
legacy, which should fix #9897.

* Add a test of for-await-of async iteration.

This should verify that #9897 is fixed.
2019-06-19 20:24:23 -04:00
Ben Newman
653b12268e Adjust ecmascript-runtime-server polyfill list for Node 8.
This package is almost unnecessary now, though I suspect more polyfills
will be added in the future, so we might as well keep it.

Since we're loading so many fewer core-js modules, this change saves about
50ms of server startup time. That might not seem like much, but it's a
measurable savings that benefits every save-rebuild-restart-reload cycle.
2017-06-19 16:36:53 -04:00
Ben Newman
2aa5c28bdb Save 13.5KB minified JS by not forcing core-js TypedArray polyfills.
You can still import these polyfills yourself, if you need them.
2017-05-17 16:18:26 -04:00
Ben Newman
0042ae55f1 Split ecmascript-runtime into client and server packages.
This split gives us the ability to use different sets of polyfills for
server and client, which allows us to take better advantage of native
support in Node 4+.

We now rely on core-js as a peer dependency on the client (which is a win
because core-js is always installed along with babel-runtime), and as an
Npm.depends-style dependency on the server (which is necessary because
there's not always an an application to provide peer node_modules on the
server, e.g. in isopackets and compiler plugins).

Since we're using different sets of polyfills on the client and the
server, it didn't seem to make sense to rely on a single npm package, so
meteor-ecmascript-runtime has been removed.
2017-04-19 17:36:04 -04:00