summaryrefslogtreecommitdiff
path: root/node_modules/@babel/plugin-transform-block-scoped-functions
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
commit06823fbf1c2e763a5bf76c3990ca98fbbcd98691 (patch)
tree4280bece3888d12a022093bf1a9cd1b049393602 /node_modules/@babel/plugin-transform-block-scoped-functions
parent1368909b3cd552dbb0d12d5863c597f5be46177d (diff)
updated node_modules
Diffstat (limited to 'node_modules/@babel/plugin-transform-block-scoped-functions')
-rw-r--r--node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js.map2
-rw-r--r--node_modules/@babel/plugin-transform-block-scoped-functions/package.json8
2 files changed, 5 insertions, 5 deletions
diff --git a/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js.map b/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js.map
index 8d3b83bf..d9a84e9e 100644
--- a/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js.map
+++ b/node_modules/@babel/plugin-transform-block-scoped-functions/lib/index.js.map
@@ -1 +1 @@
-{"version":3,"names":["_helperPluginUtils","require","_core","_default","exports","default","declare","api","assertVersion","transformStatementList","paths","path","isFunctionDeclaration","func","node","declar","t","variableDeclaration","variableDeclarator","id","toExpression","_blockHoist","replaceWith","name","visitor","BlockStatement","parent","isFunction","body","isExportDeclaration","get","SwitchCase"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport default declare(api => {\n api.assertVersion(\n process.env.BABEL_8_BREAKING && process.env.IS_PUBLISH\n ? PACKAGE_JSON.version\n : 7,\n );\n\n function transformStatementList(paths: NodePath<t.Statement>[]) {\n for (const path of paths) {\n if (!path.isFunctionDeclaration()) continue;\n const func = path.node;\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(func.id, t.toExpression(func)),\n ]);\n\n // hoist it up above everything else\n // @ts-expect-error todo(flow->ts): avoid mutations\n declar._blockHoist = 2;\n\n // todo: name this\n func.id = null;\n\n path.replaceWith(declar);\n }\n }\n\n return {\n name: \"transform-block-scoped-functions\",\n\n visitor: {\n BlockStatement(path) {\n const { node, parent } = path;\n if (\n t.isFunction(parent, { body: node }) ||\n t.isExportDeclaration(parent)\n ) {\n return;\n }\n\n transformStatementList(path.get(\"body\"));\n },\n\n SwitchCase(path) {\n transformStatementList(path.get(\"consequent\"));\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAyC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG1B,IAAAC,0BAAO,EAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAGX,CACN,CAAC;EAED,SAASC,sBAAsBA,CAACC,KAA8B,EAAE;IAC9D,KAAK,MAAMC,IAAI,IAAID,KAAK,EAAE;MACxB,IAAI,CAACC,IAAI,CAACC,qBAAqB,CAAC,CAAC,EAAE;MACnC,MAAMC,IAAI,GAAGF,IAAI,CAACG,IAAI;MACtB,MAAMC,MAAM,GAAGC,WAAC,CAACC,mBAAmB,CAAC,KAAK,EAAE,CAC1CD,WAAC,CAACE,kBAAkB,CAACL,IAAI,CAACM,EAAE,EAAEH,WAAC,CAACI,YAAY,CAACP,IAAI,CAAC,CAAC,CACpD,CAAC;MAIFE,MAAM,CAACM,WAAW,GAAG,CAAC;MAGtBR,IAAI,CAACM,EAAE,GAAG,IAAI;MAEdR,IAAI,CAACW,WAAW,CAACP,MAAM,CAAC;IAC1B;EACF;EAEA,OAAO;IACLQ,IAAI,EAAE,kCAAkC;IAExCC,OAAO,EAAE;MACPC,cAAcA,CAACd,IAAI,EAAE;QACnB,MAAM;UAAEG,IAAI;UAAEY;QAAO,CAAC,GAAGf,IAAI;QAC7B,IACEK,WAAC,CAACW,UAAU,CAACD,MAAM,EAAE;UAAEE,IAAI,EAAEd;QAAK,CAAC,CAAC,IACpCE,WAAC,CAACa,mBAAmB,CAACH,MAAM,CAAC,EAC7B;UACA;QACF;QAEAjB,sBAAsB,CAACE,IAAI,CAACmB,GAAG,CAAC,MAAM,CAAC,CAAC;MAC1C,CAAC;MAEDC,UAAUA,CAACpB,IAAI,EAAE;QACfF,sBAAsB,CAACE,IAAI,CAACmB,GAAG,CAAC,YAAY,CAAC,CAAC;MAChD;IACF;EACF,CAAC;AACH,CAAC,CAAC"} \ No newline at end of file
+{"version":3,"names":["_helperPluginUtils","require","_core","_default","exports","default","declare","api","assertVersion","transformStatementList","paths","path","isFunctionDeclaration","func","node","declar","t","variableDeclaration","variableDeclarator","id","toExpression","_blockHoist","replaceWith","name","visitor","BlockStatement","parent","isFunction","body","isExportDeclaration","get","SwitchCase"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport { types as t } from \"@babel/core\";\nimport type { NodePath } from \"@babel/traverse\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n\n function transformStatementList(paths: NodePath<t.Statement>[]) {\n for (const path of paths) {\n if (!path.isFunctionDeclaration()) continue;\n const func = path.node;\n const declar = t.variableDeclaration(\"let\", [\n t.variableDeclarator(func.id, t.toExpression(func)),\n ]);\n\n // hoist it up above everything else\n // @ts-expect-error todo(flow->ts): avoid mutations\n declar._blockHoist = 2;\n\n // todo: name this\n func.id = null;\n\n path.replaceWith(declar);\n }\n }\n\n return {\n name: \"transform-block-scoped-functions\",\n\n visitor: {\n BlockStatement(path) {\n const { node, parent } = path;\n if (\n t.isFunction(parent, { body: node }) ||\n t.isExportDeclaration(parent)\n ) {\n return;\n }\n\n transformStatementList(path.get(\"body\"));\n },\n\n SwitchCase(path) {\n transformStatementList(path.get(\"consequent\"));\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAAyC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAG1B,IAAAC,0BAAO,EAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAkB,CAAE,CAAC;EAEtC,SAASC,sBAAsBA,CAACC,KAA8B,EAAE;IAC9D,KAAK,MAAMC,IAAI,IAAID,KAAK,EAAE;MACxB,IAAI,CAACC,IAAI,CAACC,qBAAqB,CAAC,CAAC,EAAE;MACnC,MAAMC,IAAI,GAAGF,IAAI,CAACG,IAAI;MACtB,MAAMC,MAAM,GAAGC,WAAC,CAACC,mBAAmB,CAAC,KAAK,EAAE,CAC1CD,WAAC,CAACE,kBAAkB,CAACL,IAAI,CAACM,EAAE,EAAEH,WAAC,CAACI,YAAY,CAACP,IAAI,CAAC,CAAC,CACpD,CAAC;MAIFE,MAAM,CAACM,WAAW,GAAG,CAAC;MAGtBR,IAAI,CAACM,EAAE,GAAG,IAAI;MAEdR,IAAI,CAACW,WAAW,CAACP,MAAM,CAAC;IAC1B;EACF;EAEA,OAAO;IACLQ,IAAI,EAAE,kCAAkC;IAExCC,OAAO,EAAE;MACPC,cAAcA,CAACd,IAAI,EAAE;QACnB,MAAM;UAAEG,IAAI;UAAEY;QAAO,CAAC,GAAGf,IAAI;QAC7B,IACEK,WAAC,CAACW,UAAU,CAACD,MAAM,EAAE;UAAEE,IAAI,EAAEd;QAAK,CAAC,CAAC,IACpCE,WAAC,CAACa,mBAAmB,CAACH,MAAM,CAAC,EAC7B;UACA;QACF;QAEAjB,sBAAsB,CAACE,IAAI,CAACmB,GAAG,CAAC,MAAM,CAAC,CAAC;MAC1C,CAAC;MAEDC,UAAUA,CAACpB,IAAI,EAAE;QACfF,sBAAsB,CAACE,IAAI,CAACmB,GAAG,CAAC,YAAY,CAAC,CAAC;MAChD;IACF;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]} \ No newline at end of file
diff --git a/node_modules/@babel/plugin-transform-block-scoped-functions/package.json b/node_modules/@babel/plugin-transform-block-scoped-functions/package.json
index a3f3ea15..5aa3f121 100644
--- a/node_modules/@babel/plugin-transform-block-scoped-functions/package.json
+++ b/node_modules/@babel/plugin-transform-block-scoped-functions/package.json
@@ -1,6 +1,6 @@
{
"name": "@babel/plugin-transform-block-scoped-functions",
- "version": "7.23.3",
+ "version": "7.24.1",
"description": "Babel plugin to ensure function declarations at the block level are block scoped",
"repository": {
"type": "git",
@@ -17,14 +17,14 @@
"babel-plugin"
],
"dependencies": {
- "@babel/helper-plugin-utils": "^7.22.5"
+ "@babel/helper-plugin-utils": "^7.24.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
- "@babel/core": "^7.23.3",
- "@babel/helper-plugin-test-runner": "^7.22.5"
+ "@babel/core": "^7.24.1",
+ "@babel/helper-plugin-test-runner": "^7.24.1"
},
"engines": {
"node": ">=6.9.0"