initial commit taken from gitlab.lrz.de

This commit is contained in:
privatereese
2018-08-24 18:09:42 +02:00
parent ae54ed4c48
commit fc05486403
28494 changed files with 2159823 additions and 0 deletions

19
node_modules/@babel/plugin-transform-spread/README.md generated vendored Normal 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/en/next/babel-plugin-transform-spread.html) 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,171 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
_helperPluginUtils = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
var _default = (0, _helperPluginUtils().declare)((api, options) => {
api.assertVersion(7);
const {
loose
} = options;
function getSpreadLiteral(spread, scope) {
if (loose && !_core().types.isIdentifier(spread.argument, {
name: "arguments"
})) {
return spread.argument;
} else {
return scope.toArray(spread.argument, true);
}
}
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) {
const nodes = [];
let _props = [];
for (const prop of props) {
if (_core().types.isSpreadElement(prop)) {
_props = push(_props, nodes);
nodes.push(getSpreadLiteral(prop, scope));
} else {
_props.push(prop);
}
}
push(_props, nodes);
return nodes;
}
return {
visitor: {
ArrayExpression(path) {
const {
node,
scope
} = path;
const elements = node.elements;
if (!hasSpread(elements)) return;
const nodes = build(elements, scope);
const first = nodes.shift();
if (nodes.length === 0 && first !== elements[0].argument) {
path.replaceWith(first);
return;
}
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 = path.get("callee");
if (calleePath.isSuper()) return;
let contextLiteral = scope.buildUndefinedNode();
node.arguments = [];
let nodes;
if (args.length === 1 && args[0].argument.name === "arguments") {
nodes = [args[0].argument];
} else {
nodes = build(args, scope);
}
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 = node.callee;
if (calleePath.isMemberExpression()) {
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);
}
_core().types.appendToMemberExpression(callee, _core().types.identifier("apply"));
} else {
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;
let args = node.arguments;
if (!hasSpread(args)) return;
const nodes = build(args, scope);
const first = nodes.shift();
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.file.addHelper("construct"), [node.callee, args]));
}
}
};
});
exports.default = _default;

View File

@@ -0,0 +1,91 @@
{
"_args": [
[
"@babel/plugin-transform-spread@^7.0.0-beta",
"/home/bernhard/freifunk-app/node_modules/metro"
]
],
"_from": "@babel/plugin-transform-spread@>=7.0.0-beta <8.0.0",
"_id": "@babel/plugin-transform-spread@7.0.0-beta.54",
"_inCache": true,
"_installable": true,
"_location": "/@babel/plugin-transform-spread",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/plugin-transform-spread_7.0.0-beta.54_1531764009911_0.4890503279571774"
},
"_npmUser": {
"email": "hi@henryzoo.com",
"name": "hzoo"
},
"_phantomChildren": {},
"_requested": {
"name": "@babel/plugin-transform-spread",
"raw": "@babel/plugin-transform-spread@^7.0.0-beta",
"rawSpec": "^7.0.0-beta",
"scope": "@babel",
"spec": ">=7.0.0-beta <8.0.0",
"type": "range"
},
"_requiredBy": [
"/metro"
],
"_resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.54.tgz",
"_shasum": "4f0852df0f4b1db2426c40facd8fe5f028a3dbc9",
"_shrinkwrap": null,
"_spec": "@babel/plugin-transform-spread@^7.0.0-beta",
"_where": "/home/bernhard/freifunk-app/node_modules/metro",
"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.54"
},
"description": "Compile ES2015 spread to ES5",
"devDependencies": {
"@babel/core": "7.0.0-beta.54",
"@babel/helper-plugin-test-runner": "7.0.0-beta.54"
},
"directories": {},
"dist": {
"fileCount": 5,
"shasum": "4f0852df0f4b1db2426c40facd8fe5f028a3dbc9",
"tarball": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0-beta.54.tgz",
"unpackedSize": 5252
},
"keywords": [
"babel-plugin"
],
"license": "MIT",
"main": "lib/index.js",
"maintainers": [
{
"name": "danez",
"email": "daniel@tschinder.de"
},
{
"name": "existentialism",
"email": "bng412@gmail.com"
},
{
"name": "hzoo",
"email": "hi@henryzoo.com"
},
{
"name": "loganfsmyth",
"email": "loganfsmyth@gmail.com"
},
{
"name": "xtuc",
"email": "contact@xtuc.fr"
}
],
"name": "@babel/plugin-transform-spread",
"optionalDependencies": {},
"peerDependencies": {
"@babel/core": ">=7.0.0-beta.50 <7.0.0-rc.0"
},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-spread"
},
"version": "7.0.0-beta.54"
}