10 Commits

Author SHA1 Message Date
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
Deven Bansod
c8d82d6483 Migrate all remaining fixtures to jest expect 2018-03-24 16:22:20 +05:30
Logan Smyth
7cc00cce0d Require output fixture extension to match sourceType output. 2018-03-04 13:31:33 -08:00
Logan Smyth
beb99dfda1 Rename test fixtures using module syntax to .mjs files. 2018-03-04 13:31:32 -08: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