19 Commits

Author SHA1 Message Date
Huáng Jùnliàng
4e66b8eb6b
Specify runtime exports (#10853) 2020-10-14 20:06:56 +02:00
Nicolò Ribaudo
10aa97bc10
Allow rest/spread on polyfilled or builtin iterables without Symbol support (#11268)
* Allow rest/spread on polyfilled or builtin iterables when `Symbol` unsupported

Currently, when `Symbol` is not supported, we allow using rest/spread with:
- arrays
- strings
- arguments

With this PR, it will be also possible to use it with
- maps
- sets
- binary arrays

While in old browsers es6 builtins would still need to be polyfilled, it's way
easier to polyfill them because `Symbol` cannot be reliably polyfilled.

I didn't use `instanceof` becase:
- it doesn't work with polyfills not attatched to the global scope
- when using Babel to load polyfills, it would force the inclusion of `Map` and `Set` polyfills even if they are not used

Downside: the current approach of relying on `toString || construcor.name` doesn't work with subclasses.

* Don't use Array.from for array-like objects
2020-03-17 08:14:05 +01:00
Nicolò Ribaudo
1ba41f2084
Throw better errors for non-iterables when Symbol doesn't exist (#11264) 2020-03-16 16:34:33 +01:00
Carlos Lopez
7b9bc7c28b
fix(rest-spread): Do not require Symbol.iterator for strings (#9794) 2020-03-15 14:54:44 +01:00
Nicolò Ribaudo
1b4cfc21d9
Add support for native esm to @babel/runtime (#10748)
* Add support for native esm to @babel/runtime

* Test

* Do not remove new package.json files

* Remove git diff
2019-11-22 23:59:30 +01:00
Huáng Jùnliàng
22df2ae244 Commit generated code (#10331)
* update prettier generated artifacts

* chore: sync babel-helpers to artifacts
2019-08-13 16:31:28 +02:00
Logan Smyth
a8224d40e2 Split @babel/runtime into two separate runtime modules. 2018-08-02 19:25:07 -07:00
Logan Smyth
4da3f3bc64
Update helpers from #7491. (#7532) 2018-03-08 17:06:43 -08:00
Nicolò Ribaudo
a740b28a9e Commit the temporalRef runtime helper 2017-10-19 00:37:09 +02:00
Logan Smyth
a75e69ecec Regenerate incorrectly-updated helpers from @babel scope PR. 2017-10-17 10:47:15 -07:00
Henry Zhu
919bdf5e79 Scoped: remove unncessary deps from standalone [skip ci] 2017-10-16 22:49:57 -04:00
Logan Smyth
ed6e6fd7dd Export babel-runtime helpers as standard CommonJS. 2017-09-26 11:28:57 -07:00
Henry Zhu
5c824273bc update to beta.0 [skip ci] 2017-09-19 16:00:18 -04:00
Pranav Prakash
e98bb3dc60 Use new Array instead of Array for V8 optimization (#6250)
* Use new Array instead of Array for V8 optimization

* fix spacing [skip ci]

* Remove extraneous use strict clauses
2017-09-18 14:14:46 -04:00
Logan Smyth
158e9fbfd7 Represent helpers as simple modules. 2017-09-12 22:15:16 -07:00
Logan Smyth
5006c81b77 Apply the new module transform the the babel-runtime helper files. 2017-09-12 17:51:52 -07:00
Henry Zhu
26b9f9ed15 commit one helper to git to check regressions 2017-03-22 18:18:08 -04:00
Sebastian McKenzie
1c7fabdd6d add runtimeES3 transformer 2015-03-31 01:20:14 +11:00
Sebastian McKenzie
6f53980bfc move runtime helpers to separate modules - babel/ember-cli-babel#24 2015-03-08 04:04:40 +11:00