@babel/plugin-transform-optional-catch-binding
Advanced tools
+2
-2
| import { declare } from '@babel/helper-plugin-utils'; | ||
| var index = declare(api => { | ||
| api.assertVersion("^7.0.0-0 || ^8.0.0 || 8.0.0-rc.3"); | ||
| const index = declare(api => { | ||
| api.assertVersion("^7.0.0-0 || ^8.0.0 || 8.0.0-rc.4"); | ||
| return { | ||
@@ -6,0 +6,0 @@ name: "transform-optional-catch-binding", |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.0-0 || ^8.0.0\"));\n\n return {\n name: \"transform-optional-catch-binding\",\n manipulateOptions: undefined,\n visitor: {\n CatchClause(path) {\n if (!path.node.param) {\n const uid = path.scope.generateUidIdentifier(\"unused\");\n const paramPath = path.get(\"param\");\n paramPath.replaceWith(uid);\n }\n },\n },\n };\n});\n"],"names":["declare","api","assertVersion","name","manipulateOptions","undefined","visitor","CatchClause","path","node","param","uid","scope","generateUidIdentifier","paramPath","get","replaceWith"],"mappings":";;AAEA,YAAeA,OAAO,CAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAA,kCAAuC,CAAC;EAEzD,OAAO;AACLC,IAAAA,IAAI,EAAE,kCAAkC;AACxCC,IAAAA,iBAAiB,EAAEC,SAAS;AAC5BC,IAAAA,OAAO,EAAE;MACPC,WAAWA,CAACC,IAAI,EAAE;AAChB,QAAA,IAAI,CAACA,IAAI,CAACC,IAAI,CAACC,KAAK,EAAE;UACpB,MAAMC,GAAG,GAAGH,IAAI,CAACI,KAAK,CAACC,qBAAqB,CAAC,QAAQ,CAAC;AACtD,UAAA,MAAMC,SAAS,GAAGN,IAAI,CAACO,GAAG,CAAC,OAAO,CAAC;AACnCD,UAAAA,SAAS,CAACE,WAAW,CAACL,GAAG,CAAC;AAC5B,QAAA;AACF,MAAA;AACF;GACD;AACH,CAAC,CAAC;;;;"} | ||
| {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.0-0 || ^8.0.0\"));\n\n return {\n name: \"transform-optional-catch-binding\",\n manipulateOptions: undefined,\n visitor: {\n CatchClause(path) {\n if (!path.node.param) {\n const uid = path.scope.generateUidIdentifier(\"unused\");\n const paramPath = path.get(\"param\");\n paramPath.replaceWith(uid);\n }\n },\n },\n };\n});\n"],"names":["declare","api","assertVersion","name","manipulateOptions","undefined","visitor","CatchClause","path","node","param","uid","scope","generateUidIdentifier","paramPath","get","replaceWith"],"mappings":";;AAEA,cAAeA,OAAO,CAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAA,kCAAuC,CAAC;EAEzD,OAAO;AACLC,IAAAA,IAAI,EAAE,kCAAkC;AACxCC,IAAAA,iBAAiB,EAAEC,SAAS;AAC5BC,IAAAA,OAAO,EAAE;MACPC,WAAWA,CAACC,IAAI,EAAE;AAChB,QAAA,IAAI,CAACA,IAAI,CAACC,IAAI,CAACC,KAAK,EAAE;UACpB,MAAMC,GAAG,GAAGH,IAAI,CAACI,KAAK,CAACC,qBAAqB,CAAC,QAAQ,CAAC;AACtD,UAAA,MAAMC,SAAS,GAAGN,IAAI,CAACO,GAAG,CAAC,OAAO,CAAC;AACnCD,UAAAA,SAAS,CAACE,WAAW,CAACL,GAAG,CAAC;AAC5B,QAAA;AACF,MAAA;AACF;GACD;AACH,CAAC,CAAC;;;;"} |
+5
-5
| { | ||
| "name": "@babel/plugin-transform-optional-catch-binding", | ||
| "version": "8.0.0-rc.3", | ||
| "version": "8.0.0-rc.4", | ||
| "description": "Compile optional catch bindings", | ||
@@ -20,10 +20,10 @@ "repository": { | ||
| "dependencies": { | ||
| "@babel/helper-plugin-utils": "^8.0.0-rc.3" | ||
| "@babel/helper-plugin-utils": "^8.0.0-rc.4" | ||
| }, | ||
| "peerDependencies": { | ||
| "@babel/core": "^8.0.0-rc.3" | ||
| "@babel/core": "^8.0.0-rc.4" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^8.0.0-rc.3", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-rc.3" | ||
| "@babel/core": "^8.0.0-rc.4", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-rc.4" | ||
| }, | ||
@@ -30,0 +30,0 @@ "engines": { |
4726
0.04%