From aa773172311dcada759dfbaac485f4bc6e00bc21 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:31:11 +0800 Subject: added babel --- .../@babel/helper-annotate-as-pure/LICENSE | 22 ++++++++++++++++++++ .../@babel/helper-annotate-as-pure/README.md | 19 +++++++++++++++++ .../@babel/helper-annotate-as-pure/lib/index.js | 23 +++++++++++++++++++++ .../helper-annotate-as-pure/lib/index.js.map | 1 + .../@babel/helper-annotate-as-pure/package.json | 24 ++++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 node_modules/@babel/helper-annotate-as-pure/LICENSE create mode 100644 node_modules/@babel/helper-annotate-as-pure/README.md create mode 100644 node_modules/@babel/helper-annotate-as-pure/lib/index.js create mode 100644 node_modules/@babel/helper-annotate-as-pure/lib/index.js.map create mode 100644 node_modules/@babel/helper-annotate-as-pure/package.json (limited to 'node_modules/@babel/helper-annotate-as-pure') diff --git a/node_modules/@babel/helper-annotate-as-pure/LICENSE b/node_modules/@babel/helper-annotate-as-pure/LICENSE new file mode 100644 index 00000000..f31575ec --- /dev/null +++ b/node_modules/@babel/helper-annotate-as-pure/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@babel/helper-annotate-as-pure/README.md b/node_modules/@babel/helper-annotate-as-pure/README.md new file mode 100644 index 00000000..8663e342 --- /dev/null +++ b/node_modules/@babel/helper-annotate-as-pure/README.md @@ -0,0 +1,19 @@ +# @babel/helper-annotate-as-pure + +> Helper function to annotate paths and nodes with #__PURE__ comment + +See our website [@babel/helper-annotate-as-pure](https://babeljs.io/docs/en/babel-helper-annotate-as-pure) for more information. + +## Install + +Using npm: + +```sh +npm install --save @babel/helper-annotate-as-pure +``` + +or using yarn: + +```sh +yarn add @babel/helper-annotate-as-pure +``` diff --git a/node_modules/@babel/helper-annotate-as-pure/lib/index.js b/node_modules/@babel/helper-annotate-as-pure/lib/index.js new file mode 100644 index 00000000..05ae2e9a --- /dev/null +++ b/node_modules/@babel/helper-annotate-as-pure/lib/index.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = annotateAsPure; +var _t = require("@babel/types"); +const { + addComment +} = _t; +const PURE_ANNOTATION = "#__PURE__"; +const isPureAnnotated = ({ + leadingComments +}) => !!leadingComments && leadingComments.some(comment => /[@#]__PURE__/.test(comment.value)); +function annotateAsPure(pathOrNode) { + const node = pathOrNode["node"] || pathOrNode; + if (isPureAnnotated(node)) { + return; + } + addComment(node, "leading", PURE_ANNOTATION); +} + +//# sourceMappingURL=index.js.map diff --git a/node_modules/@babel/helper-annotate-as-pure/lib/index.js.map b/node_modules/@babel/helper-annotate-as-pure/lib/index.js.map new file mode 100644 index 00000000..f6c30b31 --- /dev/null +++ b/node_modules/@babel/helper-annotate-as-pure/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"names":["_t","require","addComment","PURE_ANNOTATION","isPureAnnotated","leadingComments","some","comment","test","value","annotateAsPure","pathOrNode","node"],"sources":["../src/index.ts"],"sourcesContent":["import { addComment, type Node } from \"@babel/types\";\nimport type { NodePath } from \"@babel/traverse\";\n\nconst PURE_ANNOTATION = \"#__PURE__\";\n\nconst isPureAnnotated = ({ leadingComments }: Node): boolean =>\n !!leadingComments &&\n leadingComments.some(comment => /[@#]__PURE__/.test(comment.value));\n\nexport default function annotateAsPure(pathOrNode: Node | NodePath): void {\n const node =\n // @ts-expect-error Node will not have `node` property\n (pathOrNode[\"node\"] || pathOrNode) as Node;\n if (isPureAnnotated(node)) {\n return;\n }\n addComment(node, \"leading\", PURE_ANNOTATION);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAAqD;EAA5CC;AAAU,IAAAF,EAAA;AAGnB,MAAMG,eAAe,GAAG,WAAW;AAEnC,MAAMC,eAAe,GAAGA,CAAC;EAAEC;AAAsB,CAAC,KAChD,CAAC,CAACA,eAAe,IACjBA,eAAe,CAACC,IAAI,CAACC,OAAO,IAAI,cAAc,CAACC,IAAI,CAACD,OAAO,CAACE,KAAK,CAAC,CAAC;AAEtD,SAASC,cAAcA,CAACC,UAA2B,EAAQ;EACxE,MAAMC,IAAI,GAEPD,UAAU,CAAC,MAAM,CAAC,IAAIA,UAAmB;EAC5C,IAAIP,eAAe,CAACQ,IAAI,CAAC,EAAE;IACzB;EACF;EACAV,UAAU,CAACU,IAAI,EAAE,SAAS,EAAET,eAAe,CAAC;AAC9C"} \ No newline at end of file diff --git a/node_modules/@babel/helper-annotate-as-pure/package.json b/node_modules/@babel/helper-annotate-as-pure/package.json new file mode 100644 index 00000000..65299c03 --- /dev/null +++ b/node_modules/@babel/helper-annotate-as-pure/package.json @@ -0,0 +1,24 @@ +{ + "name": "@babel/helper-annotate-as-pure", + "version": "7.22.5", + "description": "Helper function to annotate paths and nodes with #__PURE__ comment", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-helper-annotate-as-pure" + }, + "homepage": "https://babel.dev/docs/en/next/babel-helper-annotate-as-pure", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)", + "type": "commonjs" +} \ No newline at end of file -- cgit v1.2.3