Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
22
my-app/node_modules/@babel/helper-split-export-declaration/LICENSE
generated
vendored
Executable file
22
my-app/node_modules/@babel/helper-split-export-declaration/LICENSE
generated
vendored
Executable 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
my-app/node_modules/@babel/helper-split-export-declaration/README.md
generated
vendored
Executable file
19
my-app/node_modules/@babel/helper-split-export-declaration/README.md
generated
vendored
Executable file
|
@ -0,0 +1,19 @@
|
|||
# @babel/helper-split-export-declaration
|
||||
|
||||
>
|
||||
|
||||
See our website [@babel/helper-split-export-declaration](https://babeljs.io/docs/babel-helper-split-export-declaration) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save @babel/helper-split-export-declaration
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/helper-split-export-declaration
|
||||
```
|
59
my-app/node_modules/@babel/helper-split-export-declaration/lib/index.js
generated
vendored
Executable file
59
my-app/node_modules/@babel/helper-split-export-declaration/lib/index.js
generated
vendored
Executable file
|
@ -0,0 +1,59 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = splitExportDeclaration;
|
||||
var _t = require("@babel/types");
|
||||
const {
|
||||
cloneNode,
|
||||
exportNamedDeclaration,
|
||||
exportSpecifier,
|
||||
identifier,
|
||||
variableDeclaration,
|
||||
variableDeclarator
|
||||
} = _t;
|
||||
function splitExportDeclaration(exportDeclaration) {
|
||||
if (!exportDeclaration.isExportDeclaration() || exportDeclaration.isExportAllDeclaration()) {
|
||||
throw new Error("Only default and named export declarations can be split.");
|
||||
}
|
||||
if (exportDeclaration.isExportDefaultDeclaration()) {
|
||||
const declaration = exportDeclaration.get("declaration");
|
||||
const standaloneDeclaration = declaration.isFunctionDeclaration() || declaration.isClassDeclaration();
|
||||
const exportExpr = declaration.isFunctionExpression() || declaration.isClassExpression();
|
||||
const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
|
||||
let id = declaration.node.id;
|
||||
let needBindingRegistration = false;
|
||||
if (!id) {
|
||||
needBindingRegistration = true;
|
||||
id = scope.generateUidIdentifier("default");
|
||||
if (standaloneDeclaration || exportExpr) {
|
||||
declaration.node.id = cloneNode(id);
|
||||
}
|
||||
} else if (exportExpr && scope.hasBinding(id.name)) {
|
||||
needBindingRegistration = true;
|
||||
id = scope.generateUidIdentifier(id.name);
|
||||
}
|
||||
const updatedDeclaration = standaloneDeclaration ? declaration.node : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration.node)]);
|
||||
const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]);
|
||||
exportDeclaration.insertAfter(updatedExportDeclaration);
|
||||
exportDeclaration.replaceWith(updatedDeclaration);
|
||||
if (needBindingRegistration) {
|
||||
scope.registerDeclaration(exportDeclaration);
|
||||
}
|
||||
return exportDeclaration;
|
||||
} else if (exportDeclaration.get("specifiers").length > 0) {
|
||||
throw new Error("It doesn't make sense to split exported specifiers.");
|
||||
}
|
||||
const declaration = exportDeclaration.get("declaration");
|
||||
const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
|
||||
const specifiers = Object.keys(bindingIdentifiers).map(name => {
|
||||
return exportSpecifier(identifier(name), identifier(name));
|
||||
});
|
||||
const aliasDeclar = exportNamedDeclaration(null, specifiers);
|
||||
exportDeclaration.insertAfter(aliasDeclar);
|
||||
exportDeclaration.replaceWith(declaration.node);
|
||||
return exportDeclaration;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
1
my-app/node_modules/@babel/helper-split-export-declaration/lib/index.js.map
generated
vendored
Executable file
1
my-app/node_modules/@babel/helper-split-export-declaration/lib/index.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
24
my-app/node_modules/@babel/helper-split-export-declaration/package.json
generated
vendored
Executable file
24
my-app/node_modules/@babel/helper-split-export-declaration/package.json
generated
vendored
Executable file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "@babel/helper-split-export-declaration",
|
||||
"version": "7.22.6",
|
||||
"description": "",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-helper-split-export-declaration"
|
||||
},
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-helper-split-export-declaration",
|
||||
"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"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue