Skip to content

Commit

Permalink
Merge pull request #5567 from aickin/update-regenerator-transform
Browse files Browse the repository at this point in the history
Update regenerator-transform to new version
  • Loading branch information
hzoo committed Apr 6, 2017
2 parents 9b4c33d + 66f8546 commit 3534bc8
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-regenerator/package.json
Expand Up @@ -7,7 +7,7 @@
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator",
"main": "lib/index.js",
"dependencies": {
"regenerator-transform": "0.9.8"
"regenerator-transform": "0.9.11"
},
"license": "MIT",
"devDependencies": {
Expand Down
@@ -0,0 +1,5 @@
var o = {
*foo() {
return "foo";
}
};
@@ -0,0 +1,14 @@
var o = {
foo: regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", "foo");

case 1:
case "end":
return _context.stop();
}
}, _callee, this);
})
};
@@ -0,0 +1,3 @@
{
"plugins": ["transform-regenerator"]
}
@@ -0,0 +1,5 @@
function test(fn) {
return async (...args) => {
return fn(...args);
};
}
@@ -0,0 +1,21 @@
"use strict";

function test(fn) {
var _this = this;

return function _callee() {
var _args = arguments;
return regeneratorRuntime.async(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", fn.apply(undefined, _args));

case 1:
case "end":
return _context.stop();
}
}
}, null, _this);
};
}
@@ -0,0 +1,7 @@
{
"plugins": [
"transform-es2015-parameters",
"transform-es2015-spread",
"transform-regenerator"
]
}

0 comments on commit 3534bc8

Please sign in to comment.