first commit
This commit is contained in:
22
app_vue/node_modules/@babel/plugin-transform-object-super/LICENSE
generated
vendored
Normal file
22
app_vue/node_modules/@babel/plugin-transform-object-super/LICENSE
generated
vendored
Normal file
@ -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.
|
19
app_vue/node_modules/@babel/plugin-transform-object-super/README.md
generated
vendored
Normal file
19
app_vue/node_modules/@babel/plugin-transform-object-super/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/plugin-transform-object-super
|
||||
|
||||
> Compile ES2015 object super to ES5
|
||||
|
||||
See our website [@babel/plugin-transform-object-super](https://babeljs.io/docs/babel-plugin-transform-object-super) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-transform-object-super
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-transform-object-super --dev
|
||||
```
|
67
app_vue/node_modules/@babel/plugin-transform-object-super/lib/index.js
generated
vendored
Normal file
67
app_vue/node_modules/@babel/plugin-transform-object-super/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _helperPluginUtils = require("@babel/helper-plugin-utils");
|
||||
var _helperReplaceSupers = require("@babel/helper-replace-supers");
|
||||
var _core = require("@babel/core");
|
||||
function replacePropertySuper(path, getObjectRef, file) {
|
||||
const replaceSupers = new _helperReplaceSupers.default({
|
||||
getObjectRef: getObjectRef,
|
||||
methodPath: path,
|
||||
file: file
|
||||
});
|
||||
replaceSupers.replace();
|
||||
}
|
||||
var _default = exports.default = (0, _helperPluginUtils.declare)(api => {
|
||||
api.assertVersion(7);
|
||||
const newLets = new Set();
|
||||
return {
|
||||
name: "transform-object-super",
|
||||
visitor: {
|
||||
Loop: {
|
||||
exit(path) {
|
||||
newLets.forEach(v => {
|
||||
if (v.scopePath === path) {
|
||||
path.scope.push({
|
||||
id: v.id,
|
||||
kind: "let"
|
||||
});
|
||||
path.scope.crawl();
|
||||
path.requeue();
|
||||
newLets.delete(v);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
ObjectExpression(path, state) {
|
||||
let objectRef;
|
||||
const getObjectRef = () => objectRef = objectRef || path.scope.generateUidIdentifier("obj");
|
||||
path.get("properties").forEach(propPath => {
|
||||
if (!propPath.isMethod()) return;
|
||||
replacePropertySuper(propPath, getObjectRef, state.file);
|
||||
});
|
||||
if (objectRef) {
|
||||
const scopePath = path.findParent(p => p.isFunction() || p.isProgram() || p.isLoop());
|
||||
const useLet = scopePath.isLoop();
|
||||
if (useLet) {
|
||||
newLets.add({
|
||||
scopePath,
|
||||
id: _core.types.cloneNode(objectRef)
|
||||
});
|
||||
} else {
|
||||
path.scope.push({
|
||||
id: _core.types.cloneNode(objectRef),
|
||||
kind: "var"
|
||||
});
|
||||
}
|
||||
path.replaceWith(_core.types.assignmentExpression("=", _core.types.cloneNode(objectRef), path.node));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
1
app_vue/node_modules/@babel/plugin-transform-object-super/lib/index.js.map
generated
vendored
Normal file
1
app_vue/node_modules/@babel/plugin-transform-object-super/lib/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"names":["_helperPluginUtils","require","_helperReplaceSupers","_core","replacePropertySuper","path","getObjectRef","file","replaceSupers","ReplaceSupers","methodPath","replace","_default","exports","default","declare","api","assertVersion","newLets","Set","name","visitor","Loop","exit","forEach","v","scopePath","scope","push","id","kind","crawl","requeue","delete","ObjectExpression","state","objectRef","generateUidIdentifier","get","propPath","isMethod","findParent","p","isFunction","isProgram","isLoop","useLet","add","t","cloneNode","replaceWith","assignmentExpression","node"],"sources":["../src/index.ts"],"sourcesContent":["import { declare } from \"@babel/helper-plugin-utils\";\nimport ReplaceSupers from \"@babel/helper-replace-supers\";\nimport { types as t } from \"@babel/core\";\nimport type { File, NodePath } from \"@babel/core\";\n\nfunction replacePropertySuper(\n path: NodePath<t.ObjectMethod>,\n getObjectRef: () => t.Identifier,\n file: File,\n) {\n // @ts-expect-error todo(flow->ts):\n const replaceSupers = new ReplaceSupers({\n getObjectRef: getObjectRef,\n methodPath: path,\n file: file,\n });\n\n replaceSupers.replace();\n}\n\nexport default declare(api => {\n api.assertVersion(REQUIRED_VERSION(7));\n const newLets = new Set<{\n scopePath: NodePath;\n id: t.Identifier;\n }>();\n\n return {\n name: \"transform-object-super\",\n\n visitor: {\n Loop: {\n exit(path) {\n newLets.forEach(v => {\n if (v.scopePath === path) {\n path.scope.push({\n id: v.id,\n kind: \"let\",\n });\n path.scope.crawl();\n path.requeue();\n newLets.delete(v);\n }\n });\n },\n },\n ObjectExpression(path, state) {\n let objectRef: t.Identifier;\n const getObjectRef = () =>\n (objectRef = objectRef || path.scope.generateUidIdentifier(\"obj\"));\n\n path.get(\"properties\").forEach(propPath => {\n if (!propPath.isMethod()) return;\n\n replacePropertySuper(propPath, getObjectRef, state.file);\n });\n\n if (objectRef) {\n const scopePath = path.findParent(\n p => p.isFunction() || p.isProgram() || p.isLoop(),\n );\n const useLet = scopePath.isLoop();\n // For transform-block-scoping\n if (useLet) {\n newLets.add({ scopePath, id: t.cloneNode(objectRef) });\n } else {\n path.scope.push({\n id: t.cloneNode(objectRef),\n kind: \"var\",\n });\n }\n\n path.replaceWith(\n t.assignmentExpression(\"=\", t.cloneNode(objectRef), path.node),\n );\n }\n },\n },\n };\n});\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAGA,SAASG,oBAAoBA,CAC3BC,IAA8B,EAC9BC,YAAgC,EAChCC,IAAU,EACV;EAEA,MAAMC,aAAa,GAAG,IAAIC,4BAAa,CAAC;IACtCH,YAAY,EAAEA,YAAY;IAC1BI,UAAU,EAAEL,IAAI;IAChBE,IAAI,EAAEA;EACR,CAAC,CAAC;EAEFC,aAAa,CAACG,OAAO,CAAC,CAAC;AACzB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,0BAAO,EAACC,GAAG,IAAI;EAC5BA,GAAG,CAACC,aAAa,CAAkB,CAAE,CAAC;EACtC,MAAMC,OAAO,GAAG,IAAIC,GAAG,CAGpB,CAAC;EAEJ,OAAO;IACLC,IAAI,EAAE,wBAAwB;IAE9BC,OAAO,EAAE;MACPC,IAAI,EAAE;QACJC,IAAIA,CAAClB,IAAI,EAAE;UACTa,OAAO,CAACM,OAAO,CAACC,CAAC,IAAI;YACnB,IAAIA,CAAC,CAACC,SAAS,KAAKrB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AACC,SAAS,CAACb,SAAS,CAAC;cAC1BN,IAAI,EAAE;YACR,CAAC,CAAC;UACJ;UAEAzB,IAAI,CAAC6C,WAAW,CACdF,WAAC,CAACG,oBAAoB,CAAC,GAAG,EAAEH,WAAC,CAACC,SAAS,CAACb,SAAS,CAAC,EAAE/B,IAAI,CAAC+C,IAAI,CAC/D,CAAC;QACH;MACF;IACF;EACF,CAAC;AACH,CAAC,CAAC","ignoreList":[]}
|
35
app_vue/node_modules/@babel/plugin-transform-object-super/package.json
generated
vendored
Normal file
35
app_vue/node_modules/@babel/plugin-transform-object-super/package.json
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "@babel/plugin-transform-object-super",
|
||||
"version": "7.27.1",
|
||||
"description": "Compile ES2015 object super to ES5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-transform-object-super"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-object-super",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.27.1",
|
||||
"@babel/helper-replace-supers": "^7.27.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.27.1",
|
||||
"@babel/helper-plugin-test-runner": "^7.27.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"type": "commonjs"
|
||||
}
|
Reference in New Issue
Block a user