@babel/plugin-transform-arrow-functions
Advanced tools
+1
-0
| import * as _babel_core from '@babel/core'; | ||
| interface Options { | ||
| /** @deprecated Use the `noNewArrows` assumption instead. */ | ||
| spec?: boolean; | ||
@@ -5,0 +6,0 @@ } |
+4
-1
| import { declare } from '@babel/helper-plugin-utils'; | ||
| const index = declare((api, options) => { | ||
| api.assertVersion("^7.0.0-0 || ^8.0.0 || 8.0.0-rc.4"); | ||
| api.assertVersion("^7.0.0-0 || ^8.0.0 || 8.0.0-rc.5"); | ||
| if ("spec" in options) { | ||
| console.warn("@babel/plugin-transform-arrow-functions: The 'spec' option has been deprecated, " + `use the 'noNewArrows: ${!options.spec}' assumption instead (https://babeljs.io/assumptions).`); | ||
| } | ||
| const noNewArrows = api.assumption("noNewArrows") ?? !options.spec; | ||
@@ -6,0 +9,0 @@ return { |
+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 interface Options {\n spec?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.0-0 || ^8.0.0\"));\n\n const noNewArrows = api.assumption(\"noNewArrows\") ?? !options.spec;\n\n return {\n name: \"transform-arrow-functions\",\n\n visitor: {\n ArrowFunctionExpression(path) {\n // In some conversion cases, it may have already been converted to a function while this callback\n // was queued up.\n if (!path.isArrowFunctionExpression()) return;\n\n path.arrowFunctionToExpression({\n // While other utils may be fine inserting other arrows to make more transforms possible,\n // the arrow transform itself absolutely cannot insert new arrow functions.\n allowInsertArrow: false,\n noNewArrows,\n });\n },\n },\n };\n});\n"],"names":["declare","api","options","assertVersion","noNewArrows","assumption","spec","name","visitor","ArrowFunctionExpression","path","isArrowFunctionExpression","arrowFunctionToExpression","allowInsertArrow"],"mappings":";;AAMA,cAAeA,OAAO,CAAC,CAACC,GAAG,EAAEC,OAAgB,KAAK;EAChDD,GAAG,CAACE,aAAa,CAAA,kCAAuC,CAAC;AAEzD,EAAA,MAAMC,WAAW,GAAGH,GAAG,CAACI,UAAU,CAAC,aAAa,CAAC,IAAI,CAACH,OAAO,CAACI,IAAI;EAElE,OAAO;AACLC,IAAAA,IAAI,EAAE,2BAA2B;AAEjCC,IAAAA,OAAO,EAAE;MACPC,uBAAuBA,CAACC,IAAI,EAAE;AAG5B,QAAA,IAAI,CAACA,IAAI,CAACC,yBAAyB,EAAE,EAAE;QAEvCD,IAAI,CAACE,yBAAyB,CAAC;AAG7BC,UAAAA,gBAAgB,EAAE,KAAK;AACvBT,UAAAA;AACF,SAAC,CAAC;AACJ,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 interface Options {\n /** @deprecated Use the `noNewArrows` assumption instead. */\n spec?: boolean;\n}\n\nexport default declare((api, options: Options) => {\n api.assertVersion(REQUIRED_VERSION(\"^7.0.0-0 || ^8.0.0\"));\n\n if (\"spec\" in options) {\n console.warn(\n \"@babel/plugin-transform-arrow-functions: The 'spec' option has been deprecated, \" +\n `use the 'noNewArrows: ${!options.spec}' assumption instead (https://babeljs.io/assumptions).`,\n );\n }\n\n const noNewArrows = api.assumption(\"noNewArrows\") ?? !options.spec;\n\n return {\n name: \"transform-arrow-functions\",\n\n visitor: {\n ArrowFunctionExpression(path) {\n // In some conversion cases, it may have already been converted to a function while this callback\n // was queued up.\n if (!path.isArrowFunctionExpression()) return;\n\n path.arrowFunctionToExpression({\n // While other utils may be fine inserting other arrows to make more transforms possible,\n // the arrow transform itself absolutely cannot insert new arrow functions.\n allowInsertArrow: false,\n noNewArrows,\n });\n },\n },\n };\n});\n"],"names":["declare","api","options","assertVersion","console","warn","spec","noNewArrows","assumption","name","visitor","ArrowFunctionExpression","path","isArrowFunctionExpression","arrowFunctionToExpression","allowInsertArrow"],"mappings":";;AAOA,cAAeA,OAAO,CAAC,CAACC,GAAG,EAAEC,OAAgB,KAAK;EAChDD,GAAG,CAACE,aAAa,CAAA,kCAAuC,CAAC;EAEzD,IAAI,MAAM,IAAID,OAAO,EAAE;IACrBE,OAAO,CAACC,IAAI,CACV,kFAAkF,GAChF,CAAA,sBAAA,EAAyB,CAACH,OAAO,CAACI,IAAI,CAAA,sDAAA,CAC1C,CAAC;AACH,EAAA;AAEA,EAAA,MAAMC,WAAW,GAAGN,GAAG,CAACO,UAAU,CAAC,aAAa,CAAC,IAAI,CAACN,OAAO,CAACI,IAAI;EAElE,OAAO;AACLG,IAAAA,IAAI,EAAE,2BAA2B;AAEjCC,IAAAA,OAAO,EAAE;MACPC,uBAAuBA,CAACC,IAAI,EAAE;AAG5B,QAAA,IAAI,CAACA,IAAI,CAACC,yBAAyB,EAAE,EAAE;QAEvCD,IAAI,CAACE,yBAAyB,CAAC;AAG7BC,UAAAA,gBAAgB,EAAE,KAAK;AACvBR,UAAAA;AACF,SAAC,CAAC;AACJ,MAAA;AACF;GACD;AACH,CAAC,CAAC;;;;"} |
+8
-8
| { | ||
| "name": "@babel/plugin-transform-arrow-functions", | ||
| "version": "8.0.0-rc.4", | ||
| "version": "8.0.0-rc.5", | ||
| "description": "Compile ES2015 arrow functions to ES5", | ||
@@ -20,15 +20,15 @@ "repository": { | ||
| "dependencies": { | ||
| "@babel/helper-plugin-utils": "^8.0.0-rc.4" | ||
| "@babel/helper-plugin-utils": "^8.0.0-rc.5" | ||
| }, | ||
| "peerDependencies": { | ||
| "@babel/core": "^8.0.0-rc.4" | ||
| "@babel/core": "^8.0.0-rc.5" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^8.0.0-rc.4", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-rc.4", | ||
| "@babel/traverse": "^8.0.0-rc.4", | ||
| "@babel/types": "^8.0.0-rc.4" | ||
| "@babel/core": "^8.0.0-rc.5", | ||
| "@babel/helper-plugin-test-runner": "^8.0.0-rc.5", | ||
| "@babel/traverse": "^8.0.0-rc.5", | ||
| "@babel/types": "^8.0.0-rc.5" | ||
| }, | ||
| "engines": { | ||
| "node": "^20.19.0 || >=22.12.0" | ||
| "node": "^22.18.0 || >=24.11.0" | ||
| }, | ||
@@ -35,0 +35,0 @@ "author": "The Babel Team (https://babel.dev/team)", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
5984
15.03%29
16%1
Infinity%