-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Bump
regenerator
and add tests (#15194)
* Bump `regenerator` and add tests * Run `yarn dedupe` * Update `output.js`
- Loading branch information
1 parent
4abc682
commit 31386b9
Showing
25 changed files
with
112 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../babel-plugin-proposal-async-generator-functions/test/fixtures/regression/13801/output.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/babel-plugin-transform-regenerator/test/fixtures/misc/no-external-helpers/output.js
Large diffs are not rendered by default.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15142/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var f = async () => [await 0, , ]; | ||
f().then(result => { | ||
expect(result).toStrictEqual([0, , ]); | ||
}); |
1 change: 1 addition & 0 deletions
1
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15142/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
async () => [await 0, , ]; |
3 changes: 3 additions & 0 deletions
3
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15142/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["transform-regenerator"] | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15142/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*#__PURE__*/babelHelpers.asyncToGenerator( /*#__PURE__*/babelHelpers.regeneratorRuntime().mark(function _callee() { | ||
return babelHelpers.regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
_context.next = 2; | ||
return 0; | ||
case 2: | ||
_context.t0 = _context.sent; | ||
return _context.abrupt("return", [_context.t0,,]); | ||
case 4: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee); | ||
})); |
9 changes: 9 additions & 0 deletions
9
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15177/exec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
expect(() => { | ||
var [x] = { | ||
[Symbol.iterator]: function* () { | ||
yield* { | ||
[Symbol.iterator]: x => [], | ||
}; | ||
}, | ||
}; | ||
}).toThrow(TypeError); |
7 changes: 7 additions & 0 deletions
7
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15177/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var [x] = { | ||
[Symbol.iterator]: function* () { | ||
yield* { | ||
[Symbol.iterator]: x => [], | ||
}; | ||
}, | ||
}; |
6 changes: 6 additions & 0 deletions
6
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15177/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
"transform-destructuring", | ||
"transform-regenerator" | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/babel-plugin-transform-regenerator/test/fixtures/regression/15177/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var _Symbol$iterator = babelHelpers.defineProperty({}, Symbol.iterator, /*#__PURE__*/babelHelpers.regeneratorRuntime().mark(function _callee() { | ||
return babelHelpers.regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
return _context.delegateYield(babelHelpers.defineProperty({}, Symbol.iterator, function (x) { | ||
return []; | ||
}), "t0", 1); | ||
case 1: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee); | ||
})), | ||
_Symbol$iterator2 = babelHelpers.slicedToArray(_Symbol$iterator, 1), | ||
x = _Symbol$iterator2[0]; |
2 changes: 1 addition & 1 deletion
2
...es/babel-preset-env/test/fixtures/corejs2-babel-7/usage-regenerator-used-async/output.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...abel-preset-env/test/fixtures/corejs2-babel-7/usage-regenerator-used-generator/output.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/babel-preset-env/test/fixtures/corejs2-babel-7/usage-shippedProposals/output.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/babel-preset-env/test/fixtures/corejs2/usage-shippedProposals/output.js
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...es/babel-preset-env/test/fixtures/corejs3-babel-7/usage-regenerator-used-async/output.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...abel-preset-env/test/fixtures/corejs3-babel-7/usage-regenerator-used-generator/output.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters