Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update regenerator-transform to new version #5567

Merged
merged 2 commits into from Apr 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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"
]
}