From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- .../lib/index.js | 47 ---------------------- .../lib/index.js.map | 1 - 2 files changed, 48 deletions(-) delete mode 100644 node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js delete mode 100644 node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js.map (limited to 'node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib') diff --git a/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js b/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js deleted file mode 100644 index 1766a47c..00000000 --- a/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var helperPluginUtils = require('@babel/helper-plugin-utils'); - -function shouldTransform(path) { - const { - node - } = path; - const functionId = node.id; - if (!functionId) return false; - const name = functionId.name; - const paramNameBinding = path.scope.getOwnBinding(name); - if (paramNameBinding === undefined) { - return false; - } - if (paramNameBinding.kind !== "param") { - return false; - } - if (paramNameBinding.identifier === paramNameBinding.path.node) { - return false; - } - return name; -} - -var index = helperPluginUtils.declare(api => { - api.assertVersion("^7.16.0"); - return { - name: "plugin-bugfix-safari-id-destructuring-collision-in-function-expression", - visitor: { - FunctionExpression(path) { - const name = shouldTransform(path); - if (name) { - const { - scope - } = path; - const newParamName = scope.generateUid(name); - scope.rename(name, newParamName); - } - } - } - }; -}); - -exports.default = index; -//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js.map b/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js.map deleted file mode 100644 index adf5a7a5..00000000 --- a/node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/lib/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["../src/util.ts","../src/index.ts"],"sourcesContent":["import type { NodePath, types as t } from \"@babel/core\";\n\n/**\n * Check whether a function expression can be affected by\n * https://bugs.webkit.org/show_bug.cgi?id=220517\n * @param path The function expression NodePath\n * @returns the name of function id if it should be transformed, otherwise returns false\n */\nexport function shouldTransform(\n path: NodePath,\n): string | false {\n const { node } = path;\n const functionId = node.id;\n if (!functionId) return false;\n\n const name = functionId.name;\n // On collision, `getOwnBinding` returns the param binding\n // with the id binding be registered as constant violation\n const paramNameBinding = path.scope.getOwnBinding(name);\n if (paramNameBinding === undefined) {\n // Case 1: the function id is injected by babel-helper-name-function, which\n // assigns `NOT_LOCAL_BINDING` to the `functionId` and thus not registering id\n // in scope tracking\n // Case 2: the function id is injected by a third party plugin which does not update the\n // scope info\n return false;\n }\n if (paramNameBinding.kind !== \"param\") {\n // the function id does not reproduce in params\n return false;\n }\n\n if (paramNameBinding.identifier === paramNameBinding.path.node) {\n // the param binding is a simple parameter\n // e.g. (function a(a) {})\n return false;\n }\n\n return name;\n}\n","import { declare } from \"@babel/helper-plugin-utils\";\nimport { shouldTransform } from \"./util.ts\";\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(\"^7.16.0\"));\n\n return {\n name: \"plugin-bugfix-safari-id-destructuring-collision-in-function-expression\",\n\n visitor: {\n FunctionExpression(path) {\n const name = shouldTransform(path);\n if (name) {\n // Now we have (function a([a]) {})\n const { scope } = path;\n // invariant: path.node.id is always an Identifier here\n const newParamName = scope.generateUid(name);\n scope.rename(name, newParamName);\n }\n },\n },\n };\n});\n"],"names":["shouldTransform","path","node","functionId","id","name","paramNameBinding","scope","getOwnBinding","undefined","kind","identifier","declare","api","assertVersion","visitor","FunctionExpression","newParamName","generateUid","rename"],"mappings":";;;;;;AAQO,SAASA,eAAeA,CAC7BC,IAAoC,EACp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