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-classes/README.md generated vendored Normal file
View File

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

View File

@@ -0,0 +1,125 @@
"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 _helperAnnotateAsPure() {
const data = _interopRequireDefault(require("@babel/helper-annotate-as-pure"));
_helperAnnotateAsPure = function () {
return data;
};
return data;
}
function _helperFunctionName() {
const data = _interopRequireDefault(require("@babel/helper-function-name"));
_helperFunctionName = function () {
return data;
};
return data;
}
function _helperSplitExportDeclaration() {
const data = _interopRequireDefault(require("@babel/helper-split-export-declaration"));
_helperSplitExportDeclaration = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _globals() {
const data = _interopRequireDefault(require("globals"));
_globals = function () {
return data;
};
return data;
}
var _transformClass = _interopRequireDefault(require("./transformClass"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const getBuiltinClasses = category => Object.keys(_globals().default[category]).filter(name => /^[A-Z]/.test(name));
const builtinClasses = new Set([...getBuiltinClasses("builtin"), ...getBuiltinClasses("browser")]);
var _default = (0, _helperPluginUtils().declare)((api, options) => {
api.assertVersion(7);
const {
loose
} = options;
const VISITED = Symbol();
return {
visitor: {
ExportDefaultDeclaration(path) {
if (!path.get("declaration").isClassDeclaration()) return;
(0, _helperSplitExportDeclaration().default)(path);
},
ClassDeclaration(path) {
const {
node
} = path;
const ref = node.id || path.scope.generateUidIdentifier("class");
path.replaceWith(_core().types.variableDeclaration("let", [_core().types.variableDeclarator(ref, _core().types.toExpression(node))]));
},
ClassExpression(path, state) {
const {
node
} = path;
if (node[VISITED]) return;
const inferred = (0, _helperFunctionName().default)(path);
if (inferred && inferred !== node) {
path.replaceWith(inferred);
return;
}
node[VISITED] = true;
path.replaceWith((0, _transformClass.default)(path, state.file, builtinClasses, loose));
if (path.isCallExpression()) {
(0, _helperAnnotateAsPure().default)(path);
if (path.get("callee").isArrowFunctionExpression()) {
path.get("callee").arrowFunctionToExpression();
}
}
}
}
};
});
exports.default = _default;

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _default(decorators, scope) {
for (const decorator of decorators) {
const expression = decorator.expression;
if (!_core().types.isMemberExpression(expression)) continue;
const temp = scope.maybeGenerateMemoised(expression.object);
let ref;
const nodes = [];
if (temp) {
ref = temp;
nodes.push(_core().types.assignmentExpression("=", temp, expression.object));
} else {
ref = expression.object;
}
nodes.push(_core().types.callExpression(_core().types.memberExpression(_core().types.memberExpression(ref, expression.property, expression.computed), _core().types.identifier("bind")), [ref]));
if (nodes.length === 1) {
decorator.expression = nodes[0];
} else {
decorator.expression = _core().types.sequenceExpression(nodes);
}
}
return decorators;
}

View File

@@ -0,0 +1,647 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = transformClass;
function _helperFunctionName() {
const data = _interopRequireDefault(require("@babel/helper-function-name"));
_helperFunctionName = function () {
return data;
};
return data;
}
function _helperReplaceSupers() {
const data = _interopRequireWildcard(require("@babel/helper-replace-supers"));
_helperReplaceSupers = function () {
return data;
};
return data;
}
function _helperOptimiseCallExpression() {
const data = _interopRequireDefault(require("@babel/helper-optimise-call-expression"));
_helperOptimiseCallExpression = function () {
return data;
};
return data;
}
function defineMap() {
const data = _interopRequireWildcard(require("@babel/helper-define-map"));
defineMap = function () {
return data;
};
return data;
}
function _core() {
const data = require("@babel/core");
_core = function () {
return data;
};
return data;
}
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function buildConstructor(classRef, constructorBody, node) {
const func = _core().types.functionDeclaration(_core().types.cloneNode(classRef), [], constructorBody);
_core().types.inherits(func, node);
return func;
}
const verifyConstructorVisitor = _core().traverse.visitors.merge([_helperReplaceSupers().environmentVisitor, {
Super(path, state) {
if (state.isDerived) return;
const {
node,
parentPath
} = path;
if (parentPath.isCallExpression({
callee: node
})) {
throw path.buildCodeFrameError("super() is only allowed in a derived constructor");
}
},
ThisExpression(path, state) {
if (!state.isDerived) return;
const {
node,
parentPath
} = path;
if (parentPath.isMemberExpression({
object: node
})) {
return;
}
const assertion = _core().types.callExpression(state.file.addHelper("assertThisInitialized"), [node]);
path.replaceWith(assertion);
path.skip();
}
}]);
function transformClass(path, file, builtinClasses, isLoose) {
const classState = {
parent: undefined,
scope: undefined,
node: undefined,
path: undefined,
file: undefined,
classId: undefined,
classRef: undefined,
superName: undefined,
superReturns: [],
isDerived: false,
extendsNative: false,
construct: undefined,
constructorBody: undefined,
userConstructor: undefined,
userConstructorPath: undefined,
hasConstructor: false,
instancePropBody: [],
instancePropRefs: {},
staticPropBody: [],
body: [],
bareSupers: new Set(),
superThises: [],
pushedConstructor: false,
pushedInherits: false,
protoAlias: null,
isLoose: false,
hasInstanceDescriptors: false,
hasStaticDescriptors: false,
instanceMutatorMap: {},
staticMutatorMap: {}
};
const setState = newState => {
Object.assign(classState, newState);
};
const findThisesVisitor = _core().traverse.visitors.merge([_helperReplaceSupers().environmentVisitor, {
ThisExpression(path) {
classState.superThises.push(path);
}
}]);
function pushToMap(node, enumerable, kind = "value", scope) {
let mutatorMap;
if (node.static) {
setState({
hasStaticDescriptors: true
});
mutatorMap = classState.staticMutatorMap;
} else {
setState({
hasInstanceDescriptors: true
});
mutatorMap = classState.instanceMutatorMap;
}
const map = defineMap().push(mutatorMap, node, kind, classState.file, scope);
if (enumerable) {
map.enumerable = _core().types.booleanLiteral(true);
}
return map;
}
function maybeCreateConstructor() {
let hasConstructor = false;
const paths = classState.path.get("body.body");
for (const path of paths) {
hasConstructor = path.equals("kind", "constructor");
if (hasConstructor) break;
}
if (hasConstructor) return;
let params, body;
if (classState.isDerived) {
const constructor = _core().template.expression.ast`
(function () {
super(...arguments);
})
`;
params = constructor.params;
body = constructor.body;
} else {
params = [];
body = _core().types.blockStatement([]);
}
classState.path.get("body").unshiftContainer("body", _core().types.classMethod("constructor", _core().types.identifier("constructor"), params, body));
}
function buildBody() {
maybeCreateConstructor();
pushBody();
verifyConstructor();
if (classState.userConstructor) {
const {
constructorBody,
userConstructor,
construct
} = classState;
constructorBody.body = constructorBody.body.concat(userConstructor.body.body);
_core().types.inherits(construct, userConstructor);
_core().types.inherits(constructorBody, userConstructor.body);
}
pushDescriptors();
}
function pushBody() {
const classBodyPaths = classState.path.get("body.body");
for (const path of classBodyPaths) {
const node = path.node;
if (path.isClassProperty()) {
throw path.buildCodeFrameError("Missing class properties transform.");
}
if (node.decorators) {
throw path.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");
}
if (_core().types.isClassMethod(node)) {
const isConstructor = node.kind === "constructor";
if (isConstructor) {
path.traverse(verifyConstructorVisitor, {
isDerived: classState.isDerived,
file: classState.file
});
}
const replaceSupers = new (_helperReplaceSupers().default)({
methodPath: path,
objectRef: classState.classRef,
superRef: classState.superName,
isLoose: classState.isLoose,
file: classState.file
});
replaceSupers.replace();
const state = {
returns: [],
bareSupers: new Set()
};
path.traverse(_core().traverse.visitors.merge([_helperReplaceSupers().environmentVisitor, {
ReturnStatement(path, state) {
if (!path.getFunctionParent().isArrowFunctionExpression()) {
state.returns.push(path);
}
},
Super(path, state) {
const {
node,
parentPath
} = path;
if (parentPath.isCallExpression({
callee: node
})) {
state.bareSupers.add(parentPath);
}
}
}]), state);
if (isConstructor) {
pushConstructor(state, node, path);
} else {
pushMethod(node, path);
}
}
}
}
function clearDescriptors() {
setState({
hasInstanceDescriptors: false,
hasStaticDescriptors: false,
instanceMutatorMap: {},
staticMutatorMap: {}
});
}
function pushDescriptors() {
pushInheritsToBody();
const {
body
} = classState;
let instanceProps;
let staticProps;
if (classState.hasInstanceDescriptors) {
instanceProps = defineMap().toClassObject(classState.instanceMutatorMap);
}
if (classState.hasStaticDescriptors) {
staticProps = defineMap().toClassObject(classState.staticMutatorMap);
}
if (instanceProps || staticProps) {
if (instanceProps) {
instanceProps = defineMap().toComputedObjectFromClass(instanceProps);
}
if (staticProps) {
staticProps = defineMap().toComputedObjectFromClass(staticProps);
}
let args = [_core().types.cloneNode(classState.classRef), _core().types.nullLiteral(), _core().types.nullLiteral()];
if (instanceProps) args[1] = instanceProps;
if (staticProps) args[2] = staticProps;
let lastNonNullIndex = 0;
for (let i = 0; i < args.length; i++) {
if (!_core().types.isNullLiteral(args[i])) lastNonNullIndex = i;
}
args = args.slice(0, lastNonNullIndex + 1);
body.push(_core().types.expressionStatement(_core().types.callExpression(classState.file.addHelper("createClass"), args)));
}
clearDescriptors();
}
function wrapSuperCall(bareSuper, superRef, thisRef, body) {
let bareSuperNode = bareSuper.node;
let call;
if (classState.isLoose) {
bareSuperNode.arguments.unshift(_core().types.thisExpression());
if (bareSuperNode.arguments.length === 2 && _core().types.isSpreadElement(bareSuperNode.arguments[1]) && _core().types.isIdentifier(bareSuperNode.arguments[1].argument, {
name: "arguments"
})) {
bareSuperNode.arguments[1] = bareSuperNode.arguments[1].argument;
bareSuperNode.callee = _core().types.memberExpression(_core().types.cloneNode(superRef), _core().types.identifier("apply"));
} else {
bareSuperNode.callee = _core().types.memberExpression(_core().types.cloneNode(superRef), _core().types.identifier("call"));
}
call = _core().types.logicalExpression("||", bareSuperNode, _core().types.thisExpression());
} else {
bareSuperNode = (0, _helperOptimiseCallExpression().default)(_core().types.callExpression(classState.file.addHelper("getPrototypeOf"), [_core().types.cloneNode(classState.classRef)]), _core().types.thisExpression(), bareSuperNode.arguments);
call = _core().types.callExpression(classState.file.addHelper("possibleConstructorReturn"), [_core().types.thisExpression(), bareSuperNode]);
}
if (bareSuper.parentPath.isExpressionStatement() && bareSuper.parentPath.container === body.node.body && body.node.body.length - 1 === bareSuper.parentPath.key) {
if (classState.superThises.length) {
call = _core().types.assignmentExpression("=", thisRef(), call);
}
bareSuper.parentPath.replaceWith(_core().types.returnStatement(call));
} else {
bareSuper.replaceWith(_core().types.assignmentExpression("=", thisRef(), call));
}
}
function verifyConstructor() {
if (!classState.isDerived) return;
const path = classState.userConstructorPath;
const body = path.get("body");
path.traverse(findThisesVisitor);
let guaranteedSuperBeforeFinish = !!classState.bareSupers.size;
let thisRef = function () {
const ref = path.scope.generateDeclaredUidIdentifier("this");
thisRef = () => _core().types.cloneNode(ref);
return ref;
};
for (const bareSuper of classState.bareSupers) {
wrapSuperCall(bareSuper, classState.superName, thisRef, body);
if (guaranteedSuperBeforeFinish) {
bareSuper.find(function (parentPath) {
if (parentPath === path) {
return true;
}
if (parentPath.isLoop() || parentPath.isConditional() || parentPath.isArrowFunctionExpression()) {
guaranteedSuperBeforeFinish = false;
return true;
}
});
}
}
for (const thisPath of classState.superThises) {
const {
node,
parentPath
} = thisPath;
if (parentPath.isMemberExpression({
object: node
})) {
thisPath.replaceWith(thisRef());
continue;
}
thisPath.replaceWith(_core().types.callExpression(classState.file.addHelper("assertThisInitialized"), [thisRef()]));
}
let wrapReturn;
if (classState.isLoose) {
wrapReturn = returnArg => {
const thisExpr = _core().types.callExpression(classState.file.addHelper("assertThisInitialized"), [thisRef()]);
return returnArg ? _core().types.logicalExpression("||", returnArg, thisExpr) : thisExpr;
};
} else {
wrapReturn = returnArg => _core().types.callExpression(classState.file.addHelper("possibleConstructorReturn"), [thisRef()].concat(returnArg || []));
}
const bodyPaths = body.get("body");
if (!bodyPaths.length || !bodyPaths.pop().isReturnStatement()) {
body.pushContainer("body", _core().types.returnStatement(guaranteedSuperBeforeFinish ? thisRef() : wrapReturn()));
}
for (const returnPath of classState.superReturns) {
returnPath.get("argument").replaceWith(wrapReturn(returnPath.node.argument));
}
}
function pushMethod(node, path) {
const scope = path ? path.scope : classState.scope;
if (node.kind === "method") {
if (processMethod(node, scope)) return;
}
pushToMap(node, false, null, scope);
}
function processMethod(node, scope) {
if (classState.isLoose && !node.decorators) {
let {
classRef
} = classState;
if (!node.static) {
insertProtoAliasOnce();
classRef = classState.protoAlias;
}
const methodName = _core().types.memberExpression(_core().types.cloneNode(classRef), node.key, node.computed || _core().types.isLiteral(node.key));
let func = _core().types.functionExpression(null, node.params, node.body, node.generator, node.async);
func.returnType = node.returnType;
const key = _core().types.toComputedKey(node, node.key);
if (_core().types.isStringLiteral(key)) {
func = (0, _helperFunctionName().default)({
node: func,
id: key,
scope
});
}
const expr = _core().types.expressionStatement(_core().types.assignmentExpression("=", methodName, func));
_core().types.inheritsComments(expr, node);
classState.body.push(expr);
return true;
}
return false;
}
function insertProtoAliasOnce() {
if (classState.protoAlias === null) {
setState({
protoAlias: classState.scope.generateUidIdentifier("proto")
});
const classProto = _core().types.memberExpression(classState.classRef, _core().types.identifier("prototype"));
const protoDeclaration = _core().types.variableDeclaration("var", [_core().types.variableDeclarator(classState.protoAlias, classProto)]);
classState.body.push(protoDeclaration);
}
}
function pushConstructor(replaceSupers, method, path) {
if (path.scope.hasOwnBinding(classState.classRef.name)) {
path.scope.rename(classState.classRef.name);
}
setState({
userConstructorPath: path,
userConstructor: method,
hasConstructor: true,
bareSupers: replaceSupers.bareSupers,
superReturns: replaceSupers.returns
});
const {
construct
} = classState;
_core().types.inheritsComments(construct, method);
construct.params = method.params;
_core().types.inherits(construct.body, method.body);
construct.body.directives = method.body.directives;
pushConstructorToBody();
}
function pushConstructorToBody() {
if (classState.pushedConstructor) return;
classState.pushedConstructor = true;
if (classState.hasInstanceDescriptors || classState.hasStaticDescriptors) {
pushDescriptors();
}
classState.body.push(classState.construct);
pushInheritsToBody();
}
function pushInheritsToBody() {
if (!classState.isDerived || classState.pushedInherits) return;
setState({
pushedInherits: true
});
classState.body.unshift(_core().types.expressionStatement(_core().types.callExpression(classState.file.addHelper(classState.isLoose ? "inheritsLoose" : "inherits"), [_core().types.cloneNode(classState.classRef), _core().types.cloneNode(classState.superName)])));
}
function setupClosureParamsArgs() {
const {
superName
} = classState;
const closureParams = [];
const closureArgs = [];
if (classState.isDerived) {
const arg = classState.extendsNative ? _core().types.callExpression(classState.file.addHelper("wrapNativeSuper"), [_core().types.cloneNode(superName)]) : _core().types.cloneNode(superName);
const param = classState.scope.generateUidIdentifierBasedOnNode(superName);
closureParams.push(param);
closureArgs.push(arg);
setState({
superName: _core().types.cloneNode(param)
});
}
return {
closureParams,
closureArgs
};
}
function classTransformer(path, file, builtinClasses, isLoose) {
setState({
parent: path.parent,
scope: path.scope,
node: path.node,
path,
file,
isLoose
});
setState({
classId: classState.node.id,
classRef: classState.node.id ? _core().types.identifier(classState.node.id.name) : classState.scope.generateUidIdentifier("class"),
superName: classState.node.superClass,
isDerived: !!classState.node.superClass,
constructorBody: _core().types.blockStatement([])
});
setState({
extendsNative: classState.isDerived && builtinClasses.has(classState.superName.name) && !classState.scope.hasBinding(classState.superName.name, true)
});
const {
classRef,
node,
constructorBody
} = classState;
setState({
construct: buildConstructor(classRef, constructorBody, node)
});
let {
body
} = classState;
const {
closureParams,
closureArgs
} = setupClosureParamsArgs();
buildBody();
if (!classState.isLoose) {
constructorBody.body.unshift(_core().types.expressionStatement(_core().types.callExpression(classState.file.addHelper("classCallCheck"), [_core().types.thisExpression(), _core().types.cloneNode(classState.classRef)])));
}
body = body.concat(classState.staticPropBody.map(fn => fn(_core().types.cloneNode(classState.classRef))));
const isStrict = path.isInStrictMode();
let constructorOnly = classState.classId && body.length === 1;
if (constructorOnly && !isStrict) {
for (const param of classState.construct.params) {
if (!_core().types.isIdentifier(param)) {
constructorOnly = false;
break;
}
}
}
const directives = constructorOnly ? body[0].body.directives : [];
if (!isStrict) {
directives.push(_core().types.directive(_core().types.directiveLiteral("use strict")));
}
if (constructorOnly) {
return _core().types.toExpression(body[0]);
}
body.push(_core().types.returnStatement(_core().types.cloneNode(classState.classRef)));
const container = _core().types.arrowFunctionExpression(closureParams, _core().types.blockStatement(body, directives));
return _core().types.callExpression(container, closureArgs);
}
return classTransformer(path, file, builtinClasses, isLoose);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
'use strict';
module.exports = require('./globals.json');

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
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.

View File

@@ -0,0 +1,117 @@
{
"_args": [
[
"globals@^11.1.0",
"/home/bernhard/freifunk-app/node_modules/@babel/plugin-transform-classes"
]
],
"_from": "globals@>=11.1.0 <12.0.0",
"_id": "globals@11.7.0",
"_inCache": true,
"_installable": true,
"_location": "/@babel/plugin-transform-classes/globals",
"_nodeVersion": "8.11.2",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/globals_11.7.0_1529479657446_0.22166321400958533"
},
"_npmUser": {
"email": "sindresorhus@gmail.com",
"name": "sindresorhus"
},
"_npmVersion": "5.6.0",
"_phantomChildren": {},
"_requested": {
"name": "globals",
"raw": "globals@^11.1.0",
"rawSpec": "^11.1.0",
"scope": null,
"spec": ">=11.1.0 <12.0.0",
"type": "range"
},
"_requiredBy": [
"/@babel/plugin-transform-classes"
],
"_resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
"_shasum": "a583faa43055b1aca771914bf68258e2fc125673",
"_shrinkwrap": null,
"_spec": "globals@^11.1.0",
"_where": "/home/bernhard/freifunk-app/node_modules/@babel/plugin-transform-classes",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/globals/issues"
},
"dependencies": {},
"description": "Global identifiers from different JavaScript environments",
"devDependencies": {
"ava": "0.21.0",
"xo": "0.18.0"
},
"directories": {},
"dist": {
"fileCount": 5,
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKgHpCRA9TVsSAnZWagAA7dYP/Az2SaUNEAq2MJ6Rb5Uh\nnPvNLc6mHkg/1ha4HdMukcAiBS5Sqty/4CMVItJkjnRKKaiMiefcA8+u0D5J\nf763va1n09qdLmX94zj2CS7MFk0hj7sYt8GPUkaIzU+jlRvbnvNE1lEETVpu\n70Fyta7diCk1+Q7fNsy7ptceawZAfXDeY9ftOMMO1B23CzCha3ReTeUPyg7y\nluXnXRqg/N3TR3grgBHHbEzwN0yXPlHtuMXr7qN5qDSD06hgAOVtgbvknN6p\noSKaBfNOZ5VJpnYYtvnuxd/uqRnR6dzN0YK5yXF3A/RhgHpYIAWCB9+UaxFd\ngL5BOZYRXF0OhpDgGvN3optVSyfwNs5B/AbbQGhtzMlLKQe6ig4Ge9lE2lVX\nF4dh6gm3KncaLl473A/GASRFEmh5YlPUMz/XoJW8eXveXTu4Vb+BowyI8q/V\n4Rz9S9FoskqtqB/oPICFI8ldjxc3wk13LP6iWpjfjJE/1xdDeQxC3+s3gIm5\nLyUck60isXIh/gxenTnuNYOpkCwgQPRZJEq6J5cyVuoaVqJTcpqfV6Jnyv40\nslX2ptRgNi3FM4l4WExQUO9qWeRz3nMjQikIRpWs+cVIoD/hf6+bsAeg6UN+\nWH75o+w6qitM9umomMJjSo0McNneDVZYEyv/PCx35AOEGcuixTIke7Q6rkoD\nA6sz\r\n=TnmR\r\n-----END PGP SIGNATURE-----\r\n",
"shasum": "a583faa43055b1aca771914bf68258e2fc125673",
"tarball": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
"unpackedSize": 37625
},
"engines": {
"node": ">=4"
},
"files": [
"globals.json",
"index.js"
],
"gitHead": "45fc1b8d950704bcfd2b5af1cb2ce10f94361741",
"homepage": "https://github.com/sindresorhus/globals#readme",
"keywords": [
"environments",
"eslint",
"global",
"globals",
"identifiers",
"jshint",
"variables",
"vars"
],
"license": "MIT",
"maintainers": [
{
"name": "byk",
"email": "ben@byk.im"
},
{
"name": "lo1tuma",
"email": "schreck.mathias@gmail.com"
},
{
"name": "nzakas",
"email": "nicholas@nczconsulting.com"
},
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "globals",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/globals.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "11.7.0",
"xo": {
"ignores": [
"get-browser-globals.js"
]
}
}

View File

@@ -0,0 +1,41 @@
# globals [![Build Status](https://travis-ci.org/sindresorhus/globals.svg?branch=master)](https://travis-ci.org/sindresorhus/globals)
> Global identifiers from different JavaScript environments
Extracted from [JSHint](https://github.com/jshint/jshint/blob/3a8efa979dbb157bfb5c10b5826603a55a33b9ad/src/vars.js) and [ESLint](https://github.com/eslint/eslint/blob/b648406218f8a2d7302b98f5565e23199f44eb31/conf/environments.json) and merged.
It's just a [JSON file](globals.json), so use it in whatever environment you like.
**This module [no longer accepts](https://github.com/sindresorhus/globals/issues/82) new environments. If you need it for ESLint, just [create a plugin](http://eslint.org/docs/developer-guide/working-with-plugins#environments-in-plugins).**
## Install
```
$ npm install globals
```
## Usage
```js
const globals = require('globals');
console.log(globals.browser);
/*
{
addEventListener: false,
applicationCache: false,
ArrayBuffer: false,
atob: false,
...
}
*/
```
Each global is given a value of `true` or `false`. A value of `true` indicates that the variable may be overwritten. A value of `false` indicates that the variable should be considered read-only. This information is used by static analysis tools to flag incorrect behavior. We assume all variables should be `false` unless we hear otherwise.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@@ -0,0 +1,98 @@
{
"_args": [
[
"@babel/plugin-transform-classes@^7.0.0-beta",
"/home/bernhard/freifunk-app/node_modules/metro"
]
],
"_from": "@babel/plugin-transform-classes@>=7.0.0-beta <8.0.0",
"_id": "@babel/plugin-transform-classes@7.0.0-beta.54",
"_inCache": true,
"_installable": true,
"_location": "/@babel/plugin-transform-classes",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/plugin-transform-classes_7.0.0-beta.54_1531764032283_0.5352012856347708"
},
"_npmUser": {
"email": "hi@henryzoo.com",
"name": "hzoo"
},
"_phantomChildren": {},
"_requested": {
"name": "@babel/plugin-transform-classes",
"raw": "@babel/plugin-transform-classes@^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-classes/-/plugin-transform-classes-7.0.0-beta.54.tgz",
"_shasum": "b15781d2e499ce25438e73fea2fa5a09858568ff",
"_shrinkwrap": null,
"_spec": "@babel/plugin-transform-classes@^7.0.0-beta",
"_where": "/home/bernhard/freifunk-app/node_modules/metro",
"dependencies": {
"@babel/helper-annotate-as-pure": "7.0.0-beta.54",
"@babel/helper-define-map": "7.0.0-beta.54",
"@babel/helper-function-name": "7.0.0-beta.54",
"@babel/helper-optimise-call-expression": "7.0.0-beta.54",
"@babel/helper-plugin-utils": "7.0.0-beta.54",
"@babel/helper-replace-supers": "7.0.0-beta.54",
"@babel/helper-split-export-declaration": "7.0.0-beta.54",
"globals": "^11.1.0"
},
"description": "Compile ES2015 classes to ES5",
"devDependencies": {
"@babel/core": "7.0.0-beta.54",
"@babel/helper-plugin-test-runner": "7.0.0-beta.54"
},
"directories": {},
"dist": {
"fileCount": 8,
"shasum": "b15781d2e499ce25438e73fea2fa5a09858568ff",
"tarball": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.0.0-beta.54.tgz",
"unpackedSize": 24420
},
"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-classes",
"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-classes"
},
"version": "7.0.0-beta.54"
}