@babel/plugin-transform-regenerator
Advanced tools
+11
-5
@@ -316,3 +316,3 @@ import { declare } from '@babel/helper-plugin-utils'; | ||
| returns; | ||
| lastDefaultIndex; | ||
| lastReferenceIndex = 0; | ||
| marked; | ||
@@ -336,2 +336,3 @@ insertedLocs; | ||
| this.returns = new Set(); | ||
| this.lastReferenceIndex = 0; | ||
| this.marked = [true]; | ||
@@ -367,2 +368,5 @@ this.insertedLocs = new Set(); | ||
| this.marked[this.listing.length] = true; | ||
| if (loc.value > this.lastReferenceIndex) { | ||
| this.lastReferenceIndex = loc.value; | ||
| } | ||
| return loc; | ||
@@ -440,3 +444,3 @@ } | ||
| { | ||
| if (this.lastDefaultIndex === this.index || !this.returns.has(this.listing.length)) { | ||
| if (this.lastReferenceIndex === this.index || !this.returns.has(this.listing.length)) { | ||
| cases.push(types.switchCase(this.finalLoc, [types.returnStatement(types.callExpression(this.contextProperty("a"), [types.numericLiteral(2)]))])); | ||
@@ -617,3 +621,2 @@ } | ||
| assert.strictEqual(after.value, defaultLoc.value); | ||
| this.lastDefaultIndex = this.index; | ||
| } | ||
@@ -654,4 +657,7 @@ break; | ||
| if (catchLoc) { | ||
| const body = path.node.block.body; | ||
| if (finallyLoc) { | ||
| self.jump(finallyLoc); | ||
| } else if (body.length && body[body.length - 1].type === "ReturnStatement") { | ||
| after = null; | ||
| } else { | ||
@@ -682,3 +688,3 @@ self.jump(after); | ||
| }); | ||
| self.mark(after); | ||
| if (after) self.mark(after); | ||
| break; | ||
@@ -1141,3 +1147,3 @@ case "ThrowStatement": | ||
| }) => { | ||
| assertVersion("8.0.0-beta.0"); | ||
| assertVersion("8.0.0-beta.1"); | ||
| return { | ||
@@ -1144,0 +1150,0 @@ name: "transform-regenerator", |
+15
-15
@@ -5,3 +5,3 @@ { | ||
| "description": "Explode async and generator functions into a state machine.", | ||
| "version": "8.0.0-beta.0", | ||
| "version": "8.0.0-beta.1", | ||
| "homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-regenerator", | ||
@@ -15,3 +15,3 @@ "repository": { | ||
| "dependencies": { | ||
| "@babel/helper-plugin-utils": "^8.0.0-beta.0" | ||
| "@babel/helper-plugin-utils": "^8.0.0-beta.1" | ||
| }, | ||
@@ -23,17 +23,17 @@ "license": "MIT", | ||
| "peerDependencies": { | ||
| "@babel/core": "^8.0.0-beta.0" | ||
| "@babel/core": "^8.0.0-beta.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^8.0.0-beta.0", | ||
| "@babel/helper-check-duplicate-nodes": "^8.0.0-beta.0", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-beta.0", | ||
| "@babel/plugin-proposal-function-sent": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-arrow-functions": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-block-scoping": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-classes": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-for-of": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-modules-commonjs": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-parameters": "^8.0.0-beta.0", | ||
| "@babel/plugin-transform-runtime": "^8.0.0-beta.0", | ||
| "babel-plugin-polyfill-regenerator": "^0.6.1", | ||
| "@babel/core": "^8.0.0-beta.1", | ||
| "@babel/helper-check-duplicate-nodes": "^8.0.0-beta.1", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-beta.1", | ||
| "@babel/plugin-proposal-function-sent": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-arrow-functions": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-block-scoping": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-classes": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-for-of": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-modules-commonjs": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-parameters": "^8.0.0-beta.1", | ||
| "@babel/plugin-transform-runtime": "^8.0.0-beta.1", | ||
| "babel-plugin-polyfill-regenerator": "^0.6.5", | ||
| "mocha": "^10.0.0", | ||
@@ -40,0 +40,0 @@ "recast": "^0.23.3", |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
181432
0.53%1143
0.53%0
-100%