16 Commits

Author SHA1 Message Date
Huáng Jùnliàng
814212f0be
Remove babel polyfill from fixture test runner (#12130)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
2020-12-22 02:42:39 +01:00
Huáng Jùnliàng
a9cd0945b7
fix: properly wrap private class methods (#12192) 2020-10-16 10:12:50 -04:00
Nicolò Ribaudo
d21e2217d5
Skip newlines around inline #__PURE__ annotations (#11133)
* Skip newlines around #__PURE__ annotations

* Update tests
2020-02-13 19:16:33 +01:00
Kai Cataldo
a6d134804a Unify build step for ESLint packages (#10723) 2019-11-16 10:15:15 +01:00
Nicolò Ribaudo
d25262ec4b
Correctly delegate .return() in async generator (#10422)
* Correctly delegate .return() in async generator

* Add catch param

* minNodeVersion

* Add another test
2019-11-05 00:35:40 +01:00
Nicolò Ribaudo
c11cdcb6d8
Fix recursive async function expressions (#9039)
* Fix recursive async function expressions

* Update fixtures
2018-11-19 17:19:54 +01:00
Logan Smyth
79b2af5997
Format fixture JSON with Prettier. (#8658) 2018-09-09 17:57:52 -07:00
Henry Zhu
10910a10f5
Remove yearly presets from repo, inline in standalone (#8274)
These were already deprecated in v6, just didn't remove the folders?
2018-07-09 14:23:25 -04:00
Deven Bansod
c8d82d6483 Migrate all remaining fixtures to jest expect 2018-03-24 16:22:20 +05:30
Deven Bansod
0856f89882 Migrate -transform-block-scoping and -transform-classes to jest expect 2018-03-24 16:22:18 +05:30
Gvozd
653318b7e4 Always transform for-await in async functions. (#7446)
for-await was transformed in @babel/helper-remap-async-to-generator, which was
called by @babel/plugin-transform-async-to-generator and
@babel/plugin-proposal-async-generator-functions. This prevented for-await
statements in async functions to be transpiled if the
transform-async-to-generator plugin was't enabled.
2018-03-05 09:30:25 +01:00
Nicolò Ribaudo
8659e1a88c Remove old expected.{js,json} files (#7187) 2018-01-09 13:10:30 -06:00
Raja Sekar
0f42accb87 Renamed files 2018-01-09 15:36:42 +01:00
Nicolò Ribaudo
05b22d2597
Update @babel/helper-wrap-function templates (#6984)
This commit introduces 4 changes:

1) Function declarations are wrapped using function declarations.
   This has two advantages:
    - We can rely on native hoisting, instead of using _blockHoist
    - The function isn't wrapped until it is called. This avoids
      problems where `regeneratorRuntime.wrap` was called before
      that `babel-polyfill` was imported.

   Example:
     function fn() {}
     // becomes
     function fn() { return _fn.apply(this, arguments); }
     function _fn() {
       _fn = _wrapper(/* Original function ... */);
       return _fn.apply(this, arguments);
     }

2) Use a single template for both named and anonymous function
   expressions. They already had the same behavior, but the one
   used for named functions was a bit longer.

3) Use normal functions instead of arrow functions to wrap
   function expressions.

4) Generate a name based on the original one for wrapped
   functions (e.g. `foo` becomes `_foo` instead of `_ref`).
2017-12-13 16:21:58 +01:00
Satyajit Sahoo
7ae6e1e5a0 Add /*#__PURE__*/ annotatiotion for babel-plugin-async-to-generator. Fixes #6572 2017-11-12 18:31:48 +05:30
Henry Zhu
c41abd79a1
Rename all proposal plugins to -proposal- from -transform- (#6570) 2017-10-27 15:26:38 -04:00