Updated the files.

This commit is contained in:
Batuhan Berk Başoğlu 2024-02-08 19:38:41 -05:00
parent 1553e6b971
commit 753967d4f5
23418 changed files with 3784666 additions and 0 deletions

22
my-app/node_modules/@babel/plugin-transform-spread/LICENSE generated vendored Executable file
View 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/plugin-transform-spread/README.md generated vendored Executable file
View file

@ -0,0 +1,19 @@
# @babel/plugin-transform-spread
> Compile ES2015 spread to ES5
See our website [@babel/plugin-transform-spread](https://babeljs.io/docs/babel-plugin-transform-spread) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/plugin-transform-spread
```
or using yarn:
```sh
yarn add @babel/plugin-transform-spread --dev
```

View file

@ -0,0 +1,144 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _helperSkipTransparentExpressionWrappers = require("@babel/helper-skip-transparent-expression-wrappers");
var _core = require("@babel/core");
var _default = exports.default = (0, _helperPluginUtils.declare)((api, options) => {
var _api$assumption, _options$allowArrayLi;
api.assertVersion(7);
const iterableIsArray = (_api$assumption = api.assumption("iterableIsArray")) != null ? _api$assumption : options.loose;
const arrayLikeIsIterable = (_options$allowArrayLi = options.allowArrayLike) != null ? _options$allowArrayLi : api.assumption("arrayLikeIsIterable");
function getSpreadLiteral(spread, scope) {
if (iterableIsArray && !_core.types.isIdentifier(spread.argument, {
name: "arguments"
})) {
return spread.argument;
} else {
return scope.toArray(spread.argument, true, arrayLikeIsIterable);
}
}
function hasHole(spread) {
return spread.elements.some(el => el === null);
}
function hasSpread(nodes) {
for (let i = 0; i < nodes.length; i++) {
if (_core.types.isSpreadElement(nodes[i])) {
return true;
}
}
return false;
}
function push(_props, nodes) {
if (!_props.length) return _props;
nodes.push(_core.types.arrayExpression(_props));
return [];
}
function build(props, scope, file) {
const nodes = [];
let _props = [];
for (const prop of props) {
if (_core.types.isSpreadElement(prop)) {
_props = push(_props, nodes);
let spreadLiteral = getSpreadLiteral(prop, scope);
if (_core.types.isArrayExpression(spreadLiteral) && hasHole(spreadLiteral)) {
spreadLiteral = _core.types.callExpression(file.addHelper("arrayWithoutHoles"), [spreadLiteral]);
}
nodes.push(spreadLiteral);
} else {
_props.push(prop);
}
}
push(_props, nodes);
return nodes;
}
return {
name: "transform-spread",
visitor: {
ArrayExpression(path) {
const {
node,
scope
} = path;
const elements = node.elements;
if (!hasSpread(elements)) return;
const nodes = build(elements, scope, this.file);
let first = nodes[0];
if (nodes.length === 1 && first !== elements[0].argument) {
path.replaceWith(first);
return;
}
if (!_core.types.isArrayExpression(first)) {
first = _core.types.arrayExpression([]);
} else {
nodes.shift();
}
path.replaceWith(_core.types.callExpression(_core.types.memberExpression(first, _core.types.identifier("concat")), nodes));
},
CallExpression(path) {
const {
node,
scope
} = path;
const args = node.arguments;
if (!hasSpread(args)) return;
const calleePath = (0, _helperSkipTransparentExpressionWrappers.skipTransparentExprWrappers)(path.get("callee"));
if (calleePath.isSuper()) {
throw path.buildCodeFrameError("It's not possible to compile spread arguments in `super()` without compiling classes.\n" + "Please add '@babel/plugin-transform-classes' to your Babel configuration.");
}
let contextLiteral = scope.buildUndefinedNode();
node.arguments = [];
let nodes;
if (args.length === 1 && _core.types.isIdentifier(args[0].argument, {
name: "arguments"
})) {
nodes = [args[0].argument];
} else {
nodes = build(args, scope, this.file);
}
const first = nodes.shift();
if (nodes.length) {
node.arguments.push(_core.types.callExpression(_core.types.memberExpression(first, _core.types.identifier("concat")), nodes));
} else {
node.arguments.push(first);
}
const callee = calleePath.node;
if (_core.types.isMemberExpression(callee)) {
const temp = scope.maybeGenerateMemoised(callee.object);
if (temp) {
callee.object = _core.types.assignmentExpression("=", temp, callee.object);
contextLiteral = temp;
} else {
contextLiteral = _core.types.cloneNode(callee.object);
}
}
node.callee = _core.types.memberExpression(node.callee, _core.types.identifier("apply"));
if (_core.types.isSuper(contextLiteral)) {
contextLiteral = _core.types.thisExpression();
}
node.arguments.unshift(_core.types.cloneNode(contextLiteral));
},
NewExpression(path) {
const {
node,
scope
} = path;
if (!hasSpread(node.arguments)) return;
const nodes = build(node.arguments, scope, this.file);
const first = nodes.shift();
let args;
if (nodes.length) {
args = _core.types.callExpression(_core.types.memberExpression(first, _core.types.identifier("concat")), nodes);
} else {
args = first;
}
path.replaceWith(_core.types.callExpression(path.hub.addHelper("construct"), [node.callee, args]));
}
}
};
});
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,35 @@
{
"name": "@babel/plugin-transform-spread",
"version": "7.23.3",
"description": "Compile ES2015 spread to ES5",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-plugin-transform-spread"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"keywords": [
"babel-plugin"
],
"dependencies": {
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/helper-skip-transparent-expression-wrappers": "^7.22.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/helper-plugin-test-runner": "^7.22.5"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-spread",
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}