diff --git a/packages/common/.gitignore b/packages/common/.gitignore index cf08d58354..57bf2e6855 100644 --- a/packages/common/.gitignore +++ b/packages/common/.gitignore @@ -1,6 +1,43 @@ -node_modules/ -myapps/ -config.js -/builder/* -!/builder/assets/ -public/ + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release +.eslintcache + +# Dependency directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules +node_modules_ubuntu +node_modules_windows + +# OSX +.DS_Store + +# flow-typed +flow-typed/npm/* +!flow-typed/npm/module_vx.x.x.js + + +.idea +npm-debug.log.* +dist diff --git a/packages/common/node_modules/.bin/babel b/packages/common/node_modules/.bin/babel deleted file mode 120000 index fdb3195111..0000000000 --- a/packages/common/node_modules/.bin/babel +++ /dev/null @@ -1 +0,0 @@ -../@babel/cli/bin/babel.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/babel-external-helpers b/packages/common/node_modules/.bin/babel-external-helpers deleted file mode 120000 index e8d78df6c2..0000000000 --- a/packages/common/node_modules/.bin/babel-external-helpers +++ /dev/null @@ -1 +0,0 @@ -../@babel/cli/bin/babel-external-helpers.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/cross-env b/packages/common/node_modules/.bin/cross-env deleted file mode 120000 index f68f48ad92..0000000000 --- a/packages/common/node_modules/.bin/cross-env +++ /dev/null @@ -1 +0,0 @@ -../cross-env/dist/bin/cross-env.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/cross-env-shell b/packages/common/node_modules/.bin/cross-env-shell deleted file mode 120000 index ee50a76478..0000000000 --- a/packages/common/node_modules/.bin/cross-env-shell +++ /dev/null @@ -1 +0,0 @@ -../cross-env/dist/bin/cross-env-shell.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/jest b/packages/common/node_modules/.bin/jest deleted file mode 120000 index 61c1861542..0000000000 --- a/packages/common/node_modules/.bin/jest +++ /dev/null @@ -1 +0,0 @@ -../jest/bin/jest.js \ No newline at end of file diff --git a/packages/common/node_modules/.bin/rimraf b/packages/common/node_modules/.bin/rimraf deleted file mode 120000 index 4cd49a49dd..0000000000 --- a/packages/common/node_modules/.bin/rimraf +++ /dev/null @@ -1 +0,0 @@ -../rimraf/bin.js \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/LICENSE b/packages/common/node_modules/@babel/template/LICENSE deleted file mode 100644 index f31575ec77..0000000000 --- a/packages/common/node_modules/@babel/template/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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. diff --git a/packages/common/node_modules/@babel/template/README.md b/packages/common/node_modules/@babel/template/README.md deleted file mode 100644 index cf8f944396..0000000000 --- a/packages/common/node_modules/@babel/template/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/template - -> Generate an AST from a string template. - -See our website [@babel/template](https://babeljs.io/docs/en/next/babel-template.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/template -``` - -or using yarn: - -```sh -yarn add @babel/template --dev -``` diff --git a/packages/common/node_modules/@babel/template/lib/builder.js b/packages/common/node_modules/@babel/template/lib/builder.js deleted file mode 100644 index 2a0e629726..0000000000 --- a/packages/common/node_modules/@babel/template/lib/builder.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createTemplateBuilder; - -var _options = require("./options"); - -var _string = _interopRequireDefault(require("./string")); - -var _literal = _interopRequireDefault(require("./literal")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const NO_PLACEHOLDER = (0, _options.validate)({ - placeholderPattern: false -}); - -function createTemplateBuilder(formatter, defaultOpts) { - const templateFnCache = new WeakMap(); - const templateAstCache = new WeakMap(); - const cachedOpts = defaultOpts || (0, _options.validate)(null); - return Object.assign((tpl, ...args) => { - if (typeof tpl === "string") { - if (args.length > 1) throw new Error("Unexpected extra params."); - return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])))); - } else if (Array.isArray(tpl)) { - let builder = templateFnCache.get(tpl); - - if (!builder) { - builder = (0, _literal.default)(formatter, tpl, cachedOpts); - templateFnCache.set(tpl, builder); - } - - return extendedTrace(builder(args)); - } else if (typeof tpl === "object" && tpl) { - if (args.length > 0) throw new Error("Unexpected extra params."); - return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl))); - } - - throw new Error(`Unexpected template param ${typeof tpl}`); - }, { - ast: (tpl, ...args) => { - if (typeof tpl === "string") { - if (args.length > 1) throw new Error("Unexpected extra params."); - return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))(); - } else if (Array.isArray(tpl)) { - let builder = templateAstCache.get(tpl); - - if (!builder) { - builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER)); - templateAstCache.set(tpl, builder); - } - - return builder(args)(); - } - - throw new Error(`Unexpected template param ${typeof tpl}`); - } - }); -} - -function extendedTrace(fn) { - let rootStack = ""; - - try { - throw new Error(); - } catch (error) { - if (error.stack) { - rootStack = error.stack.split("\n").slice(3).join("\n"); - } - } - - return arg => { - try { - return fn(arg); - } catch (err) { - err.stack += `\n =============\n${rootStack}`; - throw err; - } - }; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/formatters.js b/packages/common/node_modules/@babel/template/lib/formatters.js deleted file mode 100644 index 59e0984cba..0000000000 --- a/packages/common/node_modules/@babel/template/lib/formatters.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.program = exports.expression = exports.statement = exports.statements = exports.smart = void 0; - -function makeStatementFormatter(fn) { - return { - code: str => `/* @babel/template */;\n${str}`, - validate: () => {}, - unwrap: ast => { - return fn(ast.program.body.slice(1)); - } - }; -} - -const smart = makeStatementFormatter(body => { - if (body.length > 1) { - return body; - } else { - return body[0]; - } -}); -exports.smart = smart; -const statements = makeStatementFormatter(body => body); -exports.statements = statements; -const statement = makeStatementFormatter(body => { - if (body.length === 0) { - throw new Error("Found nothing to return."); - } - - if (body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - return body[0]; -}); -exports.statement = statement; -const expression = { - code: str => `(\n${str}\n)`, - validate: ({ - program - }) => { - if (program.body.length > 1) { - throw new Error("Found multiple statements but wanted one"); - } - - const expression = program.body[0].expression; - - if (expression.start === 0) { - throw new Error("Parse result included parens."); - } - }, - unwrap: ast => ast.program.body[0].expression -}; -exports.expression = expression; -const program = { - code: str => str, - validate: () => {}, - unwrap: ast => ast.program -}; -exports.program = program; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/index.js b/packages/common/node_modules/@babel/template/lib/index.js deleted file mode 100644 index 9c666dbcc1..0000000000 --- a/packages/common/node_modules/@babel/template/lib/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.program = exports.expression = exports.statements = exports.statement = exports.smart = void 0; - -var formatters = _interopRequireWildcard(require("./formatters")); - -var _builder = _interopRequireDefault(require("./builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const smart = (0, _builder.default)(formatters.smart); -exports.smart = smart; -const statement = (0, _builder.default)(formatters.statement); -exports.statement = statement; -const statements = (0, _builder.default)(formatters.statements); -exports.statements = statements; -const expression = (0, _builder.default)(formatters.expression); -exports.expression = expression; -const program = (0, _builder.default)(formatters.program); -exports.program = program; - -var _default = Object.assign(smart.bind(undefined), { - smart, - statement, - statements, - expression, - program, - ast: smart.ast -}); - -exports.default = _default; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/literal.js b/packages/common/node_modules/@babel/template/lib/literal.js deleted file mode 100644 index 0b8f904582..0000000000 --- a/packages/common/node_modules/@babel/template/lib/literal.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = literalTemplate; - -var _options = require("./options"); - -var _parse = _interopRequireDefault(require("./parse")); - -var _populate = _interopRequireDefault(require("./populate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function literalTemplate(formatter, tpl, opts) { - const { - metadata, - names - } = buildLiteralData(formatter, tpl, opts); - return arg => { - const defaultReplacements = arg.reduce((acc, replacement, i) => { - acc[names[i]] = replacement; - return acc; - }, {}); - return arg => { - const replacements = (0, _options.normalizeReplacements)(arg); - - if (replacements) { - Object.keys(replacements).forEach(key => { - if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) { - throw new Error("Unexpected replacement overlap."); - } - }); - } - - return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements)); - }; - }; -} - -function buildLiteralData(formatter, tpl, opts) { - let names; - let nameSet; - let metadata; - let prefix = ""; - - do { - prefix += "$"; - const result = buildTemplateCode(tpl, prefix); - names = result.names; - nameSet = new Set(names); - metadata = (0, _parse.default)(formatter, formatter.code(result.code), { - parser: opts.parser, - placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])), - placeholderPattern: opts.placeholderPattern, - preserveComments: opts.preserveComments, - syntacticPlaceholders: opts.syntacticPlaceholders - }); - } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name))); - - return { - metadata, - names - }; -} - -function buildTemplateCode(tpl, prefix) { - const names = []; - let code = tpl[0]; - - for (let i = 1; i < tpl.length; i++) { - const value = `${prefix}${i - 1}`; - names.push(value); - code += value + tpl[i]; - } - - return { - names, - code - }; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/options.js b/packages/common/node_modules/@babel/template/lib/options.js deleted file mode 100644 index 6039a7bc59..0000000000 --- a/packages/common/node_modules/@babel/template/lib/options.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.merge = merge; -exports.validate = validate; -exports.normalizeReplacements = normalizeReplacements; - -function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } - -function merge(a, b) { - const { - placeholderWhitelist = a.placeholderWhitelist, - placeholderPattern = a.placeholderPattern, - preserveComments = a.preserveComments, - syntacticPlaceholders = a.syntacticPlaceholders - } = b; - return { - parser: Object.assign({}, a.parser, {}, b.parser), - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - }; -} - -function validate(opts) { - if (opts != null && typeof opts !== "object") { - throw new Error("Unknown template options."); - } - - const _ref = opts || {}, - { - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - } = _ref, - parser = _objectWithoutPropertiesLoose(_ref, ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"]); - - if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) { - throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined"); - } - - if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) { - throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined"); - } - - if (preserveComments != null && typeof preserveComments !== "boolean") { - throw new Error("'.preserveComments' must be a boolean, null, or undefined"); - } - - if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") { - throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined"); - } - - if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) { - throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); - } - - return { - parser, - placeholderWhitelist: placeholderWhitelist || undefined, - placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern, - preserveComments: preserveComments == null ? undefined : preserveComments, - syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders - }; -} - -function normalizeReplacements(replacements) { - if (Array.isArray(replacements)) { - return replacements.reduce((acc, replacement, i) => { - acc["$" + i] = replacement; - return acc; - }, {}); - } else if (typeof replacements === "object" || replacements == null) { - return replacements || undefined; - } - - throw new Error("Template replacements must be an array, object, null, or undefined"); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/parse.js b/packages/common/node_modules/@babel/template/lib/parse.js deleted file mode 100644 index 31e5849118..0000000000 --- a/packages/common/node_modules/@babel/template/lib/parse.js +++ /dev/null @@ -1,171 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = parseAndBuildMetadata; - -var t = _interopRequireWildcard(require("@babel/types")); - -var _parser = require("@babel/parser"); - -var _codeFrame = require("@babel/code-frame"); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const PATTERN = /^[_$A-Z0-9]+$/; - -function parseAndBuildMetadata(formatter, code, opts) { - const ast = parseWithCodeFrame(code, opts.parser); - const { - placeholderWhitelist, - placeholderPattern, - preserveComments, - syntacticPlaceholders - } = opts; - t.removePropertiesDeep(ast, { - preserveComments - }); - formatter.validate(ast); - const syntactic = { - placeholders: [], - placeholderNames: new Set() - }; - const legacy = { - placeholders: [], - placeholderNames: new Set() - }; - const isLegacyRef = { - value: undefined - }; - t.traverse(ast, placeholderVisitorHandler, { - syntactic, - legacy, - isLegacyRef, - placeholderWhitelist, - placeholderPattern, - syntacticPlaceholders - }); - return Object.assign({ - ast - }, isLegacyRef.value ? legacy : syntactic); -} - -function placeholderVisitorHandler(node, ancestors, state) { - let name; - - if (t.isPlaceholder(node)) { - if (state.syntacticPlaceholders === false) { - throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false."); - } else { - name = node.name.name; - state.isLegacyRef.value = false; - } - } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) { - return; - } else if (t.isIdentifier(node) || t.isJSXIdentifier(node)) { - name = node.name; - state.isLegacyRef.value = true; - } else if (t.isStringLiteral(node)) { - name = node.value; - state.isLegacyRef.value = true; - } else { - return; - } - - if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) { - throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'"); - } - - if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && (!state.placeholderWhitelist || !state.placeholderWhitelist.has(name))) { - return; - } - - ancestors = ancestors.slice(); - const { - node: parent, - key - } = ancestors[ancestors.length - 1]; - let type; - - if (t.isStringLiteral(node) || t.isPlaceholder(node, { - expectedNode: "StringLiteral" - })) { - type = "string"; - } else if (t.isNewExpression(parent) && key === "arguments" || t.isCallExpression(parent) && key === "arguments" || t.isFunction(parent) && key === "params") { - type = "param"; - } else if (t.isExpressionStatement(parent) && !t.isPlaceholder(node)) { - type = "statement"; - ancestors = ancestors.slice(0, -1); - } else if (t.isStatement(node) && t.isPlaceholder(node)) { - type = "statement"; - } else { - type = "other"; - } - - const { - placeholders, - placeholderNames - } = state.isLegacyRef.value ? state.legacy : state.syntactic; - placeholders.push({ - name, - type, - resolve: ast => resolveAncestors(ast, ancestors), - isDuplicate: placeholderNames.has(name) - }); - placeholderNames.add(name); -} - -function resolveAncestors(ast, ancestors) { - let parent = ast; - - for (let i = 0; i < ancestors.length - 1; i++) { - const { - key, - index - } = ancestors[i]; - - if (index === undefined) { - parent = parent[key]; - } else { - parent = parent[key][index]; - } - } - - const { - key, - index - } = ancestors[ancestors.length - 1]; - return { - parent, - key, - index - }; -} - -function parseWithCodeFrame(code, parserOpts) { - parserOpts = Object.assign({ - allowReturnOutsideFunction: true, - allowSuperOutsideMethod: true, - sourceType: "module" - }, parserOpts, { - plugins: (parserOpts.plugins || []).concat("placeholders") - }); - - try { - return (0, _parser.parse)(code, parserOpts); - } catch (err) { - const loc = err.loc; - - if (loc) { - err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code, { - start: loc - }); - err.code = "BABEL_TEMPLATE_PARSE_ERROR"; - } - - throw err; - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/populate.js b/packages/common/node_modules/@babel/template/lib/populate.js deleted file mode 100644 index cbca1917c9..0000000000 --- a/packages/common/node_modules/@babel/template/lib/populate.js +++ /dev/null @@ -1,127 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = populatePlaceholders; - -var t = _interopRequireWildcard(require("@babel/types")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function populatePlaceholders(metadata, replacements) { - const ast = t.cloneNode(metadata.ast); - - if (replacements) { - metadata.placeholders.forEach(placeholder => { - if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) { - const placeholderName = placeholder.name; - throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a - placeholder you may want to consider passing one of the following options to @babel/template: - - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])} - - { placeholderPattern: /^${placeholderName}$/ }`); - } - }); - Object.keys(replacements).forEach(key => { - if (!metadata.placeholderNames.has(key)) { - throw new Error(`Unknown substitution "${key}" given`); - } - }); - } - - metadata.placeholders.slice().reverse().forEach(placeholder => { - try { - applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null); - } catch (e) { - e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`; - throw e; - } - }); - return ast; -} - -function applyReplacement(placeholder, ast, replacement) { - if (placeholder.isDuplicate) { - if (Array.isArray(replacement)) { - replacement = replacement.map(node => t.cloneNode(node)); - } else if (typeof replacement === "object") { - replacement = t.cloneNode(replacement); - } - } - - const { - parent, - key, - index - } = placeholder.resolve(ast); - - if (placeholder.type === "string") { - if (typeof replacement === "string") { - replacement = t.stringLiteral(replacement); - } - - if (!replacement || !t.isStringLiteral(replacement)) { - throw new Error("Expected string substitution"); - } - } else if (placeholder.type === "statement") { - if (index === undefined) { - if (!replacement) { - replacement = t.emptyStatement(); - } else if (Array.isArray(replacement)) { - replacement = t.blockStatement(replacement); - } else if (typeof replacement === "string") { - replacement = t.expressionStatement(t.identifier(replacement)); - } else if (!t.isStatement(replacement)) { - replacement = t.expressionStatement(replacement); - } - } else { - if (replacement && !Array.isArray(replacement)) { - if (typeof replacement === "string") { - replacement = t.identifier(replacement); - } - - if (!t.isStatement(replacement)) { - replacement = t.expressionStatement(replacement); - } - } - } - } else if (placeholder.type === "param") { - if (typeof replacement === "string") { - replacement = t.identifier(replacement); - } - - if (index === undefined) throw new Error("Assertion failure."); - } else { - if (typeof replacement === "string") { - replacement = t.identifier(replacement); - } - - if (Array.isArray(replacement)) { - throw new Error("Cannot replace single expression with an array."); - } - } - - if (index === undefined) { - t.validate(parent, key, replacement); - parent[key] = replacement; - } else { - const items = parent[key].slice(); - - if (placeholder.type === "statement" || placeholder.type === "param") { - if (replacement == null) { - items.splice(index, 1); - } else if (Array.isArray(replacement)) { - items.splice(index, 1, ...replacement); - } else { - items[index] = replacement; - } - } else { - items[index] = replacement; - } - - t.validate(parent, key, items); - parent[key] = items; - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/lib/string.js b/packages/common/node_modules/@babel/template/lib/string.js deleted file mode 100644 index 02ad45782e..0000000000 --- a/packages/common/node_modules/@babel/template/lib/string.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = stringTemplate; - -var _options = require("./options"); - -var _parse = _interopRequireDefault(require("./parse")); - -var _populate = _interopRequireDefault(require("./populate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function stringTemplate(formatter, code, opts) { - code = formatter.code(code); - let metadata; - return arg => { - const replacements = (0, _options.normalizeReplacements)(arg); - if (!metadata) metadata = (0, _parse.default)(formatter, code, opts); - return formatter.unwrap((0, _populate.default)(metadata, replacements)); - }; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/node_modules/.bin/parser b/packages/common/node_modules/@babel/template/node_modules/.bin/parser deleted file mode 120000 index ce7bf97efb..0000000000 --- a/packages/common/node_modules/@babel/template/node_modules/.bin/parser +++ /dev/null @@ -1 +0,0 @@ -../@babel/parser/bin/babel-parser.js \ No newline at end of file diff --git a/packages/common/node_modules/@babel/template/package.json b/packages/common/node_modules/@babel/template/package.json deleted file mode 100644 index febdd7eab7..0000000000 --- a/packages/common/node_modules/@babel/template/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "@babel/template", - "version": "7.8.6", - "description": "Generate an AST from a string template.", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": "https://github.com/babel/babel/tree/master/packages/babel-template", - "main": "lib/index.js", - "dependencies": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" - }, - "gitHead": "750d3dde3bd2d390819820fd22c05441da78751b" -} diff --git a/packages/common/node_modules/@babel/types/LICENSE b/packages/common/node_modules/@babel/types/LICENSE deleted file mode 100644 index f31575ec77..0000000000 --- a/packages/common/node_modules/@babel/types/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -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. diff --git a/packages/common/node_modules/@babel/types/README.md b/packages/common/node_modules/@babel/types/README.md deleted file mode 100644 index 8d33374d3b..0000000000 --- a/packages/common/node_modules/@babel/types/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# @babel/types - -> Babel Types is a Lodash-esque utility library for AST nodes - -See our website [@babel/types](https://babeljs.io/docs/en/next/babel-types.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package. - -## Install - -Using npm: - -```sh -npm install --save-dev @babel/types -``` - -or using yarn: - -```sh -yarn add @babel/types --dev -``` diff --git a/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js b/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js deleted file mode 100644 index 194ec71681..0000000000 --- a/packages/common/node_modules/@babel/types/lib/asserts/assertNode.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = assertNode; - -var _isNode = _interopRequireDefault(require("../validators/isNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assertNode(node) { - if (!(0, _isNode.default)(node)) { - const type = node && node.type || JSON.stringify(node); - throw new TypeError(`Not a valid node of type "${type}"`); - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js b/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js deleted file mode 100644 index 4a6b22c289..0000000000 --- a/packages/common/node_modules/@babel/types/lib/asserts/generated/index.js +++ /dev/null @@ -1,1444 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.assertArrayExpression = assertArrayExpression; -exports.assertAssignmentExpression = assertAssignmentExpression; -exports.assertBinaryExpression = assertBinaryExpression; -exports.assertInterpreterDirective = assertInterpreterDirective; -exports.assertDirective = assertDirective; -exports.assertDirectiveLiteral = assertDirectiveLiteral; -exports.assertBlockStatement = assertBlockStatement; -exports.assertBreakStatement = assertBreakStatement; -exports.assertCallExpression = assertCallExpression; -exports.assertCatchClause = assertCatchClause; -exports.assertConditionalExpression = assertConditionalExpression; -exports.assertContinueStatement = assertContinueStatement; -exports.assertDebuggerStatement = assertDebuggerStatement; -exports.assertDoWhileStatement = assertDoWhileStatement; -exports.assertEmptyStatement = assertEmptyStatement; -exports.assertExpressionStatement = assertExpressionStatement; -exports.assertFile = assertFile; -exports.assertForInStatement = assertForInStatement; -exports.assertForStatement = assertForStatement; -exports.assertFunctionDeclaration = assertFunctionDeclaration; -exports.assertFunctionExpression = assertFunctionExpression; -exports.assertIdentifier = assertIdentifier; -exports.assertIfStatement = assertIfStatement; -exports.assertLabeledStatement = assertLabeledStatement; -exports.assertStringLiteral = assertStringLiteral; -exports.assertNumericLiteral = assertNumericLiteral; -exports.assertNullLiteral = assertNullLiteral; -exports.assertBooleanLiteral = assertBooleanLiteral; -exports.assertRegExpLiteral = assertRegExpLiteral; -exports.assertLogicalExpression = assertLogicalExpression; -exports.assertMemberExpression = assertMemberExpression; -exports.assertNewExpression = assertNewExpression; -exports.assertProgram = assertProgram; -exports.assertObjectExpression = assertObjectExpression; -exports.assertObjectMethod = assertObjectMethod; -exports.assertObjectProperty = assertObjectProperty; -exports.assertRestElement = assertRestElement; -exports.assertReturnStatement = assertReturnStatement; -exports.assertSequenceExpression = assertSequenceExpression; -exports.assertParenthesizedExpression = assertParenthesizedExpression; -exports.assertSwitchCase = assertSwitchCase; -exports.assertSwitchStatement = assertSwitchStatement; -exports.assertThisExpression = assertThisExpression; -exports.assertThrowStatement = assertThrowStatement; -exports.assertTryStatement = assertTryStatement; -exports.assertUnaryExpression = assertUnaryExpression; -exports.assertUpdateExpression = assertUpdateExpression; -exports.assertVariableDeclaration = assertVariableDeclaration; -exports.assertVariableDeclarator = assertVariableDeclarator; -exports.assertWhileStatement = assertWhileStatement; -exports.assertWithStatement = assertWithStatement; -exports.assertAssignmentPattern = assertAssignmentPattern; -exports.assertArrayPattern = assertArrayPattern; -exports.assertArrowFunctionExpression = assertArrowFunctionExpression; -exports.assertClassBody = assertClassBody; -exports.assertClassExpression = assertClassExpression; -exports.assertClassDeclaration = assertClassDeclaration; -exports.assertExportAllDeclaration = assertExportAllDeclaration; -exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration; -exports.assertExportNamedDeclaration = assertExportNamedDeclaration; -exports.assertExportSpecifier = assertExportSpecifier; -exports.assertForOfStatement = assertForOfStatement; -exports.assertImportDeclaration = assertImportDeclaration; -exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier; -exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier; -exports.assertImportSpecifier = assertImportSpecifier; -exports.assertMetaProperty = assertMetaProperty; -exports.assertClassMethod = assertClassMethod; -exports.assertObjectPattern = assertObjectPattern; -exports.assertSpreadElement = assertSpreadElement; -exports.assertSuper = assertSuper; -exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression; -exports.assertTemplateElement = assertTemplateElement; -exports.assertTemplateLiteral = assertTemplateLiteral; -exports.assertYieldExpression = assertYieldExpression; -exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation; -exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation; -exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation; -exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation; -exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation; -exports.assertClassImplements = assertClassImplements; -exports.assertDeclareClass = assertDeclareClass; -exports.assertDeclareFunction = assertDeclareFunction; -exports.assertDeclareInterface = assertDeclareInterface; -exports.assertDeclareModule = assertDeclareModule; -exports.assertDeclareModuleExports = assertDeclareModuleExports; -exports.assertDeclareTypeAlias = assertDeclareTypeAlias; -exports.assertDeclareOpaqueType = assertDeclareOpaqueType; -exports.assertDeclareVariable = assertDeclareVariable; -exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration; -exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration; -exports.assertDeclaredPredicate = assertDeclaredPredicate; -exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation; -exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation; -exports.assertFunctionTypeParam = assertFunctionTypeParam; -exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation; -exports.assertInferredPredicate = assertInferredPredicate; -exports.assertInterfaceExtends = assertInterfaceExtends; -exports.assertInterfaceDeclaration = assertInterfaceDeclaration; -exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation; -exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation; -exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation; -exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation; -exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation; -exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation; -exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation; -exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation; -exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot; -exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty; -exports.assertObjectTypeIndexer = assertObjectTypeIndexer; -exports.assertObjectTypeProperty = assertObjectTypeProperty; -exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty; -exports.assertOpaqueType = assertOpaqueType; -exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier; -exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation; -exports.assertStringTypeAnnotation = assertStringTypeAnnotation; -exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation; -exports.assertThisTypeAnnotation = assertThisTypeAnnotation; -exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation; -exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation; -exports.assertTypeAlias = assertTypeAlias; -exports.assertTypeAnnotation = assertTypeAnnotation; -exports.assertTypeCastExpression = assertTypeCastExpression; -exports.assertTypeParameter = assertTypeParameter; -exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration; -exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation; -exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation; -exports.assertVariance = assertVariance; -exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation; -exports.assertEnumDeclaration = assertEnumDeclaration; -exports.assertEnumBooleanBody = assertEnumBooleanBody; -exports.assertEnumNumberBody = assertEnumNumberBody; -exports.assertEnumStringBody = assertEnumStringBody; -exports.assertEnumSymbolBody = assertEnumSymbolBody; -exports.assertEnumBooleanMember = assertEnumBooleanMember; -exports.assertEnumNumberMember = assertEnumNumberMember; -exports.assertEnumStringMember = assertEnumStringMember; -exports.assertEnumDefaultedMember = assertEnumDefaultedMember; -exports.assertJSXAttribute = assertJSXAttribute; -exports.assertJSXClosingElement = assertJSXClosingElement; -exports.assertJSXElement = assertJSXElement; -exports.assertJSXEmptyExpression = assertJSXEmptyExpression; -exports.assertJSXExpressionContainer = assertJSXExpressionContainer; -exports.assertJSXSpreadChild = assertJSXSpreadChild; -exports.assertJSXIdentifier = assertJSXIdentifier; -exports.assertJSXMemberExpression = assertJSXMemberExpression; -exports.assertJSXNamespacedName = assertJSXNamespacedName; -exports.assertJSXOpeningElement = assertJSXOpeningElement; -exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute; -exports.assertJSXText = assertJSXText; -exports.assertJSXFragment = assertJSXFragment; -exports.assertJSXOpeningFragment = assertJSXOpeningFragment; -exports.assertJSXClosingFragment = assertJSXClosingFragment; -exports.assertNoop = assertNoop; -exports.assertPlaceholder = assertPlaceholder; -exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier; -exports.assertArgumentPlaceholder = assertArgumentPlaceholder; -exports.assertAwaitExpression = assertAwaitExpression; -exports.assertBindExpression = assertBindExpression; -exports.assertClassProperty = assertClassProperty; -exports.assertOptionalMemberExpression = assertOptionalMemberExpression; -exports.assertPipelineTopicExpression = assertPipelineTopicExpression; -exports.assertPipelineBareFunction = assertPipelineBareFunction; -exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference; -exports.assertOptionalCallExpression = assertOptionalCallExpression; -exports.assertClassPrivateProperty = assertClassPrivateProperty; -exports.assertClassPrivateMethod = assertClassPrivateMethod; -exports.assertImport = assertImport; -exports.assertDecorator = assertDecorator; -exports.assertDoExpression = assertDoExpression; -exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier; -exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier; -exports.assertPrivateName = assertPrivateName; -exports.assertBigIntLiteral = assertBigIntLiteral; -exports.assertRecordExpression = assertRecordExpression; -exports.assertTupleExpression = assertTupleExpression; -exports.assertTSParameterProperty = assertTSParameterProperty; -exports.assertTSDeclareFunction = assertTSDeclareFunction; -exports.assertTSDeclareMethod = assertTSDeclareMethod; -exports.assertTSQualifiedName = assertTSQualifiedName; -exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration; -exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration; -exports.assertTSPropertySignature = assertTSPropertySignature; -exports.assertTSMethodSignature = assertTSMethodSignature; -exports.assertTSIndexSignature = assertTSIndexSignature; -exports.assertTSAnyKeyword = assertTSAnyKeyword; -exports.assertTSBooleanKeyword = assertTSBooleanKeyword; -exports.assertTSBigIntKeyword = assertTSBigIntKeyword; -exports.assertTSNeverKeyword = assertTSNeverKeyword; -exports.assertTSNullKeyword = assertTSNullKeyword; -exports.assertTSNumberKeyword = assertTSNumberKeyword; -exports.assertTSObjectKeyword = assertTSObjectKeyword; -exports.assertTSStringKeyword = assertTSStringKeyword; -exports.assertTSSymbolKeyword = assertTSSymbolKeyword; -exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword; -exports.assertTSUnknownKeyword = assertTSUnknownKeyword; -exports.assertTSVoidKeyword = assertTSVoidKeyword; -exports.assertTSThisType = assertTSThisType; -exports.assertTSFunctionType = assertTSFunctionType; -exports.assertTSConstructorType = assertTSConstructorType; -exports.assertTSTypeReference = assertTSTypeReference; -exports.assertTSTypePredicate = assertTSTypePredicate; -exports.assertTSTypeQuery = assertTSTypeQuery; -exports.assertTSTypeLiteral = assertTSTypeLiteral; -exports.assertTSArrayType = assertTSArrayType; -exports.assertTSTupleType = assertTSTupleType; -exports.assertTSOptionalType = assertTSOptionalType; -exports.assertTSRestType = assertTSRestType; -exports.assertTSUnionType = assertTSUnionType; -exports.assertTSIntersectionType = assertTSIntersectionType; -exports.assertTSConditionalType = assertTSConditionalType; -exports.assertTSInferType = assertTSInferType; -exports.assertTSParenthesizedType = assertTSParenthesizedType; -exports.assertTSTypeOperator = assertTSTypeOperator; -exports.assertTSIndexedAccessType = assertTSIndexedAccessType; -exports.assertTSMappedType = assertTSMappedType; -exports.assertTSLiteralType = assertTSLiteralType; -exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments; -exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration; -exports.assertTSInterfaceBody = assertTSInterfaceBody; -exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration; -exports.assertTSAsExpression = assertTSAsExpression; -exports.assertTSTypeAssertion = assertTSTypeAssertion; -exports.assertTSEnumDeclaration = assertTSEnumDeclaration; -exports.assertTSEnumMember = assertTSEnumMember; -exports.assertTSModuleDeclaration = assertTSModuleDeclaration; -exports.assertTSModuleBlock = assertTSModuleBlock; -exports.assertTSImportType = assertTSImportType; -exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration; -exports.assertTSExternalModuleReference = assertTSExternalModuleReference; -exports.assertTSNonNullExpression = assertTSNonNullExpression; -exports.assertTSExportAssignment = assertTSExportAssignment; -exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration; -exports.assertTSTypeAnnotation = assertTSTypeAnnotation; -exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation; -exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration; -exports.assertTSTypeParameter = assertTSTypeParameter; -exports.assertExpression = assertExpression; -exports.assertBinary = assertBinary; -exports.assertScopable = assertScopable; -exports.assertBlockParent = assertBlockParent; -exports.assertBlock = assertBlock; -exports.assertStatement = assertStatement; -exports.assertTerminatorless = assertTerminatorless; -exports.assertCompletionStatement = assertCompletionStatement; -exports.assertConditional = assertConditional; -exports.assertLoop = assertLoop; -exports.assertWhile = assertWhile; -exports.assertExpressionWrapper = assertExpressionWrapper; -exports.assertFor = assertFor; -exports.assertForXStatement = assertForXStatement; -exports.assertFunction = assertFunction; -exports.assertFunctionParent = assertFunctionParent; -exports.assertPureish = assertPureish; -exports.assertDeclaration = assertDeclaration; -exports.assertPatternLike = assertPatternLike; -exports.assertLVal = assertLVal; -exports.assertTSEntityName = assertTSEntityName; -exports.assertLiteral = assertLiteral; -exports.assertImmutable = assertImmutable; -exports.assertUserWhitespacable = assertUserWhitespacable; -exports.assertMethod = assertMethod; -exports.assertObjectMember = assertObjectMember; -exports.assertProperty = assertProperty; -exports.assertUnaryLike = assertUnaryLike; -exports.assertPattern = assertPattern; -exports.assertClass = assertClass; -exports.assertModuleDeclaration = assertModuleDeclaration; -exports.assertExportDeclaration = assertExportDeclaration; -exports.assertModuleSpecifier = assertModuleSpecifier; -exports.assertFlow = assertFlow; -exports.assertFlowType = assertFlowType; -exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation; -exports.assertFlowDeclaration = assertFlowDeclaration; -exports.assertFlowPredicate = assertFlowPredicate; -exports.assertEnumBody = assertEnumBody; -exports.assertEnumMember = assertEnumMember; -exports.assertJSX = assertJSX; -exports.assertPrivate = assertPrivate; -exports.assertTSTypeElement = assertTSTypeElement; -exports.assertTSType = assertTSType; -exports.assertNumberLiteral = assertNumberLiteral; -exports.assertRegexLiteral = assertRegexLiteral; -exports.assertRestProperty = assertRestProperty; -exports.assertSpreadProperty = assertSpreadProperty; - -var _is = _interopRequireDefault(require("../../validators/is")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function assert(type, node, opts) { - if (!(0, _is.default)(type, node, opts)) { - throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, ` + `but instead got "${node.type}".`); - } -} - -function assertArrayExpression(node, opts = {}) { - assert("ArrayExpression", node, opts); -} - -function assertAssignmentExpression(node, opts = {}) { - assert("AssignmentExpression", node, opts); -} - -function assertBinaryExpression(node, opts = {}) { - assert("BinaryExpression", node, opts); -} - -function assertInterpreterDirective(node, opts = {}) { - assert("InterpreterDirective", node, opts); -} - -function assertDirective(node, opts = {}) { - assert("Directive", node, opts); -} - -function assertDirectiveLiteral(node, opts = {}) { - assert("DirectiveLiteral", node, opts); -} - -function assertBlockStatement(node, opts = {}) { - assert("BlockStatement", node, opts); -} - -function assertBreakStatement(node, opts = {}) { - assert("BreakStatement", node, opts); -} - -function assertCallExpression(node, opts = {}) { - assert("CallExpression", node, opts); -} - -function assertCatchClause(node, opts = {}) { - assert("CatchClause", node, opts); -} - -function assertConditionalExpression(node, opts = {}) { - assert("ConditionalExpression", node, opts); -} - -function assertContinueStatement(node, opts = {}) { - assert("ContinueStatement", node, opts); -} - -function assertDebuggerStatement(node, opts = {}) { - assert("DebuggerStatement", node, opts); -} - -function assertDoWhileStatement(node, opts = {}) { - assert("DoWhileStatement", node, opts); -} - -function assertEmptyStatement(node, opts = {}) { - assert("EmptyStatement", node, opts); -} - -function assertExpressionStatement(node, opts = {}) { - assert("ExpressionStatement", node, opts); -} - -function assertFile(node, opts = {}) { - assert("File", node, opts); -} - -function assertForInStatement(node, opts = {}) { - assert("ForInStatement", node, opts); -} - -function assertForStatement(node, opts = {}) { - assert("ForStatement", node, opts); -} - -function assertFunctionDeclaration(node, opts = {}) { - assert("FunctionDeclaration", node, opts); -} - -function assertFunctionExpression(node, opts = {}) { - assert("FunctionExpression", node, opts); -} - -function assertIdentifier(node, opts = {}) { - assert("Identifier", node, opts); -} - -function assertIfStatement(node, opts = {}) { - assert("IfStatement", node, opts); -} - -function assertLabeledStatement(node, opts = {}) { - assert("LabeledStatement", node, opts); -} - -function assertStringLiteral(node, opts = {}) { - assert("StringLiteral", node, opts); -} - -function assertNumericLiteral(node, opts = {}) { - assert("NumericLiteral", node, opts); -} - -function assertNullLiteral(node, opts = {}) { - assert("NullLiteral", node, opts); -} - -function assertBooleanLiteral(node, opts = {}) { - assert("BooleanLiteral", node, opts); -} - -function assertRegExpLiteral(node, opts = {}) { - assert("RegExpLiteral", node, opts); -} - -function assertLogicalExpression(node, opts = {}) { - assert("LogicalExpression", node, opts); -} - -function assertMemberExpression(node, opts = {}) { - assert("MemberExpression", node, opts); -} - -function assertNewExpression(node, opts = {}) { - assert("NewExpression", node, opts); -} - -function assertProgram(node, opts = {}) { - assert("Program", node, opts); -} - -function assertObjectExpression(node, opts = {}) { - assert("ObjectExpression", node, opts); -} - -function assertObjectMethod(node, opts = {}) { - assert("ObjectMethod", node, opts); -} - -function assertObjectProperty(node, opts = {}) { - assert("ObjectProperty", node, opts); -} - -function assertRestElement(node, opts = {}) { - assert("RestElement", node, opts); -} - -function assertReturnStatement(node, opts = {}) { - assert("ReturnStatement", node, opts); -} - -function assertSequenceExpression(node, opts = {}) { - assert("SequenceExpression", node, opts); -} - -function assertParenthesizedExpression(node, opts = {}) { - assert("ParenthesizedExpression", node, opts); -} - -function assertSwitchCase(node, opts = {}) { - assert("SwitchCase", node, opts); -} - -function assertSwitchStatement(node, opts = {}) { - assert("SwitchStatement", node, opts); -} - -function assertThisExpression(node, opts = {}) { - assert("ThisExpression", node, opts); -} - -function assertThrowStatement(node, opts = {}) { - assert("ThrowStatement", node, opts); -} - -function assertTryStatement(node, opts = {}) { - assert("TryStatement", node, opts); -} - -function assertUnaryExpression(node, opts = {}) { - assert("UnaryExpression", node, opts); -} - -function assertUpdateExpression(node, opts = {}) { - assert("UpdateExpression", node, opts); -} - -function assertVariableDeclaration(node, opts = {}) { - assert("VariableDeclaration", node, opts); -} - -function assertVariableDeclarator(node, opts = {}) { - assert("VariableDeclarator", node, opts); -} - -function assertWhileStatement(node, opts = {}) { - assert("WhileStatement", node, opts); -} - -function assertWithStatement(node, opts = {}) { - assert("WithStatement", node, opts); -} - -function assertAssignmentPattern(node, opts = {}) { - assert("AssignmentPattern", node, opts); -} - -function assertArrayPattern(node, opts = {}) { - assert("ArrayPattern", node, opts); -} - -function assertArrowFunctionExpression(node, opts = {}) { - assert("ArrowFunctionExpression", node, opts); -} - -function assertClassBody(node, opts = {}) { - assert("ClassBody", node, opts); -} - -function assertClassExpression(node, opts = {}) { - assert("ClassExpression", node, opts); -} - -function assertClassDeclaration(node, opts = {}) { - assert("ClassDeclaration", node, opts); -} - -function assertExportAllDeclaration(node, opts = {}) { - assert("ExportAllDeclaration", node, opts); -} - -function assertExportDefaultDeclaration(node, opts = {}) { - assert("ExportDefaultDeclaration", node, opts); -} - -function assertExportNamedDeclaration(node, opts = {}) { - assert("ExportNamedDeclaration", node, opts); -} - -function assertExportSpecifier(node, opts = {}) { - assert("ExportSpecifier", node, opts); -} - -function assertForOfStatement(node, opts = {}) { - assert("ForOfStatement", node, opts); -} - -function assertImportDeclaration(node, opts = {}) { - assert("ImportDeclaration", node, opts); -} - -function assertImportDefaultSpecifier(node, opts = {}) { - assert("ImportDefaultSpecifier", node, opts); -} - -function assertImportNamespaceSpecifier(node, opts = {}) { - assert("ImportNamespaceSpecifier", node, opts); -} - -function assertImportSpecifier(node, opts = {}) { - assert("ImportSpecifier", node, opts); -} - -function assertMetaProperty(node, opts = {}) { - assert("MetaProperty", node, opts); -} - -function assertClassMethod(node, opts = {}) { - assert("ClassMethod", node, opts); -} - -function assertObjectPattern(node, opts = {}) { - assert("ObjectPattern", node, opts); -} - -function assertSpreadElement(node, opts = {}) { - assert("SpreadElement", node, opts); -} - -function assertSuper(node, opts = {}) { - assert("Super", node, opts); -} - -function assertTaggedTemplateExpression(node, opts = {}) { - assert("TaggedTemplateExpression", node, opts); -} - -function assertTemplateElement(node, opts = {}) { - assert("TemplateElement", node, opts); -} - -function assertTemplateLiteral(node, opts = {}) { - assert("TemplateLiteral", node, opts); -} - -function assertYieldExpression(node, opts = {}) { - assert("YieldExpression", node, opts); -} - -function assertAnyTypeAnnotation(node, opts = {}) { - assert("AnyTypeAnnotation", node, opts); -} - -function assertArrayTypeAnnotation(node, opts = {}) { - assert("ArrayTypeAnnotation", node, opts); -} - -function assertBooleanTypeAnnotation(node, opts = {}) { - assert("BooleanTypeAnnotation", node, opts); -} - -function assertBooleanLiteralTypeAnnotation(node, opts = {}) { - assert("BooleanLiteralTypeAnnotation", node, opts); -} - -function assertNullLiteralTypeAnnotation(node, opts = {}) { - assert("NullLiteralTypeAnnotation", node, opts); -} - -function assertClassImplements(node, opts = {}) { - assert("ClassImplements", node, opts); -} - -function assertDeclareClass(node, opts = {}) { - assert("DeclareClass", node, opts); -} - -function assertDeclareFunction(node, opts = {}) { - assert("DeclareFunction", node, opts); -} - -function assertDeclareInterface(node, opts = {}) { - assert("DeclareInterface", node, opts); -} - -function assertDeclareModule(node, opts = {}) { - assert("DeclareModule", node, opts); -} - -function assertDeclareModuleExports(node, opts = {}) { - assert("DeclareModuleExports", node, opts); -} - -function assertDeclareTypeAlias(node, opts = {}) { - assert("DeclareTypeAlias", node, opts); -} - -function assertDeclareOpaqueType(node, opts = {}) { - assert("DeclareOpaqueType", node, opts); -} - -function assertDeclareVariable(node, opts = {}) { - assert("DeclareVariable", node, opts); -} - -function assertDeclareExportDeclaration(node, opts = {}) { - assert("DeclareExportDeclaration", node, opts); -} - -function assertDeclareExportAllDeclaration(node, opts = {}) { - assert("DeclareExportAllDeclaration", node, opts); -} - -function assertDeclaredPredicate(node, opts = {}) { - assert("DeclaredPredicate", node, opts); -} - -function assertExistsTypeAnnotation(node, opts = {}) { - assert("ExistsTypeAnnotation", node, opts); -} - -function assertFunctionTypeAnnotation(node, opts = {}) { - assert("FunctionTypeAnnotation", node, opts); -} - -function assertFunctionTypeParam(node, opts = {}) { - assert("FunctionTypeParam", node, opts); -} - -function assertGenericTypeAnnotation(node, opts = {}) { - assert("GenericTypeAnnotation", node, opts); -} - -function assertInferredPredicate(node, opts = {}) { - assert("InferredPredicate", node, opts); -} - -function assertInterfaceExtends(node, opts = {}) { - assert("InterfaceExtends", node, opts); -} - -function assertInterfaceDeclaration(node, opts = {}) { - assert("InterfaceDeclaration", node, opts); -} - -function assertInterfaceTypeAnnotation(node, opts = {}) { - assert("InterfaceTypeAnnotation", node, opts); -} - -function assertIntersectionTypeAnnotation(node, opts = {}) { - assert("IntersectionTypeAnnotation", node, opts); -} - -function assertMixedTypeAnnotation(node, opts = {}) { - assert("MixedTypeAnnotation", node, opts); -} - -function assertEmptyTypeAnnotation(node, opts = {}) { - assert("EmptyTypeAnnotation", node, opts); -} - -function assertNullableTypeAnnotation(node, opts = {}) { - assert("NullableTypeAnnotation", node, opts); -} - -function assertNumberLiteralTypeAnnotation(node, opts = {}) { - assert("NumberLiteralTypeAnnotation", node, opts); -} - -function assertNumberTypeAnnotation(node, opts = {}) { - assert("NumberTypeAnnotation", node, opts); -} - -function assertObjectTypeAnnotation(node, opts = {}) { - assert("ObjectTypeAnnotation", node, opts); -} - -function assertObjectTypeInternalSlot(node, opts = {}) { - assert("ObjectTypeInternalSlot", node, opts); -} - -function assertObjectTypeCallProperty(node, opts = {}) { - assert("ObjectTypeCallProperty", node, opts); -} - -function assertObjectTypeIndexer(node, opts = {}) { - assert("ObjectTypeIndexer", node, opts); -} - -function assertObjectTypeProperty(node, opts = {}) { - assert("ObjectTypeProperty", node, opts); -} - -function assertObjectTypeSpreadProperty(node, opts = {}) { - assert("ObjectTypeSpreadProperty", node, opts); -} - -function assertOpaqueType(node, opts = {}) { - assert("OpaqueType", node, opts); -} - -function assertQualifiedTypeIdentifier(node, opts = {}) { - assert("QualifiedTypeIdentifier", node, opts); -} - -function assertStringLiteralTypeAnnotation(node, opts = {}) { - assert("StringLiteralTypeAnnotation", node, opts); -} - -function assertStringTypeAnnotation(node, opts = {}) { - assert("StringTypeAnnotation", node, opts); -} - -function assertSymbolTypeAnnotation(node, opts = {}) { - assert("SymbolTypeAnnotation", node, opts); -} - -function assertThisTypeAnnotation(node, opts = {}) { - assert("ThisTypeAnnotation", node, opts); -} - -function assertTupleTypeAnnotation(node, opts = {}) { - assert("TupleTypeAnnotation", node, opts); -} - -function assertTypeofTypeAnnotation(node, opts = {}) { - assert("TypeofTypeAnnotation", node, opts); -} - -function assertTypeAlias(node, opts = {}) { - assert("TypeAlias", node, opts); -} - -function assertTypeAnnotation(node, opts = {}) { - assert("TypeAnnotation", node, opts); -} - -function assertTypeCastExpression(node, opts = {}) { - assert("TypeCastExpression", node, opts); -} - -function assertTypeParameter(node, opts = {}) { - assert("TypeParameter", node, opts); -} - -function assertTypeParameterDeclaration(node, opts = {}) { - assert("TypeParameterDeclaration", node, opts); -} - -function assertTypeParameterInstantiation(node, opts = {}) { - assert("TypeParameterInstantiation", node, opts); -} - -function assertUnionTypeAnnotation(node, opts = {}) { - assert("UnionTypeAnnotation", node, opts); -} - -function assertVariance(node, opts = {}) { - assert("Variance", node, opts); -} - -function assertVoidTypeAnnotation(node, opts = {}) { - assert("VoidTypeAnnotation", node, opts); -} - -function assertEnumDeclaration(node, opts = {}) { - assert("EnumDeclaration", node, opts); -} - -function assertEnumBooleanBody(node, opts = {}) { - assert("EnumBooleanBody", node, opts); -} - -function assertEnumNumberBody(node, opts = {}) { - assert("EnumNumberBody", node, opts); -} - -function assertEnumStringBody(node, opts = {}) { - assert("EnumStringBody", node, opts); -} - -function assertEnumSymbolBody(node, opts = {}) { - assert("EnumSymbolBody", node, opts); -} - -function assertEnumBooleanMember(node, opts = {}) { - assert("EnumBooleanMember", node, opts); -} - -function assertEnumNumberMember(node, opts = {}) { - assert("EnumNumberMember", node, opts); -} - -function assertEnumStringMember(node, opts = {}) { - assert("EnumStringMember", node, opts); -} - -function assertEnumDefaultedMember(node, opts = {}) { - assert("EnumDefaultedMember", node, opts); -} - -function assertJSXAttribute(node, opts = {}) { - assert("JSXAttribute", node, opts); -} - -function assertJSXClosingElement(node, opts = {}) { - assert("JSXClosingElement", node, opts); -} - -function assertJSXElement(node, opts = {}) { - assert("JSXElement", node, opts); -} - -function assertJSXEmptyExpression(node, opts = {}) { - assert("JSXEmptyExpression", node, opts); -} - -function assertJSXExpressionContainer(node, opts = {}) { - assert("JSXExpressionContainer", node, opts); -} - -function assertJSXSpreadChild(node, opts = {}) { - assert("JSXSpreadChild", node, opts); -} - -function assertJSXIdentifier(node, opts = {}) { - assert("JSXIdentifier", node, opts); -} - -function assertJSXMemberExpression(node, opts = {}) { - assert("JSXMemberExpression", node, opts); -} - -function assertJSXNamespacedName(node, opts = {}) { - assert("JSXNamespacedName", node, opts); -} - -function assertJSXOpeningElement(node, opts = {}) { - assert("JSXOpeningElement", node, opts); -} - -function assertJSXSpreadAttribute(node, opts = {}) { - assert("JSXSpreadAttribute", node, opts); -} - -function assertJSXText(node, opts = {}) { - assert("JSXText", node, opts); -} - -function assertJSXFragment(node, opts = {}) { - assert("JSXFragment", node, opts); -} - -function assertJSXOpeningFragment(node, opts = {}) { - assert("JSXOpeningFragment", node, opts); -} - -function assertJSXClosingFragment(node, opts = {}) { - assert("JSXClosingFragment", node, opts); -} - -function assertNoop(node, opts = {}) { - assert("Noop", node, opts); -} - -function assertPlaceholder(node, opts = {}) { - assert("Placeholder", node, opts); -} - -function assertV8IntrinsicIdentifier(node, opts = {}) { - assert("V8IntrinsicIdentifier", node, opts); -} - -function assertArgumentPlaceholder(node, opts = {}) { - assert("ArgumentPlaceholder", node, opts); -} - -function assertAwaitExpression(node, opts = {}) { - assert("AwaitExpression", node, opts); -} - -function assertBindExpression(node, opts = {}) { - assert("BindExpression", node, opts); -} - -function assertClassProperty(node, opts = {}) { - assert("ClassProperty", node, opts); -} - -function assertOptionalMemberExpression(node, opts = {}) { - assert("OptionalMemberExpression", node, opts); -} - -function assertPipelineTopicExpression(node, opts = {}) { - assert("PipelineTopicExpression", node, opts); -} - -function assertPipelineBareFunction(node, opts = {}) { - assert("PipelineBareFunction", node, opts); -} - -function assertPipelinePrimaryTopicReference(node, opts = {}) { - assert("PipelinePrimaryTopicReference", node, opts); -} - -function assertOptionalCallExpression(node, opts = {}) { - assert("OptionalCallExpression", node, opts); -} - -function assertClassPrivateProperty(node, opts = {}) { - assert("ClassPrivateProperty", node, opts); -} - -function assertClassPrivateMethod(node, opts = {}) { - assert("ClassPrivateMethod", node, opts); -} - -function assertImport(node, opts = {}) { - assert("Import", node, opts); -} - -function assertDecorator(node, opts = {}) { - assert("Decorator", node, opts); -} - -function assertDoExpression(node, opts = {}) { - assert("DoExpression", node, opts); -} - -function assertExportDefaultSpecifier(node, opts = {}) { - assert("ExportDefaultSpecifier", node, opts); -} - -function assertExportNamespaceSpecifier(node, opts = {}) { - assert("ExportNamespaceSpecifier", node, opts); -} - -function assertPrivateName(node, opts = {}) { - assert("PrivateName", node, opts); -} - -function assertBigIntLiteral(node, opts = {}) { - assert("BigIntLiteral", node, opts); -} - -function assertRecordExpression(node, opts = {}) { - assert("RecordExpression", node, opts); -} - -function assertTupleExpression(node, opts = {}) { - assert("TupleExpression", node, opts); -} - -function assertTSParameterProperty(node, opts = {}) { - assert("TSParameterProperty", node, opts); -} - -function assertTSDeclareFunction(node, opts = {}) { - assert("TSDeclareFunction", node, opts); -} - -function assertTSDeclareMethod(node, opts = {}) { - assert("TSDeclareMethod", node, opts); -} - -function assertTSQualifiedName(node, opts = {}) { - assert("TSQualifiedName", node, opts); -} - -function assertTSCallSignatureDeclaration(node, opts = {}) { - assert("TSCallSignatureDeclaration", node, opts); -} - -function assertTSConstructSignatureDeclaration(node, opts = {}) { - assert("TSConstructSignatureDeclaration", node, opts); -} - -function assertTSPropertySignature(node, opts = {}) { - assert("TSPropertySignature", node, opts); -} - -function assertTSMethodSignature(node, opts = {}) { - assert("TSMethodSignature", node, opts); -} - -function assertTSIndexSignature(node, opts = {}) { - assert("TSIndexSignature", node, opts); -} - -function assertTSAnyKeyword(node, opts = {}) { - assert("TSAnyKeyword", node, opts); -} - -function assertTSBooleanKeyword(node, opts = {}) { - assert("TSBooleanKeyword", node, opts); -} - -function assertTSBigIntKeyword(node, opts = {}) { - assert("TSBigIntKeyword", node, opts); -} - -function assertTSNeverKeyword(node, opts = {}) { - assert("TSNeverKeyword", node, opts); -} - -function assertTSNullKeyword(node, opts = {}) { - assert("TSNullKeyword", node, opts); -} - -function assertTSNumberKeyword(node, opts = {}) { - assert("TSNumberKeyword", node, opts); -} - -function assertTSObjectKeyword(node, opts = {}) { - assert("TSObjectKeyword", node, opts); -} - -function assertTSStringKeyword(node, opts = {}) { - assert("TSStringKeyword", node, opts); -} - -function assertTSSymbolKeyword(node, opts = {}) { - assert("TSSymbolKeyword", node, opts); -} - -function assertTSUndefinedKeyword(node, opts = {}) { - assert("TSUndefinedKeyword", node, opts); -} - -function assertTSUnknownKeyword(node, opts = {}) { - assert("TSUnknownKeyword", node, opts); -} - -function assertTSVoidKeyword(node, opts = {}) { - assert("TSVoidKeyword", node, opts); -} - -function assertTSThisType(node, opts = {}) { - assert("TSThisType", node, opts); -} - -function assertTSFunctionType(node, opts = {}) { - assert("TSFunctionType", node, opts); -} - -function assertTSConstructorType(node, opts = {}) { - assert("TSConstructorType", node, opts); -} - -function assertTSTypeReference(node, opts = {}) { - assert("TSTypeReference", node, opts); -} - -function assertTSTypePredicate(node, opts = {}) { - assert("TSTypePredicate", node, opts); -} - -function assertTSTypeQuery(node, opts = {}) { - assert("TSTypeQuery", node, opts); -} - -function assertTSTypeLiteral(node, opts = {}) { - assert("TSTypeLiteral", node, opts); -} - -function assertTSArrayType(node, opts = {}) { - assert("TSArrayType", node, opts); -} - -function assertTSTupleType(node, opts = {}) { - assert("TSTupleType", node, opts); -} - -function assertTSOptionalType(node, opts = {}) { - assert("TSOptionalType", node, opts); -} - -function assertTSRestType(node, opts = {}) { - assert("TSRestType", node, opts); -} - -function assertTSUnionType(node, opts = {}) { - assert("TSUnionType", node, opts); -} - -function assertTSIntersectionType(node, opts = {}) { - assert("TSIntersectionType", node, opts); -} - -function assertTSConditionalType(node, opts = {}) { - assert("TSConditionalType", node, opts); -} - -function assertTSInferType(node, opts = {}) { - assert("TSInferType", node, opts); -} - -function assertTSParenthesizedType(node, opts = {}) { - assert("TSParenthesizedType", node, opts); -} - -function assertTSTypeOperator(node, opts = {}) { - assert("TSTypeOperator", node, opts); -} - -function assertTSIndexedAccessType(node, opts = {}) { - assert("TSIndexedAccessType", node, opts); -} - -function assertTSMappedType(node, opts = {}) { - assert("TSMappedType", node, opts); -} - -function assertTSLiteralType(node, opts = {}) { - assert("TSLiteralType", node, opts); -} - -function assertTSExpressionWithTypeArguments(node, opts = {}) { - assert("TSExpressionWithTypeArguments", node, opts); -} - -function assertTSInterfaceDeclaration(node, opts = {}) { - assert("TSInterfaceDeclaration", node, opts); -} - -function assertTSInterfaceBody(node, opts = {}) { - assert("TSInterfaceBody", node, opts); -} - -function assertTSTypeAliasDeclaration(node, opts = {}) { - assert("TSTypeAliasDeclaration", node, opts); -} - -function assertTSAsExpression(node, opts = {}) { - assert("TSAsExpression", node, opts); -} - -function assertTSTypeAssertion(node, opts = {}) { - assert("TSTypeAssertion", node, opts); -} - -function assertTSEnumDeclaration(node, opts = {}) { - assert("TSEnumDeclaration", node, opts); -} - -function assertTSEnumMember(node, opts = {}) { - assert("TSEnumMember", node, opts); -} - -function assertTSModuleDeclaration(node, opts = {}) { - assert("TSModuleDeclaration", node, opts); -} - -function assertTSModuleBlock(node, opts = {}) { - assert("TSModuleBlock", node, opts); -} - -function assertTSImportType(node, opts = {}) { - assert("TSImportType", node, opts); -} - -function assertTSImportEqualsDeclaration(node, opts = {}) { - assert("TSImportEqualsDeclaration", node, opts); -} - -function assertTSExternalModuleReference(node, opts = {}) { - assert("TSExternalModuleReference", node, opts); -} - -function assertTSNonNullExpression(node, opts = {}) { - assert("TSNonNullExpression", node, opts); -} - -function assertTSExportAssignment(node, opts = {}) { - assert("TSExportAssignment", node, opts); -} - -function assertTSNamespaceExportDeclaration(node, opts = {}) { - assert("TSNamespaceExportDeclaration", node, opts); -} - -function assertTSTypeAnnotation(node, opts = {}) { - assert("TSTypeAnnotation", node, opts); -} - -function assertTSTypeParameterInstantiation(node, opts = {}) { - assert("TSTypeParameterInstantiation", node, opts); -} - -function assertTSTypeParameterDeclaration(node, opts = {}) { - assert("TSTypeParameterDeclaration", node, opts); -} - -function assertTSTypeParameter(node, opts = {}) { - assert("TSTypeParameter", node, opts); -} - -function assertExpression(node, opts = {}) { - assert("Expression", node, opts); -} - -function assertBinary(node, opts = {}) { - assert("Binary", node, opts); -} - -function assertScopable(node, opts = {}) { - assert("Scopable", node, opts); -} - -function assertBlockParent(node, opts = {}) { - assert("BlockParent", node, opts); -} - -function assertBlock(node, opts = {}) { - assert("Block", node, opts); -} - -function assertStatement(node, opts = {}) { - assert("Statement", node, opts); -} - -function assertTerminatorless(node, opts = {}) { - assert("Terminatorless", node, opts); -} - -function assertCompletionStatement(node, opts = {}) { - assert("CompletionStatement", node, opts); -} - -function assertConditional(node, opts = {}) { - assert("Conditional", node, opts); -} - -function assertLoop(node, opts = {}) { - assert("Loop", node, opts); -} - -function assertWhile(node, opts = {}) { - assert("While", node, opts); -} - -function assertExpressionWrapper(node, opts = {}) { - assert("ExpressionWrapper", node, opts); -} - -function assertFor(node, opts = {}) { - assert("For", node, opts); -} - -function assertForXStatement(node, opts = {}) { - assert("ForXStatement", node, opts); -} - -function assertFunction(node, opts = {}) { - assert("Function", node, opts); -} - -function assertFunctionParent(node, opts = {}) { - assert("FunctionParent", node, opts); -} - -function assertPureish(node, opts = {}) { - assert("Pureish", node, opts); -} - -function assertDeclaration(node, opts = {}) { - assert("Declaration", node, opts); -} - -function assertPatternLike(node, opts = {}) { - assert("PatternLike", node, opts); -} - -function assertLVal(node, opts = {}) { - assert("LVal", node, opts); -} - -function assertTSEntityName(node, opts = {}) { - assert("TSEntityName", node, opts); -} - -function assertLiteral(node, opts = {}) { - assert("Literal", node, opts); -} - -function assertImmutable(node, opts = {}) { - assert("Immutable", node, opts); -} - -function assertUserWhitespacable(node, opts = {}) { - assert("UserWhitespacable", node, opts); -} - -function assertMethod(node, opts = {}) { - assert("Method", node, opts); -} - -function assertObjectMember(node, opts = {}) { - assert("ObjectMember", node, opts); -} - -function assertProperty(node, opts = {}) { - assert("Property", node, opts); -} - -function assertUnaryLike(node, opts = {}) { - assert("UnaryLike", node, opts); -} - -function assertPattern(node, opts = {}) { - assert("Pattern", node, opts); -} - -function assertClass(node, opts = {}) { - assert("Class", node, opts); -} - -function assertModuleDeclaration(node, opts = {}) { - assert("ModuleDeclaration", node, opts); -} - -function assertExportDeclaration(node, opts = {}) { - assert("ExportDeclaration", node, opts); -} - -function assertModuleSpecifier(node, opts = {}) { - assert("ModuleSpecifier", node, opts); -} - -function assertFlow(node, opts = {}) { - assert("Flow", node, opts); -} - -function assertFlowType(node, opts = {}) { - assert("FlowType", node, opts); -} - -function assertFlowBaseAnnotation(node, opts = {}) { - assert("FlowBaseAnnotation", node, opts); -} - -function assertFlowDeclaration(node, opts = {}) { - assert("FlowDeclaration", node, opts); -} - -function assertFlowPredicate(node, opts = {}) { - assert("FlowPredicate", node, opts); -} - -function assertEnumBody(node, opts = {}) { - assert("EnumBody", node, opts); -} - -function assertEnumMember(node, opts = {}) { - assert("EnumMember", node, opts); -} - -function assertJSX(node, opts = {}) { - assert("JSX", node, opts); -} - -function assertPrivate(node, opts = {}) { - assert("Private", node, opts); -} - -function assertTSTypeElement(node, opts = {}) { - assert("TSTypeElement", node, opts); -} - -function assertTSType(node, opts = {}) { - assert("TSType", node, opts); -} - -function assertNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - assert("NumberLiteral", node, opts); -} - -function assertRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - assert("RegexLiteral", node, opts); -} - -function assertRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - assert("RestProperty", node, opts); -} - -function assertSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - assert("SpreadProperty", node, opts); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/builder.js b/packages/common/node_modules/@babel/types/lib/builders/builder.js deleted file mode 100644 index 812cc17933..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/builder.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = builder; - -var _clone = _interopRequireDefault(require("lodash/clone")); - -var _definitions = require("../definitions"); - -var _validate = _interopRequireDefault(require("../validators/validate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function builder(type, ...args) { - const keys = _definitions.BUILDER_KEYS[type]; - const countArgs = args.length; - - if (countArgs > keys.length) { - throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`); - } - - const node = { - type - }; - let i = 0; - keys.forEach(key => { - const field = _definitions.NODE_FIELDS[type][key]; - let arg; - if (i < countArgs) arg = args[i]; - if (arg === undefined) arg = (0, _clone.default)(field.default); - node[key] = arg; - i++; - }); - - for (const key of Object.keys(node)) { - (0, _validate.default)(node, key, node[key]); - } - - return node; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js deleted file mode 100644 index 4724335f2a..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createTypeAnnotationBasedOnTypeof; - -var _generated = require("../generated"); - -function createTypeAnnotationBasedOnTypeof(type) { - if (type === "string") { - return (0, _generated.stringTypeAnnotation)(); - } else if (type === "number") { - return (0, _generated.numberTypeAnnotation)(); - } else if (type === "undefined") { - return (0, _generated.voidTypeAnnotation)(); - } else if (type === "boolean") { - return (0, _generated.booleanTypeAnnotation)(); - } else if (type === "function") { - return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function")); - } else if (type === "object") { - return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object")); - } else if (type === "symbol") { - return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol")); - } else { - throw new Error("Invalid typeof value"); - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js b/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js deleted file mode 100644 index df76b0107f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/flow/createUnionTypeAnnotation.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = createUnionTypeAnnotation; - -var _generated = require("../generated"); - -var _removeTypeDuplicates = _interopRequireDefault(require("../../modifications/flow/removeTypeDuplicates")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function createUnionTypeAnnotation(types) { - const flattened = (0, _removeTypeDuplicates.default)(types); - - if (flattened.length === 1) { - return flattened[0]; - } else { - return (0, _generated.unionTypeAnnotation)(flattened); - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/generated/index.js b/packages/common/node_modules/@babel/types/lib/builders/generated/index.js deleted file mode 100644 index 917d77a3b9..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/generated/index.js +++ /dev/null @@ -1,1218 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.arrayExpression = exports.ArrayExpression = ArrayExpression; -exports.assignmentExpression = exports.AssignmentExpression = AssignmentExpression; -exports.binaryExpression = exports.BinaryExpression = BinaryExpression; -exports.interpreterDirective = exports.InterpreterDirective = InterpreterDirective; -exports.directive = exports.Directive = Directive; -exports.directiveLiteral = exports.DirectiveLiteral = DirectiveLiteral; -exports.blockStatement = exports.BlockStatement = BlockStatement; -exports.breakStatement = exports.BreakStatement = BreakStatement; -exports.callExpression = exports.CallExpression = CallExpression; -exports.catchClause = exports.CatchClause = CatchClause; -exports.conditionalExpression = exports.ConditionalExpression = ConditionalExpression; -exports.continueStatement = exports.ContinueStatement = ContinueStatement; -exports.debuggerStatement = exports.DebuggerStatement = DebuggerStatement; -exports.doWhileStatement = exports.DoWhileStatement = DoWhileStatement; -exports.emptyStatement = exports.EmptyStatement = EmptyStatement; -exports.expressionStatement = exports.ExpressionStatement = ExpressionStatement; -exports.file = exports.File = File; -exports.forInStatement = exports.ForInStatement = ForInStatement; -exports.forStatement = exports.ForStatement = ForStatement; -exports.functionDeclaration = exports.FunctionDeclaration = FunctionDeclaration; -exports.functionExpression = exports.FunctionExpression = FunctionExpression; -exports.identifier = exports.Identifier = Identifier; -exports.ifStatement = exports.IfStatement = IfStatement; -exports.labeledStatement = exports.LabeledStatement = LabeledStatement; -exports.stringLiteral = exports.StringLiteral = StringLiteral; -exports.numericLiteral = exports.NumericLiteral = NumericLiteral; -exports.nullLiteral = exports.NullLiteral = NullLiteral; -exports.booleanLiteral = exports.BooleanLiteral = BooleanLiteral; -exports.regExpLiteral = exports.RegExpLiteral = RegExpLiteral; -exports.logicalExpression = exports.LogicalExpression = LogicalExpression; -exports.memberExpression = exports.MemberExpression = MemberExpression; -exports.newExpression = exports.NewExpression = NewExpression; -exports.program = exports.Program = Program; -exports.objectExpression = exports.ObjectExpression = ObjectExpression; -exports.objectMethod = exports.ObjectMethod = ObjectMethod; -exports.objectProperty = exports.ObjectProperty = ObjectProperty; -exports.restElement = exports.RestElement = RestElement; -exports.returnStatement = exports.ReturnStatement = ReturnStatement; -exports.sequenceExpression = exports.SequenceExpression = SequenceExpression; -exports.parenthesizedExpression = exports.ParenthesizedExpression = ParenthesizedExpression; -exports.switchCase = exports.SwitchCase = SwitchCase; -exports.switchStatement = exports.SwitchStatement = SwitchStatement; -exports.thisExpression = exports.ThisExpression = ThisExpression; -exports.throwStatement = exports.ThrowStatement = ThrowStatement; -exports.tryStatement = exports.TryStatement = TryStatement; -exports.unaryExpression = exports.UnaryExpression = UnaryExpression; -exports.updateExpression = exports.UpdateExpression = UpdateExpression; -exports.variableDeclaration = exports.VariableDeclaration = VariableDeclaration; -exports.variableDeclarator = exports.VariableDeclarator = VariableDeclarator; -exports.whileStatement = exports.WhileStatement = WhileStatement; -exports.withStatement = exports.WithStatement = WithStatement; -exports.assignmentPattern = exports.AssignmentPattern = AssignmentPattern; -exports.arrayPattern = exports.ArrayPattern = ArrayPattern; -exports.arrowFunctionExpression = exports.ArrowFunctionExpression = ArrowFunctionExpression; -exports.classBody = exports.ClassBody = ClassBody; -exports.classExpression = exports.ClassExpression = ClassExpression; -exports.classDeclaration = exports.ClassDeclaration = ClassDeclaration; -exports.exportAllDeclaration = exports.ExportAllDeclaration = ExportAllDeclaration; -exports.exportDefaultDeclaration = exports.ExportDefaultDeclaration = ExportDefaultDeclaration; -exports.exportNamedDeclaration = exports.ExportNamedDeclaration = ExportNamedDeclaration; -exports.exportSpecifier = exports.ExportSpecifier = ExportSpecifier; -exports.forOfStatement = exports.ForOfStatement = ForOfStatement; -exports.importDeclaration = exports.ImportDeclaration = ImportDeclaration; -exports.importDefaultSpecifier = exports.ImportDefaultSpecifier = ImportDefaultSpecifier; -exports.importNamespaceSpecifier = exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier; -exports.importSpecifier = exports.ImportSpecifier = ImportSpecifier; -exports.metaProperty = exports.MetaProperty = MetaProperty; -exports.classMethod = exports.ClassMethod = ClassMethod; -exports.objectPattern = exports.ObjectPattern = ObjectPattern; -exports.spreadElement = exports.SpreadElement = SpreadElement; -exports.super = exports.Super = Super; -exports.taggedTemplateExpression = exports.TaggedTemplateExpression = TaggedTemplateExpression; -exports.templateElement = exports.TemplateElement = TemplateElement; -exports.templateLiteral = exports.TemplateLiteral = TemplateLiteral; -exports.yieldExpression = exports.YieldExpression = YieldExpression; -exports.anyTypeAnnotation = exports.AnyTypeAnnotation = AnyTypeAnnotation; -exports.arrayTypeAnnotation = exports.ArrayTypeAnnotation = ArrayTypeAnnotation; -exports.booleanTypeAnnotation = exports.BooleanTypeAnnotation = BooleanTypeAnnotation; -exports.booleanLiteralTypeAnnotation = exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation; -exports.nullLiteralTypeAnnotation = exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation; -exports.classImplements = exports.ClassImplements = ClassImplements; -exports.declareClass = exports.DeclareClass = DeclareClass; -exports.declareFunction = exports.DeclareFunction = DeclareFunction; -exports.declareInterface = exports.DeclareInterface = DeclareInterface; -exports.declareModule = exports.DeclareModule = DeclareModule; -exports.declareModuleExports = exports.DeclareModuleExports = DeclareModuleExports; -exports.declareTypeAlias = exports.DeclareTypeAlias = DeclareTypeAlias; -exports.declareOpaqueType = exports.DeclareOpaqueType = DeclareOpaqueType; -exports.declareVariable = exports.DeclareVariable = DeclareVariable; -exports.declareExportDeclaration = exports.DeclareExportDeclaration = DeclareExportDeclaration; -exports.declareExportAllDeclaration = exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration; -exports.declaredPredicate = exports.DeclaredPredicate = DeclaredPredicate; -exports.existsTypeAnnotation = exports.ExistsTypeAnnotation = ExistsTypeAnnotation; -exports.functionTypeAnnotation = exports.FunctionTypeAnnotation = FunctionTypeAnnotation; -exports.functionTypeParam = exports.FunctionTypeParam = FunctionTypeParam; -exports.genericTypeAnnotation = exports.GenericTypeAnnotation = GenericTypeAnnotation; -exports.inferredPredicate = exports.InferredPredicate = InferredPredicate; -exports.interfaceExtends = exports.InterfaceExtends = InterfaceExtends; -exports.interfaceDeclaration = exports.InterfaceDeclaration = InterfaceDeclaration; -exports.interfaceTypeAnnotation = exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation; -exports.intersectionTypeAnnotation = exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation; -exports.mixedTypeAnnotation = exports.MixedTypeAnnotation = MixedTypeAnnotation; -exports.emptyTypeAnnotation = exports.EmptyTypeAnnotation = EmptyTypeAnnotation; -exports.nullableTypeAnnotation = exports.NullableTypeAnnotation = NullableTypeAnnotation; -exports.numberLiteralTypeAnnotation = exports.NumberLiteralTypeAnnotation = NumberLiteralTypeAnnotation; -exports.numberTypeAnnotation = exports.NumberTypeAnnotation = NumberTypeAnnotation; -exports.objectTypeAnnotation = exports.ObjectTypeAnnotation = ObjectTypeAnnotation; -exports.objectTypeInternalSlot = exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot; -exports.objectTypeCallProperty = exports.ObjectTypeCallProperty = ObjectTypeCallProperty; -exports.objectTypeIndexer = exports.ObjectTypeIndexer = ObjectTypeIndexer; -exports.objectTypeProperty = exports.ObjectTypeProperty = ObjectTypeProperty; -exports.objectTypeSpreadProperty = exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty; -exports.opaqueType = exports.OpaqueType = OpaqueType; -exports.qualifiedTypeIdentifier = exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier; -exports.stringLiteralTypeAnnotation = exports.StringLiteralTypeAnnotation = StringLiteralTypeAnnotation; -exports.stringTypeAnnotation = exports.StringTypeAnnotation = StringTypeAnnotation; -exports.symbolTypeAnnotation = exports.SymbolTypeAnnotation = SymbolTypeAnnotation; -exports.thisTypeAnnotation = exports.ThisTypeAnnotation = ThisTypeAnnotation; -exports.tupleTypeAnnotation = exports.TupleTypeAnnotation = TupleTypeAnnotation; -exports.typeofTypeAnnotation = exports.TypeofTypeAnnotation = TypeofTypeAnnotation; -exports.typeAlias = exports.TypeAlias = TypeAlias; -exports.typeAnnotation = exports.TypeAnnotation = TypeAnnotation; -exports.typeCastExpression = exports.TypeCastExpression = TypeCastExpression; -exports.typeParameter = exports.TypeParameter = TypeParameter; -exports.typeParameterDeclaration = exports.TypeParameterDeclaration = TypeParameterDeclaration; -exports.typeParameterInstantiation = exports.TypeParameterInstantiation = TypeParameterInstantiation; -exports.unionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation; -exports.variance = exports.Variance = Variance; -exports.voidTypeAnnotation = exports.VoidTypeAnnotation = VoidTypeAnnotation; -exports.enumDeclaration = exports.EnumDeclaration = EnumDeclaration; -exports.enumBooleanBody = exports.EnumBooleanBody = EnumBooleanBody; -exports.enumNumberBody = exports.EnumNumberBody = EnumNumberBody; -exports.enumStringBody = exports.EnumStringBody = EnumStringBody; -exports.enumSymbolBody = exports.EnumSymbolBody = EnumSymbolBody; -exports.enumBooleanMember = exports.EnumBooleanMember = EnumBooleanMember; -exports.enumNumberMember = exports.EnumNumberMember = EnumNumberMember; -exports.enumStringMember = exports.EnumStringMember = EnumStringMember; -exports.enumDefaultedMember = exports.EnumDefaultedMember = EnumDefaultedMember; -exports.jSXAttribute = exports.jsxAttribute = exports.JSXAttribute = JSXAttribute; -exports.jSXClosingElement = exports.jsxClosingElement = exports.JSXClosingElement = JSXClosingElement; -exports.jSXElement = exports.jsxElement = exports.JSXElement = JSXElement; -exports.jSXEmptyExpression = exports.jsxEmptyExpression = exports.JSXEmptyExpression = JSXEmptyExpression; -exports.jSXExpressionContainer = exports.jsxExpressionContainer = exports.JSXExpressionContainer = JSXExpressionContainer; -exports.jSXSpreadChild = exports.jsxSpreadChild = exports.JSXSpreadChild = JSXSpreadChild; -exports.jSXIdentifier = exports.jsxIdentifier = exports.JSXIdentifier = JSXIdentifier; -exports.jSXMemberExpression = exports.jsxMemberExpression = exports.JSXMemberExpression = JSXMemberExpression; -exports.jSXNamespacedName = exports.jsxNamespacedName = exports.JSXNamespacedName = JSXNamespacedName; -exports.jSXOpeningElement = exports.jsxOpeningElement = exports.JSXOpeningElement = JSXOpeningElement; -exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = exports.JSXSpreadAttribute = JSXSpreadAttribute; -exports.jSXText = exports.jsxText = exports.JSXText = JSXText; -exports.jSXFragment = exports.jsxFragment = exports.JSXFragment = JSXFragment; -exports.jSXOpeningFragment = exports.jsxOpeningFragment = exports.JSXOpeningFragment = JSXOpeningFragment; -exports.jSXClosingFragment = exports.jsxClosingFragment = exports.JSXClosingFragment = JSXClosingFragment; -exports.noop = exports.Noop = Noop; -exports.placeholder = exports.Placeholder = Placeholder; -exports.v8IntrinsicIdentifier = exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier; -exports.argumentPlaceholder = exports.ArgumentPlaceholder = ArgumentPlaceholder; -exports.awaitExpression = exports.AwaitExpression = AwaitExpression; -exports.bindExpression = exports.BindExpression = BindExpression; -exports.classProperty = exports.ClassProperty = ClassProperty; -exports.optionalMemberExpression = exports.OptionalMemberExpression = OptionalMemberExpression; -exports.pipelineTopicExpression = exports.PipelineTopicExpression = PipelineTopicExpression; -exports.pipelineBareFunction = exports.PipelineBareFunction = PipelineBareFunction; -exports.pipelinePrimaryTopicReference = exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference; -exports.optionalCallExpression = exports.OptionalCallExpression = OptionalCallExpression; -exports.classPrivateProperty = exports.ClassPrivateProperty = ClassPrivateProperty; -exports.classPrivateMethod = exports.ClassPrivateMethod = ClassPrivateMethod; -exports.import = exports.Import = Import; -exports.decorator = exports.Decorator = Decorator; -exports.doExpression = exports.DoExpression = DoExpression; -exports.exportDefaultSpecifier = exports.ExportDefaultSpecifier = ExportDefaultSpecifier; -exports.exportNamespaceSpecifier = exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier; -exports.privateName = exports.PrivateName = PrivateName; -exports.bigIntLiteral = exports.BigIntLiteral = BigIntLiteral; -exports.recordExpression = exports.RecordExpression = RecordExpression; -exports.tupleExpression = exports.TupleExpression = TupleExpression; -exports.tSParameterProperty = exports.tsParameterProperty = exports.TSParameterProperty = TSParameterProperty; -exports.tSDeclareFunction = exports.tsDeclareFunction = exports.TSDeclareFunction = TSDeclareFunction; -exports.tSDeclareMethod = exports.tsDeclareMethod = exports.TSDeclareMethod = TSDeclareMethod; -exports.tSQualifiedName = exports.tsQualifiedName = exports.TSQualifiedName = TSQualifiedName; -exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration; -exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration; -exports.tSPropertySignature = exports.tsPropertySignature = exports.TSPropertySignature = TSPropertySignature; -exports.tSMethodSignature = exports.tsMethodSignature = exports.TSMethodSignature = TSMethodSignature; -exports.tSIndexSignature = exports.tsIndexSignature = exports.TSIndexSignature = TSIndexSignature; -exports.tSAnyKeyword = exports.tsAnyKeyword = exports.TSAnyKeyword = TSAnyKeyword; -exports.tSBooleanKeyword = exports.tsBooleanKeyword = exports.TSBooleanKeyword = TSBooleanKeyword; -exports.tSBigIntKeyword = exports.tsBigIntKeyword = exports.TSBigIntKeyword = TSBigIntKeyword; -exports.tSNeverKeyword = exports.tsNeverKeyword = exports.TSNeverKeyword = TSNeverKeyword; -exports.tSNullKeyword = exports.tsNullKeyword = exports.TSNullKeyword = TSNullKeyword; -exports.tSNumberKeyword = exports.tsNumberKeyword = exports.TSNumberKeyword = TSNumberKeyword; -exports.tSObjectKeyword = exports.tsObjectKeyword = exports.TSObjectKeyword = TSObjectKeyword; -exports.tSStringKeyword = exports.tsStringKeyword = exports.TSStringKeyword = TSStringKeyword; -exports.tSSymbolKeyword = exports.tsSymbolKeyword = exports.TSSymbolKeyword = TSSymbolKeyword; -exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = exports.TSUndefinedKeyword = TSUndefinedKeyword; -exports.tSUnknownKeyword = exports.tsUnknownKeyword = exports.TSUnknownKeyword = TSUnknownKeyword; -exports.tSVoidKeyword = exports.tsVoidKeyword = exports.TSVoidKeyword = TSVoidKeyword; -exports.tSThisType = exports.tsThisType = exports.TSThisType = TSThisType; -exports.tSFunctionType = exports.tsFunctionType = exports.TSFunctionType = TSFunctionType; -exports.tSConstructorType = exports.tsConstructorType = exports.TSConstructorType = TSConstructorType; -exports.tSTypeReference = exports.tsTypeReference = exports.TSTypeReference = TSTypeReference; -exports.tSTypePredicate = exports.tsTypePredicate = exports.TSTypePredicate = TSTypePredicate; -exports.tSTypeQuery = exports.tsTypeQuery = exports.TSTypeQuery = TSTypeQuery; -exports.tSTypeLiteral = exports.tsTypeLiteral = exports.TSTypeLiteral = TSTypeLiteral; -exports.tSArrayType = exports.tsArrayType = exports.TSArrayType = TSArrayType; -exports.tSTupleType = exports.tsTupleType = exports.TSTupleType = TSTupleType; -exports.tSOptionalType = exports.tsOptionalType = exports.TSOptionalType = TSOptionalType; -exports.tSRestType = exports.tsRestType = exports.TSRestType = TSRestType; -exports.tSUnionType = exports.tsUnionType = exports.TSUnionType = TSUnionType; -exports.tSIntersectionType = exports.tsIntersectionType = exports.TSIntersectionType = TSIntersectionType; -exports.tSConditionalType = exports.tsConditionalType = exports.TSConditionalType = TSConditionalType; -exports.tSInferType = exports.tsInferType = exports.TSInferType = TSInferType; -exports.tSParenthesizedType = exports.tsParenthesizedType = exports.TSParenthesizedType = TSParenthesizedType; -exports.tSTypeOperator = exports.tsTypeOperator = exports.TSTypeOperator = TSTypeOperator; -exports.tSIndexedAccessType = exports.tsIndexedAccessType = exports.TSIndexedAccessType = TSIndexedAccessType; -exports.tSMappedType = exports.tsMappedType = exports.TSMappedType = TSMappedType; -exports.tSLiteralType = exports.tsLiteralType = exports.TSLiteralType = TSLiteralType; -exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments; -exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = exports.TSInterfaceDeclaration = TSInterfaceDeclaration; -exports.tSInterfaceBody = exports.tsInterfaceBody = exports.TSInterfaceBody = TSInterfaceBody; -exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration; -exports.tSAsExpression = exports.tsAsExpression = exports.TSAsExpression = TSAsExpression; -exports.tSTypeAssertion = exports.tsTypeAssertion = exports.TSTypeAssertion = TSTypeAssertion; -exports.tSEnumDeclaration = exports.tsEnumDeclaration = exports.TSEnumDeclaration = TSEnumDeclaration; -exports.tSEnumMember = exports.tsEnumMember = exports.TSEnumMember = TSEnumMember; -exports.tSModuleDeclaration = exports.tsModuleDeclaration = exports.TSModuleDeclaration = TSModuleDeclaration; -exports.tSModuleBlock = exports.tsModuleBlock = exports.TSModuleBlock = TSModuleBlock; -exports.tSImportType = exports.tsImportType = exports.TSImportType = TSImportType; -exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration; -exports.tSExternalModuleReference = exports.tsExternalModuleReference = exports.TSExternalModuleReference = TSExternalModuleReference; -exports.tSNonNullExpression = exports.tsNonNullExpression = exports.TSNonNullExpression = TSNonNullExpression; -exports.tSExportAssignment = exports.tsExportAssignment = exports.TSExportAssignment = TSExportAssignment; -exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration; -exports.tSTypeAnnotation = exports.tsTypeAnnotation = exports.TSTypeAnnotation = TSTypeAnnotation; -exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation; -exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = exports.TSTypeParameterDeclaration = TSTypeParameterDeclaration; -exports.tSTypeParameter = exports.tsTypeParameter = exports.TSTypeParameter = TSTypeParameter; -exports.numberLiteral = exports.NumberLiteral = NumberLiteral; -exports.regexLiteral = exports.RegexLiteral = RegexLiteral; -exports.restProperty = exports.RestProperty = RestProperty; -exports.spreadProperty = exports.SpreadProperty = SpreadProperty; - -var _builder = _interopRequireDefault(require("../builder")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ArrayExpression(...args) { - return (0, _builder.default)("ArrayExpression", ...args); -} - -function AssignmentExpression(...args) { - return (0, _builder.default)("AssignmentExpression", ...args); -} - -function BinaryExpression(...args) { - return (0, _builder.default)("BinaryExpression", ...args); -} - -function InterpreterDirective(...args) { - return (0, _builder.default)("InterpreterDirective", ...args); -} - -function Directive(...args) { - return (0, _builder.default)("Directive", ...args); -} - -function DirectiveLiteral(...args) { - return (0, _builder.default)("DirectiveLiteral", ...args); -} - -function BlockStatement(...args) { - return (0, _builder.default)("BlockStatement", ...args); -} - -function BreakStatement(...args) { - return (0, _builder.default)("BreakStatement", ...args); -} - -function CallExpression(...args) { - return (0, _builder.default)("CallExpression", ...args); -} - -function CatchClause(...args) { - return (0, _builder.default)("CatchClause", ...args); -} - -function ConditionalExpression(...args) { - return (0, _builder.default)("ConditionalExpression", ...args); -} - -function ContinueStatement(...args) { - return (0, _builder.default)("ContinueStatement", ...args); -} - -function DebuggerStatement(...args) { - return (0, _builder.default)("DebuggerStatement", ...args); -} - -function DoWhileStatement(...args) { - return (0, _builder.default)("DoWhileStatement", ...args); -} - -function EmptyStatement(...args) { - return (0, _builder.default)("EmptyStatement", ...args); -} - -function ExpressionStatement(...args) { - return (0, _builder.default)("ExpressionStatement", ...args); -} - -function File(...args) { - return (0, _builder.default)("File", ...args); -} - -function ForInStatement(...args) { - return (0, _builder.default)("ForInStatement", ...args); -} - -function ForStatement(...args) { - return (0, _builder.default)("ForStatement", ...args); -} - -function FunctionDeclaration(...args) { - return (0, _builder.default)("FunctionDeclaration", ...args); -} - -function FunctionExpression(...args) { - return (0, _builder.default)("FunctionExpression", ...args); -} - -function Identifier(...args) { - return (0, _builder.default)("Identifier", ...args); -} - -function IfStatement(...args) { - return (0, _builder.default)("IfStatement", ...args); -} - -function LabeledStatement(...args) { - return (0, _builder.default)("LabeledStatement", ...args); -} - -function StringLiteral(...args) { - return (0, _builder.default)("StringLiteral", ...args); -} - -function NumericLiteral(...args) { - return (0, _builder.default)("NumericLiteral", ...args); -} - -function NullLiteral(...args) { - return (0, _builder.default)("NullLiteral", ...args); -} - -function BooleanLiteral(...args) { - return (0, _builder.default)("BooleanLiteral", ...args); -} - -function RegExpLiteral(...args) { - return (0, _builder.default)("RegExpLiteral", ...args); -} - -function LogicalExpression(...args) { - return (0, _builder.default)("LogicalExpression", ...args); -} - -function MemberExpression(...args) { - return (0, _builder.default)("MemberExpression", ...args); -} - -function NewExpression(...args) { - return (0, _builder.default)("NewExpression", ...args); -} - -function Program(...args) { - return (0, _builder.default)("Program", ...args); -} - -function ObjectExpression(...args) { - return (0, _builder.default)("ObjectExpression", ...args); -} - -function ObjectMethod(...args) { - return (0, _builder.default)("ObjectMethod", ...args); -} - -function ObjectProperty(...args) { - return (0, _builder.default)("ObjectProperty", ...args); -} - -function RestElement(...args) { - return (0, _builder.default)("RestElement", ...args); -} - -function ReturnStatement(...args) { - return (0, _builder.default)("ReturnStatement", ...args); -} - -function SequenceExpression(...args) { - return (0, _builder.default)("SequenceExpression", ...args); -} - -function ParenthesizedExpression(...args) { - return (0, _builder.default)("ParenthesizedExpression", ...args); -} - -function SwitchCase(...args) { - return (0, _builder.default)("SwitchCase", ...args); -} - -function SwitchStatement(...args) { - return (0, _builder.default)("SwitchStatement", ...args); -} - -function ThisExpression(...args) { - return (0, _builder.default)("ThisExpression", ...args); -} - -function ThrowStatement(...args) { - return (0, _builder.default)("ThrowStatement", ...args); -} - -function TryStatement(...args) { - return (0, _builder.default)("TryStatement", ...args); -} - -function UnaryExpression(...args) { - return (0, _builder.default)("UnaryExpression", ...args); -} - -function UpdateExpression(...args) { - return (0, _builder.default)("UpdateExpression", ...args); -} - -function VariableDeclaration(...args) { - return (0, _builder.default)("VariableDeclaration", ...args); -} - -function VariableDeclarator(...args) { - return (0, _builder.default)("VariableDeclarator", ...args); -} - -function WhileStatement(...args) { - return (0, _builder.default)("WhileStatement", ...args); -} - -function WithStatement(...args) { - return (0, _builder.default)("WithStatement", ...args); -} - -function AssignmentPattern(...args) { - return (0, _builder.default)("AssignmentPattern", ...args); -} - -function ArrayPattern(...args) { - return (0, _builder.default)("ArrayPattern", ...args); -} - -function ArrowFunctionExpression(...args) { - return (0, _builder.default)("ArrowFunctionExpression", ...args); -} - -function ClassBody(...args) { - return (0, _builder.default)("ClassBody", ...args); -} - -function ClassExpression(...args) { - return (0, _builder.default)("ClassExpression", ...args); -} - -function ClassDeclaration(...args) { - return (0, _builder.default)("ClassDeclaration", ...args); -} - -function ExportAllDeclaration(...args) { - return (0, _builder.default)("ExportAllDeclaration", ...args); -} - -function ExportDefaultDeclaration(...args) { - return (0, _builder.default)("ExportDefaultDeclaration", ...args); -} - -function ExportNamedDeclaration(...args) { - return (0, _builder.default)("ExportNamedDeclaration", ...args); -} - -function ExportSpecifier(...args) { - return (0, _builder.default)("ExportSpecifier", ...args); -} - -function ForOfStatement(...args) { - return (0, _builder.default)("ForOfStatement", ...args); -} - -function ImportDeclaration(...args) { - return (0, _builder.default)("ImportDeclaration", ...args); -} - -function ImportDefaultSpecifier(...args) { - return (0, _builder.default)("ImportDefaultSpecifier", ...args); -} - -function ImportNamespaceSpecifier(...args) { - return (0, _builder.default)("ImportNamespaceSpecifier", ...args); -} - -function ImportSpecifier(...args) { - return (0, _builder.default)("ImportSpecifier", ...args); -} - -function MetaProperty(...args) { - return (0, _builder.default)("MetaProperty", ...args); -} - -function ClassMethod(...args) { - return (0, _builder.default)("ClassMethod", ...args); -} - -function ObjectPattern(...args) { - return (0, _builder.default)("ObjectPattern", ...args); -} - -function SpreadElement(...args) { - return (0, _builder.default)("SpreadElement", ...args); -} - -function Super(...args) { - return (0, _builder.default)("Super", ...args); -} - -function TaggedTemplateExpression(...args) { - return (0, _builder.default)("TaggedTemplateExpression", ...args); -} - -function TemplateElement(...args) { - return (0, _builder.default)("TemplateElement", ...args); -} - -function TemplateLiteral(...args) { - return (0, _builder.default)("TemplateLiteral", ...args); -} - -function YieldExpression(...args) { - return (0, _builder.default)("YieldExpression", ...args); -} - -function AnyTypeAnnotation(...args) { - return (0, _builder.default)("AnyTypeAnnotation", ...args); -} - -function ArrayTypeAnnotation(...args) { - return (0, _builder.default)("ArrayTypeAnnotation", ...args); -} - -function BooleanTypeAnnotation(...args) { - return (0, _builder.default)("BooleanTypeAnnotation", ...args); -} - -function BooleanLiteralTypeAnnotation(...args) { - return (0, _builder.default)("BooleanLiteralTypeAnnotation", ...args); -} - -function NullLiteralTypeAnnotation(...args) { - return (0, _builder.default)("NullLiteralTypeAnnotation", ...args); -} - -function ClassImplements(...args) { - return (0, _builder.default)("ClassImplements", ...args); -} - -function DeclareClass(...args) { - return (0, _builder.default)("DeclareClass", ...args); -} - -function DeclareFunction(...args) { - return (0, _builder.default)("DeclareFunction", ...args); -} - -function DeclareInterface(...args) { - return (0, _builder.default)("DeclareInterface", ...args); -} - -function DeclareModule(...args) { - return (0, _builder.default)("DeclareModule", ...args); -} - -function DeclareModuleExports(...args) { - return (0, _builder.default)("DeclareModuleExports", ...args); -} - -function DeclareTypeAlias(...args) { - return (0, _builder.default)("DeclareTypeAlias", ...args); -} - -function DeclareOpaqueType(...args) { - return (0, _builder.default)("DeclareOpaqueType", ...args); -} - -function DeclareVariable(...args) { - return (0, _builder.default)("DeclareVariable", ...args); -} - -function DeclareExportDeclaration(...args) { - return (0, _builder.default)("DeclareExportDeclaration", ...args); -} - -function DeclareExportAllDeclaration(...args) { - return (0, _builder.default)("DeclareExportAllDeclaration", ...args); -} - -function DeclaredPredicate(...args) { - return (0, _builder.default)("DeclaredPredicate", ...args); -} - -function ExistsTypeAnnotation(...args) { - return (0, _builder.default)("ExistsTypeAnnotation", ...args); -} - -function FunctionTypeAnnotation(...args) { - return (0, _builder.default)("FunctionTypeAnnotation", ...args); -} - -function FunctionTypeParam(...args) { - return (0, _builder.default)("FunctionTypeParam", ...args); -} - -function GenericTypeAnnotation(...args) { - return (0, _builder.default)("GenericTypeAnnotation", ...args); -} - -function InferredPredicate(...args) { - return (0, _builder.default)("InferredPredicate", ...args); -} - -function InterfaceExtends(...args) { - return (0, _builder.default)("InterfaceExtends", ...args); -} - -function InterfaceDeclaration(...args) { - return (0, _builder.default)("InterfaceDeclaration", ...args); -} - -function InterfaceTypeAnnotation(...args) { - return (0, _builder.default)("InterfaceTypeAnnotation", ...args); -} - -function IntersectionTypeAnnotation(...args) { - return (0, _builder.default)("IntersectionTypeAnnotation", ...args); -} - -function MixedTypeAnnotation(...args) { - return (0, _builder.default)("MixedTypeAnnotation", ...args); -} - -function EmptyTypeAnnotation(...args) { - return (0, _builder.default)("EmptyTypeAnnotation", ...args); -} - -function NullableTypeAnnotation(...args) { - return (0, _builder.default)("NullableTypeAnnotation", ...args); -} - -function NumberLiteralTypeAnnotation(...args) { - return (0, _builder.default)("NumberLiteralTypeAnnotation", ...args); -} - -function NumberTypeAnnotation(...args) { - return (0, _builder.default)("NumberTypeAnnotation", ...args); -} - -function ObjectTypeAnnotation(...args) { - return (0, _builder.default)("ObjectTypeAnnotation", ...args); -} - -function ObjectTypeInternalSlot(...args) { - return (0, _builder.default)("ObjectTypeInternalSlot", ...args); -} - -function ObjectTypeCallProperty(...args) { - return (0, _builder.default)("ObjectTypeCallProperty", ...args); -} - -function ObjectTypeIndexer(...args) { - return (0, _builder.default)("ObjectTypeIndexer", ...args); -} - -function ObjectTypeProperty(...args) { - return (0, _builder.default)("ObjectTypeProperty", ...args); -} - -function ObjectTypeSpreadProperty(...args) { - return (0, _builder.default)("ObjectTypeSpreadProperty", ...args); -} - -function OpaqueType(...args) { - return (0, _builder.default)("OpaqueType", ...args); -} - -function QualifiedTypeIdentifier(...args) { - return (0, _builder.default)("QualifiedTypeIdentifier", ...args); -} - -function StringLiteralTypeAnnotation(...args) { - return (0, _builder.default)("StringLiteralTypeAnnotation", ...args); -} - -function StringTypeAnnotation(...args) { - return (0, _builder.default)("StringTypeAnnotation", ...args); -} - -function SymbolTypeAnnotation(...args) { - return (0, _builder.default)("SymbolTypeAnnotation", ...args); -} - -function ThisTypeAnnotation(...args) { - return (0, _builder.default)("ThisTypeAnnotation", ...args); -} - -function TupleTypeAnnotation(...args) { - return (0, _builder.default)("TupleTypeAnnotation", ...args); -} - -function TypeofTypeAnnotation(...args) { - return (0, _builder.default)("TypeofTypeAnnotation", ...args); -} - -function TypeAlias(...args) { - return (0, _builder.default)("TypeAlias", ...args); -} - -function TypeAnnotation(...args) { - return (0, _builder.default)("TypeAnnotation", ...args); -} - -function TypeCastExpression(...args) { - return (0, _builder.default)("TypeCastExpression", ...args); -} - -function TypeParameter(...args) { - return (0, _builder.default)("TypeParameter", ...args); -} - -function TypeParameterDeclaration(...args) { - return (0, _builder.default)("TypeParameterDeclaration", ...args); -} - -function TypeParameterInstantiation(...args) { - return (0, _builder.default)("TypeParameterInstantiation", ...args); -} - -function UnionTypeAnnotation(...args) { - return (0, _builder.default)("UnionTypeAnnotation", ...args); -} - -function Variance(...args) { - return (0, _builder.default)("Variance", ...args); -} - -function VoidTypeAnnotation(...args) { - return (0, _builder.default)("VoidTypeAnnotation", ...args); -} - -function EnumDeclaration(...args) { - return (0, _builder.default)("EnumDeclaration", ...args); -} - -function EnumBooleanBody(...args) { - return (0, _builder.default)("EnumBooleanBody", ...args); -} - -function EnumNumberBody(...args) { - return (0, _builder.default)("EnumNumberBody", ...args); -} - -function EnumStringBody(...args) { - return (0, _builder.default)("EnumStringBody", ...args); -} - -function EnumSymbolBody(...args) { - return (0, _builder.default)("EnumSymbolBody", ...args); -} - -function EnumBooleanMember(...args) { - return (0, _builder.default)("EnumBooleanMember", ...args); -} - -function EnumNumberMember(...args) { - return (0, _builder.default)("EnumNumberMember", ...args); -} - -function EnumStringMember(...args) { - return (0, _builder.default)("EnumStringMember", ...args); -} - -function EnumDefaultedMember(...args) { - return (0, _builder.default)("EnumDefaultedMember", ...args); -} - -function JSXAttribute(...args) { - return (0, _builder.default)("JSXAttribute", ...args); -} - -function JSXClosingElement(...args) { - return (0, _builder.default)("JSXClosingElement", ...args); -} - -function JSXElement(...args) { - return (0, _builder.default)("JSXElement", ...args); -} - -function JSXEmptyExpression(...args) { - return (0, _builder.default)("JSXEmptyExpression", ...args); -} - -function JSXExpressionContainer(...args) { - return (0, _builder.default)("JSXExpressionContainer", ...args); -} - -function JSXSpreadChild(...args) { - return (0, _builder.default)("JSXSpreadChild", ...args); -} - -function JSXIdentifier(...args) { - return (0, _builder.default)("JSXIdentifier", ...args); -} - -function JSXMemberExpression(...args) { - return (0, _builder.default)("JSXMemberExpression", ...args); -} - -function JSXNamespacedName(...args) { - return (0, _builder.default)("JSXNamespacedName", ...args); -} - -function JSXOpeningElement(...args) { - return (0, _builder.default)("JSXOpeningElement", ...args); -} - -function JSXSpreadAttribute(...args) { - return (0, _builder.default)("JSXSpreadAttribute", ...args); -} - -function JSXText(...args) { - return (0, _builder.default)("JSXText", ...args); -} - -function JSXFragment(...args) { - return (0, _builder.default)("JSXFragment", ...args); -} - -function JSXOpeningFragment(...args) { - return (0, _builder.default)("JSXOpeningFragment", ...args); -} - -function JSXClosingFragment(...args) { - return (0, _builder.default)("JSXClosingFragment", ...args); -} - -function Noop(...args) { - return (0, _builder.default)("Noop", ...args); -} - -function Placeholder(...args) { - return (0, _builder.default)("Placeholder", ...args); -} - -function V8IntrinsicIdentifier(...args) { - return (0, _builder.default)("V8IntrinsicIdentifier", ...args); -} - -function ArgumentPlaceholder(...args) { - return (0, _builder.default)("ArgumentPlaceholder", ...args); -} - -function AwaitExpression(...args) { - return (0, _builder.default)("AwaitExpression", ...args); -} - -function BindExpression(...args) { - return (0, _builder.default)("BindExpression", ...args); -} - -function ClassProperty(...args) { - return (0, _builder.default)("ClassProperty", ...args); -} - -function OptionalMemberExpression(...args) { - return (0, _builder.default)("OptionalMemberExpression", ...args); -} - -function PipelineTopicExpression(...args) { - return (0, _builder.default)("PipelineTopicExpression", ...args); -} - -function PipelineBareFunction(...args) { - return (0, _builder.default)("PipelineBareFunction", ...args); -} - -function PipelinePrimaryTopicReference(...args) { - return (0, _builder.default)("PipelinePrimaryTopicReference", ...args); -} - -function OptionalCallExpression(...args) { - return (0, _builder.default)("OptionalCallExpression", ...args); -} - -function ClassPrivateProperty(...args) { - return (0, _builder.default)("ClassPrivateProperty", ...args); -} - -function ClassPrivateMethod(...args) { - return (0, _builder.default)("ClassPrivateMethod", ...args); -} - -function Import(...args) { - return (0, _builder.default)("Import", ...args); -} - -function Decorator(...args) { - return (0, _builder.default)("Decorator", ...args); -} - -function DoExpression(...args) { - return (0, _builder.default)("DoExpression", ...args); -} - -function ExportDefaultSpecifier(...args) { - return (0, _builder.default)("ExportDefaultSpecifier", ...args); -} - -function ExportNamespaceSpecifier(...args) { - return (0, _builder.default)("ExportNamespaceSpecifier", ...args); -} - -function PrivateName(...args) { - return (0, _builder.default)("PrivateName", ...args); -} - -function BigIntLiteral(...args) { - return (0, _builder.default)("BigIntLiteral", ...args); -} - -function RecordExpression(...args) { - return (0, _builder.default)("RecordExpression", ...args); -} - -function TupleExpression(...args) { - return (0, _builder.default)("TupleExpression", ...args); -} - -function TSParameterProperty(...args) { - return (0, _builder.default)("TSParameterProperty", ...args); -} - -function TSDeclareFunction(...args) { - return (0, _builder.default)("TSDeclareFunction", ...args); -} - -function TSDeclareMethod(...args) { - return (0, _builder.default)("TSDeclareMethod", ...args); -} - -function TSQualifiedName(...args) { - return (0, _builder.default)("TSQualifiedName", ...args); -} - -function TSCallSignatureDeclaration(...args) { - return (0, _builder.default)("TSCallSignatureDeclaration", ...args); -} - -function TSConstructSignatureDeclaration(...args) { - return (0, _builder.default)("TSConstructSignatureDeclaration", ...args); -} - -function TSPropertySignature(...args) { - return (0, _builder.default)("TSPropertySignature", ...args); -} - -function TSMethodSignature(...args) { - return (0, _builder.default)("TSMethodSignature", ...args); -} - -function TSIndexSignature(...args) { - return (0, _builder.default)("TSIndexSignature", ...args); -} - -function TSAnyKeyword(...args) { - return (0, _builder.default)("TSAnyKeyword", ...args); -} - -function TSBooleanKeyword(...args) { - return (0, _builder.default)("TSBooleanKeyword", ...args); -} - -function TSBigIntKeyword(...args) { - return (0, _builder.default)("TSBigIntKeyword", ...args); -} - -function TSNeverKeyword(...args) { - return (0, _builder.default)("TSNeverKeyword", ...args); -} - -function TSNullKeyword(...args) { - return (0, _builder.default)("TSNullKeyword", ...args); -} - -function TSNumberKeyword(...args) { - return (0, _builder.default)("TSNumberKeyword", ...args); -} - -function TSObjectKeyword(...args) { - return (0, _builder.default)("TSObjectKeyword", ...args); -} - -function TSStringKeyword(...args) { - return (0, _builder.default)("TSStringKeyword", ...args); -} - -function TSSymbolKeyword(...args) { - return (0, _builder.default)("TSSymbolKeyword", ...args); -} - -function TSUndefinedKeyword(...args) { - return (0, _builder.default)("TSUndefinedKeyword", ...args); -} - -function TSUnknownKeyword(...args) { - return (0, _builder.default)("TSUnknownKeyword", ...args); -} - -function TSVoidKeyword(...args) { - return (0, _builder.default)("TSVoidKeyword", ...args); -} - -function TSThisType(...args) { - return (0, _builder.default)("TSThisType", ...args); -} - -function TSFunctionType(...args) { - return (0, _builder.default)("TSFunctionType", ...args); -} - -function TSConstructorType(...args) { - return (0, _builder.default)("TSConstructorType", ...args); -} - -function TSTypeReference(...args) { - return (0, _builder.default)("TSTypeReference", ...args); -} - -function TSTypePredicate(...args) { - return (0, _builder.default)("TSTypePredicate", ...args); -} - -function TSTypeQuery(...args) { - return (0, _builder.default)("TSTypeQuery", ...args); -} - -function TSTypeLiteral(...args) { - return (0, _builder.default)("TSTypeLiteral", ...args); -} - -function TSArrayType(...args) { - return (0, _builder.default)("TSArrayType", ...args); -} - -function TSTupleType(...args) { - return (0, _builder.default)("TSTupleType", ...args); -} - -function TSOptionalType(...args) { - return (0, _builder.default)("TSOptionalType", ...args); -} - -function TSRestType(...args) { - return (0, _builder.default)("TSRestType", ...args); -} - -function TSUnionType(...args) { - return (0, _builder.default)("TSUnionType", ...args); -} - -function TSIntersectionType(...args) { - return (0, _builder.default)("TSIntersectionType", ...args); -} - -function TSConditionalType(...args) { - return (0, _builder.default)("TSConditionalType", ...args); -} - -function TSInferType(...args) { - return (0, _builder.default)("TSInferType", ...args); -} - -function TSParenthesizedType(...args) { - return (0, _builder.default)("TSParenthesizedType", ...args); -} - -function TSTypeOperator(...args) { - return (0, _builder.default)("TSTypeOperator", ...args); -} - -function TSIndexedAccessType(...args) { - return (0, _builder.default)("TSIndexedAccessType", ...args); -} - -function TSMappedType(...args) { - return (0, _builder.default)("TSMappedType", ...args); -} - -function TSLiteralType(...args) { - return (0, _builder.default)("TSLiteralType", ...args); -} - -function TSExpressionWithTypeArguments(...args) { - return (0, _builder.default)("TSExpressionWithTypeArguments", ...args); -} - -function TSInterfaceDeclaration(...args) { - return (0, _builder.default)("TSInterfaceDeclaration", ...args); -} - -function TSInterfaceBody(...args) { - return (0, _builder.default)("TSInterfaceBody", ...args); -} - -function TSTypeAliasDeclaration(...args) { - return (0, _builder.default)("TSTypeAliasDeclaration", ...args); -} - -function TSAsExpression(...args) { - return (0, _builder.default)("TSAsExpression", ...args); -} - -function TSTypeAssertion(...args) { - return (0, _builder.default)("TSTypeAssertion", ...args); -} - -function TSEnumDeclaration(...args) { - return (0, _builder.default)("TSEnumDeclaration", ...args); -} - -function TSEnumMember(...args) { - return (0, _builder.default)("TSEnumMember", ...args); -} - -function TSModuleDeclaration(...args) { - return (0, _builder.default)("TSModuleDeclaration", ...args); -} - -function TSModuleBlock(...args) { - return (0, _builder.default)("TSModuleBlock", ...args); -} - -function TSImportType(...args) { - return (0, _builder.default)("TSImportType", ...args); -} - -function TSImportEqualsDeclaration(...args) { - return (0, _builder.default)("TSImportEqualsDeclaration", ...args); -} - -function TSExternalModuleReference(...args) { - return (0, _builder.default)("TSExternalModuleReference", ...args); -} - -function TSNonNullExpression(...args) { - return (0, _builder.default)("TSNonNullExpression", ...args); -} - -function TSExportAssignment(...args) { - return (0, _builder.default)("TSExportAssignment", ...args); -} - -function TSNamespaceExportDeclaration(...args) { - return (0, _builder.default)("TSNamespaceExportDeclaration", ...args); -} - -function TSTypeAnnotation(...args) { - return (0, _builder.default)("TSTypeAnnotation", ...args); -} - -function TSTypeParameterInstantiation(...args) { - return (0, _builder.default)("TSTypeParameterInstantiation", ...args); -} - -function TSTypeParameterDeclaration(...args) { - return (0, _builder.default)("TSTypeParameterDeclaration", ...args); -} - -function TSTypeParameter(...args) { - return (0, _builder.default)("TSTypeParameter", ...args); -} - -function NumberLiteral(...args) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - return NumberLiteral("NumberLiteral", ...args); -} - -function RegexLiteral(...args) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - return RegexLiteral("RegexLiteral", ...args); -} - -function RestProperty(...args) { - console.trace("The node type RestProperty has been renamed to RestElement"); - return RestProperty("RestProperty", ...args); -} - -function SpreadProperty(...args) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - return SpreadProperty("SpreadProperty", ...args); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js b/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js deleted file mode 100644 index 91e7cbd9ca..0000000000 --- a/packages/common/node_modules/@babel/types/lib/builders/react/buildChildren.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildChildren; - -var _generated = require("../../validators/generated"); - -var _cleanJSXElementLiteralChild = _interopRequireDefault(require("../../utils/react/cleanJSXElementLiteralChild")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function buildChildren(node) { - const elements = []; - - for (let i = 0; i < node.children.length; i++) { - let child = node.children[i]; - - if ((0, _generated.isJSXText)(child)) { - (0, _cleanJSXElementLiteralChild.default)(child, elements); - continue; - } - - if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression; - if ((0, _generated.isJSXEmptyExpression)(child)) continue; - elements.push(child); - } - - return elements; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/clone.js b/packages/common/node_modules/@babel/types/lib/clone/clone.js deleted file mode 100644 index 9595f6e25c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/clone.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = clone; - -var _cloneNode = _interopRequireDefault(require("./cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function clone(node) { - return (0, _cloneNode.default)(node, false); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js b/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js deleted file mode 100644 index eb29c53622..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneDeep.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneDeep; - -var _cloneNode = _interopRequireDefault(require("./cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cloneDeep(node) { - return (0, _cloneNode.default)(node); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js b/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js deleted file mode 100644 index d8612e9ebb..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneDeepWithoutLoc; - -var _cloneNode = _interopRequireDefault(require("./cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cloneDeepWithoutLoc(node) { - return (0, _cloneNode.default)(node, true, true); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js b/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js deleted file mode 100644 index 44032e3f9d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneNode.js +++ /dev/null @@ -1,101 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneNode; - -var _definitions = require("../definitions"); - -const has = Function.call.bind(Object.prototype.hasOwnProperty); - -function cloneIfNode(obj, deep, withoutLoc) { - if (obj && typeof obj.type === "string") { - return cloneNode(obj, deep, withoutLoc); - } - - return obj; -} - -function cloneIfNodeOrArray(obj, deep, withoutLoc) { - if (Array.isArray(obj)) { - return obj.map(node => cloneIfNode(node, deep, withoutLoc)); - } - - return cloneIfNode(obj, deep, withoutLoc); -} - -function cloneNode(node, deep = true, withoutLoc = false) { - if (!node) return node; - const { - type - } = node; - const newNode = { - type - }; - - if (type === "Identifier") { - newNode.name = node.name; - - if (has(node, "optional") && typeof node.optional === "boolean") { - newNode.optional = node.optional; - } - - if (has(node, "typeAnnotation")) { - newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation; - } - } else if (!has(_definitions.NODE_FIELDS, type)) { - throw new Error(`Unknown node type: "${type}"`); - } else { - for (const field of Object.keys(_definitions.NODE_FIELDS[type])) { - if (has(node, field)) { - if (deep) { - newNode[field] = type === "File" && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc); - } else { - newNode[field] = node[field]; - } - } - } - } - - if (has(node, "loc")) { - if (withoutLoc) { - newNode.loc = null; - } else { - newNode.loc = node.loc; - } - } - - if (has(node, "leadingComments")) { - newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc); - } - - if (has(node, "innerComments")) { - newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc); - } - - if (has(node, "trailingComments")) { - newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc); - } - - if (has(node, "extra")) { - newNode.extra = Object.assign({}, node.extra); - } - - return newNode; -} - -function cloneCommentsWithoutLoc(comments) { - return comments.map(({ - type, - value - }) => ({ - type, - value, - loc: null - })); -} - -function maybeCloneComments(comments, deep, withoutLoc) { - return deep && withoutLoc ? cloneCommentsWithoutLoc(comments) : comments; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js deleted file mode 100644 index 34fd172ed7..0000000000 --- a/packages/common/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cloneWithoutLoc; - -var _cloneNode = _interopRequireDefault(require("./cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function cloneWithoutLoc(node) { - return (0, _cloneNode.default)(node, false, true); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/addComment.js b/packages/common/node_modules/@babel/types/lib/comments/addComment.js deleted file mode 100644 index ff586514e7..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/addComment.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = addComment; - -var _addComments = _interopRequireDefault(require("./addComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function addComment(node, type, content, line) { - return (0, _addComments.default)(node, type, [{ - type: line ? "CommentLine" : "CommentBlock", - value: content - }]); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/addComments.js b/packages/common/node_modules/@babel/types/lib/comments/addComments.js deleted file mode 100644 index f3a61df713..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/addComments.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = addComments; - -function addComments(node, type, comments) { - if (!comments || !node) return node; - const key = `${type}Comments`; - - if (node[key]) { - if (type === "leading") { - node[key] = comments.concat(node[key]); - } else { - node[key] = node[key].concat(comments); - } - } else { - node[key] = comments; - } - - return node; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js deleted file mode 100644 index fbe59dec62..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritInnerComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritInnerComments; - -var _inherit = _interopRequireDefault(require("../utils/inherit")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritInnerComments(child, parent) { - (0, _inherit.default)("innerComments", child, parent); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js deleted file mode 100644 index ccb02ec55b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritLeadingComments; - -var _inherit = _interopRequireDefault(require("../utils/inherit")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritLeadingComments(child, parent) { - (0, _inherit.default)("leadingComments", child, parent); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js deleted file mode 100644 index bce1e2d9ac..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritTrailingComments; - -var _inherit = _interopRequireDefault(require("../utils/inherit")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritTrailingComments(child, parent) { - (0, _inherit.default)("trailingComments", child, parent); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js b/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js deleted file mode 100644 index fd942d86cd..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/inheritsComments.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inheritsComments; - -var _inheritTrailingComments = _interopRequireDefault(require("./inheritTrailingComments")); - -var _inheritLeadingComments = _interopRequireDefault(require("./inheritLeadingComments")); - -var _inheritInnerComments = _interopRequireDefault(require("./inheritInnerComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inheritsComments(child, parent) { - (0, _inheritTrailingComments.default)(child, parent); - (0, _inheritLeadingComments.default)(child, parent); - (0, _inheritInnerComments.default)(child, parent); - return child; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/comments/removeComments.js b/packages/common/node_modules/@babel/types/lib/comments/removeComments.js deleted file mode 100644 index fe34f1a890..0000000000 --- a/packages/common/node_modules/@babel/types/lib/comments/removeComments.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeComments; - -var _constants = require("../constants"); - -function removeComments(node) { - _constants.COMMENT_KEYS.forEach(key => { - node[key] = null; - }); - - return node; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/constants/generated/index.js b/packages/common/node_modules/@babel/types/lib/constants/generated/index.js deleted file mode 100644 index a8b6e78040..0000000000 --- a/packages/common/node_modules/@babel/types/lib/constants/generated/index.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.PRIVATE_TYPES = exports.JSX_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.FLOWTYPE_TYPES = exports.FLOW_TYPES = exports.MODULESPECIFIER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = exports.CLASS_TYPES = exports.PATTERN_TYPES = exports.UNARYLIKE_TYPES = exports.PROPERTY_TYPES = exports.OBJECTMEMBER_TYPES = exports.METHOD_TYPES = exports.USERWHITESPACABLE_TYPES = exports.IMMUTABLE_TYPES = exports.LITERAL_TYPES = exports.TSENTITYNAME_TYPES = exports.LVAL_TYPES = exports.PATTERNLIKE_TYPES = exports.DECLARATION_TYPES = exports.PUREISH_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTION_TYPES = exports.FORXSTATEMENT_TYPES = exports.FOR_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.WHILE_TYPES = exports.LOOP_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.SCOPABLE_TYPES = exports.BINARY_TYPES = exports.EXPRESSION_TYPES = void 0; - -var _definitions = require("../../definitions"); - -const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"]; -exports.EXPRESSION_TYPES = EXPRESSION_TYPES; -const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"]; -exports.BINARY_TYPES = BINARY_TYPES; -const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"]; -exports.SCOPABLE_TYPES = SCOPABLE_TYPES; -const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"]; -exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; -const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"]; -exports.BLOCK_TYPES = BLOCK_TYPES; -const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"]; -exports.STATEMENT_TYPES = STATEMENT_TYPES; -const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"]; -exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; -const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"]; -exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; -const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"]; -exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; -const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"]; -exports.LOOP_TYPES = LOOP_TYPES; -const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"]; -exports.WHILE_TYPES = WHILE_TYPES; -const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; -exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; -const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"]; -exports.FOR_TYPES = FOR_TYPES; -const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"]; -exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; -const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"]; -exports.FUNCTION_TYPES = FUNCTION_TYPES; -const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"]; -exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; -const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"]; -exports.PUREISH_TYPES = PUREISH_TYPES; -const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"]; -exports.DECLARATION_TYPES = DECLARATION_TYPES; -const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"]; -exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; -const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"]; -exports.LVAL_TYPES = LVAL_TYPES; -const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"]; -exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; -const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"]; -exports.LITERAL_TYPES = LITERAL_TYPES; -const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"]; -exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; -const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; -exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; -const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"]; -exports.METHOD_TYPES = METHOD_TYPES; -const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"]; -exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; -const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"]; -exports.PROPERTY_TYPES = PROPERTY_TYPES; -const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"]; -exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; -const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"]; -exports.PATTERN_TYPES = PATTERN_TYPES; -const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"]; -exports.CLASS_TYPES = CLASS_TYPES; -const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"]; -exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; -const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; -exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; -const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; -exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; -const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"]; -exports.FLOW_TYPES = FLOW_TYPES; -const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"]; -exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; -const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; -exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; -const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; -exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; -const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"]; -exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; -const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"]; -exports.ENUMBODY_TYPES = ENUMBODY_TYPES; -const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"]; -exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; -const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"]; -exports.JSX_TYPES = JSX_TYPES; -const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"]; -exports.PRIVATE_TYPES = PRIVATE_TYPES; -const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"]; -exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; -const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"]; -exports.TSTYPE_TYPES = TSTYPE_TYPES; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/constants/index.js b/packages/common/node_modules/@babel/types/lib/constants/index.js deleted file mode 100644 index 7553162c66..0000000000 --- a/packages/common/node_modules/@babel/types/lib/constants/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NOT_LOCAL_BINDING = exports.BLOCK_SCOPED_SYMBOL = exports.INHERIT_KEYS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = exports.BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.UPDATE_OPERATORS = exports.LOGICAL_OPERATORS = exports.COMMENT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = void 0; -const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; -exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; -const FLATTENABLE_KEYS = ["body", "expressions"]; -exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; -const FOR_INIT_KEYS = ["left", "init"]; -exports.FOR_INIT_KEYS = FOR_INIT_KEYS; -const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; -exports.COMMENT_KEYS = COMMENT_KEYS; -const LOGICAL_OPERATORS = ["||", "&&", "??"]; -exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; -const UPDATE_OPERATORS = ["++", "--"]; -exports.UPDATE_OPERATORS = UPDATE_OPERATORS; -const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; -exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; -const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; -exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; -const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; -exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; -const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; -exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; -const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; -exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; -const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS]; -exports.BINARY_OPERATORS = BINARY_OPERATORS; -const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")]; -exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; -const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; -exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; -const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; -exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; -const STRING_UNARY_OPERATORS = ["typeof"]; -exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; -const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; -exports.UNARY_OPERATORS = UNARY_OPERATORS; -const INHERIT_KEYS = { - optional: ["typeAnnotation", "typeParameters", "returnType"], - force: ["start", "loc", "end"] -}; -exports.INHERIT_KEYS = INHERIT_KEYS; -const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); -exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; -const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); -exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js b/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js deleted file mode 100644 index 2836b36578..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/ensureBlock.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = ensureBlock; - -var _toBlock = _interopRequireDefault(require("./toBlock")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ensureBlock(node, key = "body") { - return node[key] = (0, _toBlock.default)(node[key], node); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js deleted file mode 100644 index fadd0f04be..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = gatherSequenceExpressions; - -var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function gatherSequenceExpressions(nodes, scope, declars) { - const exprs = []; - let ensureLastUndefined = true; - - for (const node of nodes) { - ensureLastUndefined = false; - - if ((0, _generated.isExpression)(node)) { - exprs.push(node); - } else if ((0, _generated.isExpressionStatement)(node)) { - exprs.push(node.expression); - } else if ((0, _generated.isVariableDeclaration)(node)) { - if (node.kind !== "var") return; - - for (const declar of node.declarations) { - const bindings = (0, _getBindingIdentifiers.default)(declar); - - for (const key of Object.keys(bindings)) { - declars.push({ - kind: node.kind, - id: (0, _cloneNode.default)(bindings[key]) - }); - } - - if (declar.init) { - exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init)); - } - } - - ensureLastUndefined = true; - } else if ((0, _generated.isIfStatement)(node)) { - const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode(); - const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode(); - if (!consequent || !alternate) return; - exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate)); - } else if ((0, _generated.isBlockStatement)(node)) { - const body = gatherSequenceExpressions(node.body, scope, declars); - if (!body) return; - exprs.push(body); - } else if ((0, _generated.isEmptyStatement)(node)) { - ensureLastUndefined = true; - } else { - return; - } - } - - if (ensureLastUndefined) { - exprs.push(scope.buildUndefinedNode()); - } - - if (exprs.length === 1) { - return exprs[0]; - } else { - return (0, _generated2.sequenceExpression)(exprs); - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js deleted file mode 100644 index b9d165b6fd..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toBindingIdentifierName; - -var _toIdentifier = _interopRequireDefault(require("./toIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toBindingIdentifierName(name) { - name = (0, _toIdentifier.default)(name); - if (name === "eval" || name === "arguments") name = "_" + name; - return name; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toBlock.js b/packages/common/node_modules/@babel/types/lib/converters/toBlock.js deleted file mode 100644 index 19886833fa..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toBlock.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toBlock; - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -function toBlock(node, parent) { - if ((0, _generated.isBlockStatement)(node)) { - return node; - } - - let blockNodes = []; - - if ((0, _generated.isEmptyStatement)(node)) { - blockNodes = []; - } else { - if (!(0, _generated.isStatement)(node)) { - if ((0, _generated.isFunction)(parent)) { - node = (0, _generated2.returnStatement)(node); - } else { - node = (0, _generated2.expressionStatement)(node); - } - } - - blockNodes = [node]; - } - - return (0, _generated2.blockStatement)(blockNodes); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js b/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js deleted file mode 100644 index 31e6770f6f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toComputedKey.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toComputedKey; - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -function toComputedKey(node, key = node.key || node.property) { - if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name); - return key; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toExpression.js b/packages/common/node_modules/@babel/types/lib/converters/toExpression.js deleted file mode 100644 index 6e58b0de4d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toExpression.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toExpression; - -var _generated = require("../validators/generated"); - -function toExpression(node) { - if ((0, _generated.isExpressionStatement)(node)) { - node = node.expression; - } - - if ((0, _generated.isExpression)(node)) { - return node; - } - - if ((0, _generated.isClass)(node)) { - node.type = "ClassExpression"; - } else if ((0, _generated.isFunction)(node)) { - node.type = "FunctionExpression"; - } - - if (!(0, _generated.isExpression)(node)) { - throw new Error(`cannot turn ${node.type} to an expression`); - } - - return node; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js b/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js deleted file mode 100644 index e55db41fc4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toIdentifier.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toIdentifier; - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toIdentifier(name) { - name = name + ""; - name = name.replace(/[^a-zA-Z0-9$_]/g, "-"); - name = name.replace(/^[-0-9]+/, ""); - name = name.replace(/[-\s]+(.)?/g, function (match, c) { - return c ? c.toUpperCase() : ""; - }); - - if (!(0, _isValidIdentifier.default)(name)) { - name = `_${name}`; - } - - return name || "_"; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js b/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js deleted file mode 100644 index c48fd0e7f3..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toKeyAlias.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toKeyAlias; - -var _generated = require("../validators/generated"); - -var _cloneNode = _interopRequireDefault(require("../clone/cloneNode")); - -var _removePropertiesDeep = _interopRequireDefault(require("../modifications/removePropertiesDeep")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toKeyAlias(node, key = node.key) { - let alias; - - if (node.kind === "method") { - return toKeyAlias.increment() + ""; - } else if ((0, _generated.isIdentifier)(key)) { - alias = key.name; - } else if ((0, _generated.isStringLiteral)(key)) { - alias = JSON.stringify(key.value); - } else { - alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key))); - } - - if (node.computed) { - alias = `[${alias}]`; - } - - if (node.static) { - alias = `static:${alias}`; - } - - return alias; -} - -toKeyAlias.uid = 0; - -toKeyAlias.increment = function () { - if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) { - return toKeyAlias.uid = 0; - } else { - return toKeyAlias.uid++; - } -}; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js deleted file mode 100644 index 2e221db4e0..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toSequenceExpression.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toSequenceExpression; - -var _gatherSequenceExpressions = _interopRequireDefault(require("./gatherSequenceExpressions")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function toSequenceExpression(nodes, scope) { - if (!nodes || !nodes.length) return; - const declars = []; - const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars); - if (!result) return; - - for (const declar of declars) { - scope.push(declar); - } - - return result; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/toStatement.js b/packages/common/node_modules/@babel/types/lib/converters/toStatement.js deleted file mode 100644 index 69b22ae09c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/toStatement.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = toStatement; - -var _generated = require("../validators/generated"); - -var _generated2 = require("../builders/generated"); - -function toStatement(node, ignore) { - if ((0, _generated.isStatement)(node)) { - return node; - } - - let mustHaveId = false; - let newType; - - if ((0, _generated.isClass)(node)) { - mustHaveId = true; - newType = "ClassDeclaration"; - } else if ((0, _generated.isFunction)(node)) { - mustHaveId = true; - newType = "FunctionDeclaration"; - } else if ((0, _generated.isAssignmentExpression)(node)) { - return (0, _generated2.expressionStatement)(node); - } - - if (mustHaveId && !node.id) { - newType = false; - } - - if (!newType) { - if (ignore) { - return false; - } else { - throw new Error(`cannot turn ${node.type} to a statement`); - } - } - - node.type = newType; - return node; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js b/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js deleted file mode 100644 index d1118e164b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/converters/valueToNode.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = valueToNode; - -var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); - -var _isRegExp = _interopRequireDefault(require("lodash/isRegExp")); - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _generated = require("../builders/generated"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function valueToNode(value) { - if (value === undefined) { - return (0, _generated.identifier)("undefined"); - } - - if (value === true || value === false) { - return (0, _generated.booleanLiteral)(value); - } - - if (value === null) { - return (0, _generated.nullLiteral)(); - } - - if (typeof value === "string") { - return (0, _generated.stringLiteral)(value); - } - - if (typeof value === "number") { - let result; - - if (Number.isFinite(value)) { - result = (0, _generated.numericLiteral)(Math.abs(value)); - } else { - let numerator; - - if (Number.isNaN(value)) { - numerator = (0, _generated.numericLiteral)(0); - } else { - numerator = (0, _generated.numericLiteral)(1); - } - - result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0)); - } - - if (value < 0 || Object.is(value, -0)) { - result = (0, _generated.unaryExpression)("-", result); - } - - return result; - } - - if ((0, _isRegExp.default)(value)) { - const pattern = value.source; - const flags = value.toString().match(/\/([a-z]+|)$/)[1]; - return (0, _generated.regExpLiteral)(pattern, flags); - } - - if (Array.isArray(value)) { - return (0, _generated.arrayExpression)(value.map(valueToNode)); - } - - if ((0, _isPlainObject.default)(value)) { - const props = []; - - for (const key of Object.keys(value)) { - let nodeKey; - - if ((0, _isValidIdentifier.default)(key)) { - nodeKey = (0, _generated.identifier)(key); - } else { - nodeKey = (0, _generated.stringLiteral)(key); - } - - props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key]))); - } - - return (0, _generated.objectExpression)(props); - } - - throw new Error("don't know how to turn this value into a node"); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/core.js b/packages/common/node_modules/@babel/types/lib/definitions/core.js deleted file mode 100644 index 863536d130..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/core.js +++ /dev/null @@ -1,858 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.patternLikeCommon = exports.functionDeclarationCommon = exports.functionTypeAnnotationCommon = exports.functionCommon = void 0; - -var _is = _interopRequireDefault(require("../validators/is")); - -var _isValidIdentifier = _interopRequireDefault(require("../validators/isValidIdentifier")); - -var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); - -var _constants = require("../constants"); - -var _utils = _interopRequireWildcard(require("./utils")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _utils.default)("ArrayExpression", { - fields: { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), - default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined - } - }, - visitor: ["elements"], - aliases: ["Expression"] -}); -(0, _utils.default)("AssignmentExpression", { - fields: { - operator: { - validate: function () { - if (!process.env.BABEL_TYPES_8_BREAKING) { - return (0, _utils.assertValueType)("string"); - } - - const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS); - const pattern = (0, _utils.assertOneOf)("="); - return function (node, key, val) { - const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier; - validator(node, key, val); - }; - }() - }, - left: { - validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Expression"] -}); -(0, _utils.default)("BinaryExpression", { - builder: ["operator", "left", "right"], - fields: { - operator: { - validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - visitor: ["left", "right"], - aliases: ["Binary", "Expression"] -}); -(0, _utils.default)("InterpreterDirective", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("Directive", { - visitor: ["value"], - fields: { - value: { - validate: (0, _utils.assertNodeType)("DirectiveLiteral") - } - } -}); -(0, _utils.default)("DirectiveLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("BlockStatement", { - builder: ["body", "directives"], - visitor: ["directives", "body"], - fields: { - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block", "Statement"] -}); -(0, _utils.default)("BreakStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("CallExpression", { - visitor: ["callee", "arguments", "typeParameters", "typeArguments"], - builder: ["callee", "arguments"], - aliases: ["Expression"], - fields: Object.assign({ - callee: { - validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) - } - }, !process.env.BABEL_TYPES_8_BREAKING ? { - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - } - } : {}, { - typeArguments: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), - optional: true - } - }) -}); -(0, _utils.default)("CatchClause", { - visitor: ["param", "body"], - fields: { - param: { - validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }, - aliases: ["Scopable", "BlockParent"] -}); -(0, _utils.default)("ConditionalExpression", { - visitor: ["test", "consequent", "alternate"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Expression") - }, - alternate: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Expression", "Conditional"] -}); -(0, _utils.default)("ContinueStatement", { - visitor: ["label"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } - }, - aliases: ["Statement", "Terminatorless", "CompletionStatement"] -}); -(0, _utils.default)("DebuggerStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("DoWhileStatement", { - visitor: ["test", "body"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - }, - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] -}); -(0, _utils.default)("EmptyStatement", { - aliases: ["Statement"] -}); -(0, _utils.default)("ExpressionStatement", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - }, - aliases: ["Statement", "ExpressionWrapper"] -}); -(0, _utils.default)("File", { - builder: ["program", "comments", "tokens"], - visitor: ["program"], - fields: { - program: { - validate: (0, _utils.assertNodeType)("Program") - } - } -}); -(0, _utils.default)("ForInStatement", { - visitor: ["left", "right", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("ForStatement", { - visitor: ["init", "test", "update", "body"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], - fields: { - init: { - validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"), - optional: true - }, - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - update: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -const functionCommon = { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty"))) - }, - generator: { - default: false - }, - async: { - default: false - } -}; -exports.functionCommon = functionCommon; -const functionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon; -const functionDeclarationCommon = Object.assign({}, functionCommon, { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - } -}); -exports.functionDeclarationCommon = functionDeclarationCommon; -(0, _utils.default)("FunctionDeclaration", { - builder: ["id", "params", "body", "generator", "async"], - visitor: ["id", "params", "body", "returnType", "typeParameters"], - fields: Object.assign({}, functionDeclarationCommon, {}, functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"], - validate: function () { - if (!process.env.BABEL_TYPES_8_BREAKING) return () => {}; - const identifier = (0, _utils.assertNodeType)("Identifier"); - return function (parent, key, node) { - if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { - identifier(node, "id", node.id); - } - }; - }() -}); -(0, _utils.default)("FunctionExpression", { - inherits: "FunctionDeclaration", - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, { - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -const patternLikeCommon = { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))) - } -}; -exports.patternLikeCommon = patternLikeCommon; -(0, _utils.default)("Identifier", { - builder: ["name"], - visitor: ["typeAnnotation", "decorators"], - aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"], - fields: Object.assign({}, patternLikeCommon, { - name: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (!(0, _isValidIdentifier.default)(val, false)) { - throw new TypeError(`"${val}" is not a valid identifier name`); - } - }) - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }), - - validate(parent, key, node) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - const match = /\.(\w+)$/.exec(key); - if (!match) return; - const [, parentKey] = match; - const nonComp = { - computed: false - }; - - if (parentKey === "property") { - if ((0, _is.default)("MemberExpression", parent, nonComp)) return; - if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return; - } else if (parentKey === "key") { - if ((0, _is.default)("Property", parent, nonComp)) return; - if ((0, _is.default)("Method", parent, nonComp)) return; - } else if (parentKey === "exported") { - if ((0, _is.default)("ExportSpecifier", parent)) return; - } else if (parentKey === "imported") { - if ((0, _is.default)("ImportSpecifier", parent, { - imported: node - })) return; - } else if (parentKey === "meta") { - if ((0, _is.default)("MetaProperty", parent, { - meta: node - })) return; - } - - if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name)) && node.name !== "this") { - throw new TypeError(`"${node.name}" is not a valid identifier`); - } - } - -}); -(0, _utils.default)("IfStatement", { - visitor: ["test", "consequent", "alternate"], - aliases: ["Statement", "Conditional"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - consequent: { - validate: (0, _utils.assertNodeType)("Statement") - }, - alternate: { - optional: true, - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("LabeledStatement", { - visitor: ["label", "body"], - aliases: ["Statement"], - fields: { - label: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("StringLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NumericLiteral", { - builder: ["value"], - deprecatedAlias: "NumberLiteral", - fields: { - value: { - validate: (0, _utils.assertValueType)("number") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("NullLiteral", { - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("BooleanLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("boolean") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("RegExpLiteral", { - builder: ["pattern", "flags"], - deprecatedAlias: "RegexLiteral", - aliases: ["Expression", "Pureish", "Literal"], - fields: { - pattern: { - validate: (0, _utils.assertValueType)("string") - }, - flags: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - const invalid = /[^gimsuy]/.exec(val); - - if (invalid) { - throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`); - } - }), - default: "" - } - } -}); -(0, _utils.default)("LogicalExpression", { - builder: ["operator", "left", "right"], - visitor: ["left", "right"], - aliases: ["Binary", "Expression"], - fields: { - operator: { - validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS) - }, - left: { - validate: (0, _utils.assertNodeType)("Expression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("MemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression", "LVal"], - fields: Object.assign({ - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - } - }, !process.env.BABEL_TYPES_8_BREAKING ? { - optional: { - validate: (0, _utils.assertOneOf)(true, false), - optional: true - } - } : {}) -}); -(0, _utils.default)("NewExpression", { - inherits: "CallExpression" -}); -(0, _utils.default)("Program", { - visitor: ["directives", "body"], - builder: ["body", "directives", "sourceType", "interpreter"], - fields: { - sourceFile: { - validate: (0, _utils.assertValueType)("string") - }, - sourceType: { - validate: (0, _utils.assertOneOf)("script", "module"), - default: "script" - }, - interpreter: { - validate: (0, _utils.assertNodeType)("InterpreterDirective"), - default: null, - optional: true - }, - directives: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))), - default: [] - }, - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - }, - aliases: ["Scopable", "BlockParent", "Block"] -}); -(0, _utils.default)("ObjectExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement"))) - } - } -}); -(0, _utils.default)("ObjectMethod", { - builder: ["kind", "key", "params", "body", "computed", "generator", "async"], - fields: Object.assign({}, functionCommon, {}, functionTypeAnnotationCommon, { - kind: Object.assign({ - validate: (0, _utils.assertOneOf)("method", "get", "set") - }, !process.env.BABEL_TYPES_8_BREAKING ? { - default: "method" - } : {}), - computed: { - default: false - }, - key: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }), - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"] -}); -(0, _utils.default)("ObjectProperty", { - builder: ["key", "value", "computed", "shorthand", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])], - fields: { - computed: { - default: false - }, - key: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - value: { - validate: (0, _utils.assertNodeType)("Expression", "PatternLike") - }, - shorthand: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (val && node.computed) { - throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true"); - } - }, function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (val && !(0, _is.default)("Identifier", node.key)) { - throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier"); - } - }), - default: false - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }, - visitor: ["key", "value", "decorators"], - aliases: ["UserWhitespacable", "Property", "ObjectMember"], - validate: function () { - const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern"); - const expression = (0, _utils.assertNodeType)("Expression"); - return function (parent, key, node) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression; - validator(node, "value", node.value); - }; - }() -}); -(0, _utils.default)("RestElement", { - visitor: ["argument", "typeAnnotation"], - builder: ["argument"], - aliases: ["LVal", "PatternLike"], - deprecatedAlias: "RestProperty", - fields: Object.assign({}, patternLikeCommon, { - argument: { - validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "Pattern", "MemberExpression") - } - }), - - validate(parent, key) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - const match = /(\w+)\[(\d+)\]/.exec(key); - if (!match) throw new Error("Internal Babel error: malformed key."); - const [, listKey, index] = match; - - if (parent[listKey].length > index + 1) { - throw new TypeError(`RestElement must be last element of ${listKey}`); - } - } - -}); -(0, _utils.default)("ReturnStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - } - } -}); -(0, _utils.default)("SequenceExpression", { - visitor: ["expressions"], - fields: { - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression"))) - } - }, - aliases: ["Expression"] -}); -(0, _utils.default)("ParenthesizedExpression", { - visitor: ["expression"], - aliases: ["Expression", "ExpressionWrapper"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("SwitchCase", { - visitor: ["test", "consequent"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - consequent: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement"))) - } - } -}); -(0, _utils.default)("SwitchStatement", { - visitor: ["discriminant", "cases"], - aliases: ["Statement", "BlockParent", "Scopable"], - fields: { - discriminant: { - validate: (0, _utils.assertNodeType)("Expression") - }, - cases: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase"))) - } - } -}); -(0, _utils.default)("ThisExpression", { - aliases: ["Expression"] -}); -(0, _utils.default)("ThrowStatement", { - visitor: ["argument"], - aliases: ["Statement", "Terminatorless", "CompletionStatement"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("TryStatement", { - visitor: ["block", "handler", "finalizer"], - aliases: ["Statement"], - fields: { - block: { - validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), function (node) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (!node.handler && !node.finalizer) { - throw new TypeError("TryStatement expects either a handler or finalizer, or both"); - } - }) - }, - handler: { - optional: true, - validate: (0, _utils.assertNodeType)("CatchClause") - }, - finalizer: { - optional: true, - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("UnaryExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: true - }, - argument: { - validate: (0, _utils.assertNodeType)("Expression") - }, - operator: { - validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["UnaryLike", "Expression"] -}); -(0, _utils.default)("UpdateExpression", { - builder: ["operator", "argument", "prefix"], - fields: { - prefix: { - default: false - }, - argument: { - validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression") - }, - operator: { - validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS) - } - }, - visitor: ["argument"], - aliases: ["Expression"] -}); -(0, _utils.default)("VariableDeclaration", { - builder: ["kind", "declarations"], - visitor: ["declarations"], - aliases: ["Statement", "Declaration"], - fields: { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - kind: { - validate: (0, _utils.assertOneOf)("var", "let", "const") - }, - declarations: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator"))) - } - }, - - validate(parent, key, node) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - if (!(0, _is.default)("ForXStatement", parent, { - left: node - })) return; - - if (node.declarations.length !== 1) { - throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`); - } - } - -}); -(0, _utils.default)("VariableDeclarator", { - visitor: ["id", "init"], - fields: { - id: { - validate: function () { - if (!process.env.BABEL_TYPES_8_BREAKING) { - return (0, _utils.assertNodeType)("LVal"); - } - - const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"); - const without = (0, _utils.assertNodeType)("Identifier"); - return function (node, key, val) { - const validator = node.init ? normal : without; - validator(node, key, val); - }; - }() - }, - definite: { - optional: true, - validate: (0, _utils.assertValueType)("boolean") - }, - init: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("WhileStatement", { - visitor: ["test", "body"], - aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], - fields: { - test: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); -(0, _utils.default)("WithStatement", { - visitor: ["object", "body"], - aliases: ["Statement"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - } - } -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/es2015.js b/packages/common/node_modules/@babel/types/lib/definitions/es2015.js deleted file mode 100644 index e80a804aa0..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/es2015.js +++ /dev/null @@ -1,467 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.classMethodOrDeclareMethodCommon = exports.classMethodOrPropertyCommon = void 0; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -var _is = _interopRequireDefault(require("../validators/is")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -(0, _utils.default)("AssignmentPattern", { - visitor: ["left", "right", "decorators"], - builder: ["left", "right"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - left: { - validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression") - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }) -}); -(0, _utils.default)("ArrayPattern", { - visitor: ["elements", "typeAnnotation"], - builder: ["elements"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike"))) - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - }) -}); -(0, _utils.default)("ArrowFunctionExpression", { - builder: ["params", "body", "async"], - visitor: ["params", "body", "returnType", "typeParameters"], - aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"], - fields: Object.assign({}, _core.functionCommon, {}, _core.functionTypeAnnotationCommon, { - expression: { - validate: (0, _utils.assertValueType)("boolean") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement", "Expression") - } - }) -}); -(0, _utils.default)("ClassBody", { - visitor: ["body"], - fields: { - body: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "TSDeclareMethod", "TSIndexSignature"))) - } - } -}); -(0, _utils.default)("ClassExpression", { - builder: ["id", "superClass", "body", "decorators"], - visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"], - aliases: ["Scopable", "Class", "Expression"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("Identifier"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"), - optional: true - }, - body: { - validate: (0, _utils.assertNodeType)("ClassBody") - }, - superClass: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - }, - superTypeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - }, - implements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - } -}); -(0, _utils.default)("ClassDeclaration", { - inherits: "ClassExpression", - aliases: ["Scopable", "Class", "Statement", "Declaration"], - fields: { - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - abstract: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }, - validate: function () { - const identifier = (0, _utils.assertNodeType)("Identifier"); - return function (parent, key, node) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (!(0, _is.default)("ExportDefaultDeclaration", parent)) { - identifier(node, "id", node.id); - } - }; - }() -}); -(0, _utils.default)("ExportAllDeclaration", { - visitor: ["source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - source: { - validate: (0, _utils.assertNodeType)("StringLiteral") - } - } -}); -(0, _utils.default)("ExportDefaultDeclaration", { - visitor: ["declaration"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression") - } - } -}); -(0, _utils.default)("ExportNamedDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"], - fields: { - declaration: { - optional: true, - validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (val && node.specifiers.length) { - throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration"); - } - }, function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (val && node.source) { - throw new TypeError("Cannot export a declaration from a source"); - } - }) - }, - specifiers: { - default: [], - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () { - const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier"); - const sourceless = (0, _utils.assertNodeType)("ExportSpecifier"); - if (!process.env.BABEL_TYPES_8_BREAKING) return sourced; - return function (node, key, val) { - const validator = node.source ? sourced : sourceless; - validator(node, key, val); - }; - }())) - }, - source: { - validate: (0, _utils.assertNodeType)("StringLiteral"), - optional: true - }, - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) - } -}); -(0, _utils.default)("ExportSpecifier", { - visitor: ["local", "exported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ForOfStatement", { - visitor: ["left", "right", "body"], - builder: ["left", "right", "body", "await"], - aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"], - fields: { - left: { - validate: function () { - if (!process.env.BABEL_TYPES_8_BREAKING) { - return (0, _utils.assertNodeType)("VariableDeclaration", "LVal"); - } - - const declaration = (0, _utils.assertNodeType)("VariableDeclaration"); - const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern"); - return function (node, key, val) { - if ((0, _is.default)("VariableDeclaration", val)) { - declaration(node, key, val); - } else { - lval(node, key, val); - } - }; - }() - }, - right: { - validate: (0, _utils.assertNodeType)("Expression") - }, - body: { - validate: (0, _utils.assertNodeType)("Statement") - }, - await: { - default: false - } - } -}); -(0, _utils.default)("ImportDeclaration", { - visitor: ["specifiers", "source"], - aliases: ["Statement", "Declaration", "ModuleDeclaration"], - fields: { - specifiers: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier"))) - }, - source: { - validate: (0, _utils.assertNodeType)("StringLiteral") - }, - importKind: { - validate: (0, _utils.assertOneOf)("type", "typeof", "value"), - optional: true - } - } -}); -(0, _utils.default)("ImportDefaultSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ImportNamespaceSpecifier", { - visitor: ["local"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ImportSpecifier", { - visitor: ["local", "imported"], - aliases: ["ModuleSpecifier"], - fields: { - local: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - imported: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - importKind: { - validate: (0, _utils.assertOneOf)("type", "typeof"), - optional: true - } - } -}); -(0, _utils.default)("MetaProperty", { - visitor: ["meta", "property"], - aliases: ["Expression"], - fields: { - meta: { - validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - let property; - - switch (val.name) { - case "function": - property = "sent"; - break; - - case "new": - property = "target"; - break; - - case "import": - property = "meta"; - break; - } - - if (!(0, _is.default)("Identifier", node.property, { - name: property - })) { - throw new TypeError("Unrecognised MetaProperty"); - } - }) - }, - property: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -const classMethodOrPropertyCommon = { - abstract: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - accessibility: { - validate: (0, _utils.assertOneOf)("public", "private", "protected"), - optional: true - }, - static: { - default: false - }, - computed: { - default: false - }, - optional: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - key: { - validate: (0, _utils.chain)(function () { - const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression")) - } -}; -exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon; -const classMethodOrDeclareMethodCommon = Object.assign({}, _core.functionCommon, {}, classMethodOrPropertyCommon, { - kind: { - validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"), - default: "method" - }, - access: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } -}); -exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon; -(0, _utils.default)("ClassMethod", { - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"], - builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - fields: Object.assign({}, classMethodOrDeclareMethodCommon, {}, _core.functionTypeAnnotationCommon, { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -(0, _utils.default)("ObjectPattern", { - visitor: ["properties", "typeAnnotation", "decorators"], - builder: ["properties"], - aliases: ["Pattern", "PatternLike", "LVal"], - fields: Object.assign({}, _core.patternLikeCommon, { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty"))) - } - }) -}); -(0, _utils.default)("SpreadElement", { - visitor: ["argument"], - aliases: ["UnaryLike"], - deprecatedAlias: "SpreadProperty", - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("Super", { - aliases: ["Expression"] -}); -(0, _utils.default)("TaggedTemplateExpression", { - visitor: ["tag", "quasi"], - aliases: ["Expression"], - fields: { - tag: { - validate: (0, _utils.assertNodeType)("Expression") - }, - quasi: { - validate: (0, _utils.assertNodeType)("TemplateLiteral") - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("TemplateElement", { - builder: ["value", "tail"], - fields: { - value: { - validate: (0, _utils.assertShape)({ - raw: { - validate: (0, _utils.assertValueType)("string") - }, - cooked: { - validate: (0, _utils.assertValueType)("string"), - optional: true - } - }) - }, - tail: { - default: false - } - } -}); -(0, _utils.default)("TemplateLiteral", { - visitor: ["quasis", "expressions"], - aliases: ["Expression", "Literal"], - fields: { - quasis: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement"))) - }, - expressions: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")), function (node, key, val) { - if (node.quasis.length !== val.length + 1) { - throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`); - } - }) - } - } -}); -(0, _utils.default)("YieldExpression", { - builder: ["argument", "delegate"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - delegate: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), function (node, key, val) { - if (!process.env.BABEL_TYPES_8_BREAKING) return; - - if (val && !node.argument) { - throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument"); - } - }), - default: false - }, - argument: { - optional: true, - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/experimental.js b/packages/common/node_modules/@babel/types/lib/definitions/experimental.js deleted file mode 100644 index 31734b5355..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/experimental.js +++ /dev/null @@ -1,241 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _es = require("./es2015"); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -(0, _utils.default)("ArgumentPlaceholder", {}); -(0, _utils.default)("AwaitExpression", { - builder: ["argument"], - visitor: ["argument"], - aliases: ["Expression", "Terminatorless"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("BindExpression", { - visitor: ["object", "callee"], - aliases: ["Expression"], - fields: !process.env.BABEL_TYPES_8_BREAKING ? {} : { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - callee: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("ClassProperty", { - visitor: ["key", "value", "typeAnnotation", "decorators"], - builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"], - aliases: ["Property"], - fields: Object.assign({}, _es.classMethodOrPropertyCommon, { - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - definite: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - declare: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - } - }) -}); -(0, _utils.default)("OptionalMemberExpression", { - builder: ["object", "property", "computed", "optional"], - visitor: ["object", "property"], - aliases: ["Expression"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("Expression") - }, - property: { - validate: function () { - const normal = (0, _utils.assertNodeType)("Identifier"); - const computed = (0, _utils.assertNodeType)("Expression"); - return function (node, key, val) { - const validator = node.computed ? computed : normal; - validator(node, key, val); - }; - }() - }, - computed: { - default: false - }, - optional: { - validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) - } - } -}); -(0, _utils.default)("PipelineTopicExpression", { - builder: ["expression"], - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("PipelineBareFunction", { - builder: ["callee"], - visitor: ["callee"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("PipelinePrimaryTopicReference", { - aliases: ["Expression"] -}); -(0, _utils.default)("OptionalCallExpression", { - visitor: ["callee", "arguments", "typeParameters", "typeArguments"], - builder: ["callee", "arguments", "optional"], - aliases: ["Expression"], - fields: { - callee: { - validate: (0, _utils.assertNodeType)("Expression") - }, - arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName"))) - }, - optional: { - validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)()) - }, - typeArguments: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateProperty", { - visitor: ["key", "value", "decorators"], - builder: ["key", "value", "decorators"], - aliases: ["Property", "Private"], - fields: { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - value: { - validate: (0, _utils.assertNodeType)("Expression"), - optional: true - }, - decorators: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))), - optional: true - } - } -}); -(0, _utils.default)("ClassPrivateMethod", { - builder: ["kind", "key", "params", "body", "static"], - visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"], - aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"], - fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, { - key: { - validate: (0, _utils.assertNodeType)("PrivateName") - }, - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - }) -}); -(0, _utils.default)("Import", { - aliases: ["Expression"] -}); -(0, _utils.default)("Decorator", { - visitor: ["expression"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("DoExpression", { - visitor: ["body"], - aliases: ["Expression"], - fields: { - body: { - validate: (0, _utils.assertNodeType)("BlockStatement") - } - } -}); -(0, _utils.default)("ExportDefaultSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("ExportNamespaceSpecifier", { - visitor: ["exported"], - aliases: ["ModuleSpecifier"], - fields: { - exported: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("PrivateName", { - visitor: ["id"], - aliases: ["Private"], - fields: { - id: { - validate: (0, _utils.assertNodeType)("Identifier") - } - } -}); -(0, _utils.default)("BigIntLiteral", { - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - }, - aliases: ["Expression", "Pureish", "Literal", "Immutable"] -}); -(0, _utils.default)("RecordExpression", { - visitor: ["properties"], - aliases: ["Expression"], - fields: { - properties: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "ObjectMethod", "SpreadElement"))) - } - } -}); -(0, _utils.default)("TupleExpression", { - fields: { - elements: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))), - default: [] - } - }, - visitor: ["elements"], - aliases: ["Expression"] -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/flow.js b/packages/common/node_modules/@babel/types/lib/definitions/flow.js deleted file mode 100644 index a6d74d7aa4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/flow.js +++ /dev/null @@ -1,461 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => { - (0, _utils.default)(name, { - builder: ["id", "typeParameters", "extends", "body"], - visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)(typeParameterType), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } - }); -}; - -(0, _utils.default)("AnyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ArrayTypeAnnotation", { - visitor: ["elementType"], - aliases: ["Flow", "FlowType"], - fields: { - elementType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("BooleanTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("BooleanLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("NullLiteralTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ClassImplements", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("DeclareClass"); -(0, _utils.default)("DeclareFunction", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - predicate: (0, _utils.validateOptionalType)("DeclaredPredicate") - } -}); -defineInterfaceishType("DeclareInterface"); -(0, _utils.default)("DeclareModule", { - builder: ["id", "body", "kind"], - visitor: ["id", "body"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)("BlockStatement"), - kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES")) - } -}); -(0, _utils.default)("DeclareModuleExports", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("DeclareTypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("DeclareOpaqueType", { - visitor: ["id", "typeParameters", "supertype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType") - } -}); -(0, _utils.default)("DeclareVariable", { - visitor: ["id"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("DeclareExportDeclaration", { - visitor: ["declaration", "specifiers", "source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - declaration: (0, _utils.validateOptionalType)("Flow"), - specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])), - source: (0, _utils.validateOptionalType)("StringLiteral"), - default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("DeclareExportAllDeclaration", { - visitor: ["source"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - source: (0, _utils.validateType)("StringLiteral"), - exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")) - } -}); -(0, _utils.default)("DeclaredPredicate", { - visitor: ["value"], - aliases: ["Flow", "FlowPredicate"], - fields: { - value: (0, _utils.validateType)("Flow") - } -}); -(0, _utils.default)("ExistsTypeAnnotation", { - aliases: ["Flow", "FlowType"] -}); -(0, _utils.default)("FunctionTypeAnnotation", { - visitor: ["typeParameters", "params", "rest", "returnType"], - aliases: ["Flow", "FlowType"], - fields: { - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")), - rest: (0, _utils.validateOptionalType)("FunctionTypeParam"), - returnType: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("FunctionTypeParam", { - visitor: ["name", "typeAnnotation"], - aliases: ["Flow"], - fields: { - name: (0, _utils.validateOptionalType)("Identifier"), - typeAnnotation: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("GenericTypeAnnotation", { - visitor: ["id", "typeParameters"], - aliases: ["Flow", "FlowType"], - fields: { - id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -(0, _utils.default)("InferredPredicate", { - aliases: ["Flow", "FlowPredicate"] -}); -(0, _utils.default)("InterfaceExtends", { - visitor: ["id", "typeParameters"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation") - } -}); -defineInterfaceishType("InterfaceDeclaration"); -(0, _utils.default)("InterfaceTypeAnnotation", { - visitor: ["extends", "body"], - aliases: ["Flow", "FlowType"], - fields: { - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")), - body: (0, _utils.validateType)("ObjectTypeAnnotation") - } -}); -(0, _utils.default)("IntersectionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("MixedTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("EmptyTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("NullableTypeAnnotation", { - visitor: ["typeAnnotation"], - aliases: ["Flow", "FlowType"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("NumberLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("number")) - } -}); -(0, _utils.default)("NumberTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ObjectTypeAnnotation", { - visitor: ["properties", "indexers", "callProperties", "internalSlots"], - aliases: ["Flow", "FlowType"], - builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"], - fields: { - properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])), - indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")), - callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")), - internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")), - exact: { - validate: (0, _utils.assertValueType)("boolean"), - default: false - }, - inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeInternalSlot", { - visitor: ["id", "value", "optional", "static", "method"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateType)("Identifier"), - value: (0, _utils.validateType)("FlowType"), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - method: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeCallProperty", { - visitor: ["value"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")) - } -}); -(0, _utils.default)("ObjectTypeIndexer", { - visitor: ["id", "key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - id: (0, _utils.validateOptionalType)("Identifier"), - key: (0, _utils.validateType)("FlowType"), - value: (0, _utils.validateType)("FlowType"), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeProperty", { - visitor: ["key", "value", "variance"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - key: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - value: (0, _utils.validateType)("FlowType"), - kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")), - static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("ObjectTypeSpreadProperty", { - visitor: ["argument"], - aliases: ["Flow", "UserWhitespacable"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("OpaqueType", { - visitor: ["id", "typeParameters", "supertype", "impltype"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - supertype: (0, _utils.validateOptionalType)("FlowType"), - impltype: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("QualifiedTypeIdentifier", { - visitor: ["id", "qualification"], - aliases: ["Flow"], - fields: { - id: (0, _utils.validateType)("Identifier"), - qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]) - } -}); -(0, _utils.default)("StringLiteralTypeAnnotation", { - builder: ["value"], - aliases: ["Flow", "FlowType"], - fields: { - value: (0, _utils.validate)((0, _utils.assertValueType)("string")) - } -}); -(0, _utils.default)("StringTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("SymbolTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("ThisTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("TupleTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("TypeofTypeAnnotation", { - visitor: ["argument"], - aliases: ["Flow", "FlowType"], - fields: { - argument: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAlias", { - visitor: ["id", "typeParameters", "right"], - aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], - fields: { - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"), - right: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeAnnotation", { - aliases: ["Flow"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("FlowType") - } -}); -(0, _utils.default)("TypeCastExpression", { - visitor: ["expression", "typeAnnotation"], - aliases: ["Flow", "ExpressionWrapper", "Expression"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TypeAnnotation") - } -}); -(0, _utils.default)("TypeParameter", { - aliases: ["Flow"], - visitor: ["bound", "default", "variance"], - fields: { - name: (0, _utils.validate)((0, _utils.assertValueType)("string")), - bound: (0, _utils.validateOptionalType)("TypeAnnotation"), - default: (0, _utils.validateOptionalType)("FlowType"), - variance: (0, _utils.validateOptionalType)("Variance") - } -}); -(0, _utils.default)("TypeParameterDeclaration", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter")) - } -}); -(0, _utils.default)("TypeParameterInstantiation", { - aliases: ["Flow"], - visitor: ["params"], - fields: { - params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("UnionTypeAnnotation", { - visitor: ["types"], - aliases: ["Flow", "FlowType"], - fields: { - types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType")) - } -}); -(0, _utils.default)("Variance", { - aliases: ["Flow"], - builder: ["kind"], - fields: { - kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus")) - } -}); -(0, _utils.default)("VoidTypeAnnotation", { - aliases: ["Flow", "FlowType", "FlowBaseAnnotation"] -}); -(0, _utils.default)("EnumDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "body"], - fields: { - id: (0, _utils.validateType)("Identifier"), - body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"]) - } -}); -(0, _utils.default)("EnumBooleanBody", { - aliases: ["EnumBody"], - visitor: ["members"], - fields: { - explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - members: (0, _utils.validateArrayOfType)("EnumBooleanMember") - } -}); -(0, _utils.default)("EnumNumberBody", { - aliases: ["EnumBody"], - visitor: ["members"], - fields: { - explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - members: (0, _utils.validateArrayOfType)("EnumNumberMember") - } -}); -(0, _utils.default)("EnumStringBody", { - aliases: ["EnumBody"], - visitor: ["members"], - fields: { - explicit: (0, _utils.validate)((0, _utils.assertValueType)("boolean")), - members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]) - } -}); -(0, _utils.default)("EnumSymbolBody", { - aliases: ["EnumBody"], - visitor: ["members"], - fields: { - members: (0, _utils.validateArrayOfType)("EnumDefaultedMember") - } -}); -(0, _utils.default)("EnumBooleanMember", { - aliases: ["EnumMember"], - visitor: ["id"], - fields: { - id: (0, _utils.validateType)("Identifier"), - init: (0, _utils.validateType)("BooleanLiteral") - } -}); -(0, _utils.default)("EnumNumberMember", { - aliases: ["EnumMember"], - visitor: ["id", "init"], - fields: { - id: (0, _utils.validateType)("Identifier"), - init: (0, _utils.validateType)("NumericLiteral") - } -}); -(0, _utils.default)("EnumStringMember", { - aliases: ["EnumMember"], - visitor: ["id", "init"], - fields: { - id: (0, _utils.validateType)("Identifier"), - init: (0, _utils.validateType)("StringLiteral") - } -}); -(0, _utils.default)("EnumDefaultedMember", { - aliases: ["EnumMember"], - visitor: ["id"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/index.js b/packages/common/node_modules/@babel/types/lib/definitions/index.js deleted file mode 100644 index 84ca38761e..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/index.js +++ /dev/null @@ -1,99 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "VISITOR_KEYS", { - enumerable: true, - get: function () { - return _utils.VISITOR_KEYS; - } -}); -Object.defineProperty(exports, "ALIAS_KEYS", { - enumerable: true, - get: function () { - return _utils.ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", { - enumerable: true, - get: function () { - return _utils.FLIPPED_ALIAS_KEYS; - } -}); -Object.defineProperty(exports, "NODE_FIELDS", { - enumerable: true, - get: function () { - return _utils.NODE_FIELDS; - } -}); -Object.defineProperty(exports, "BUILDER_KEYS", { - enumerable: true, - get: function () { - return _utils.BUILDER_KEYS; - } -}); -Object.defineProperty(exports, "DEPRECATED_KEYS", { - enumerable: true, - get: function () { - return _utils.DEPRECATED_KEYS; - } -}); -Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", { - enumerable: true, - get: function () { - return _utils.NODE_PARENT_VALIDATIONS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS_ALIAS; - } -}); -Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", { - enumerable: true, - get: function () { - return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS; - } -}); -exports.TYPES = void 0; - -var _toFastProperties = _interopRequireDefault(require("to-fast-properties")); - -require("./core"); - -require("./es2015"); - -require("./flow"); - -require("./jsx"); - -require("./misc"); - -require("./experimental"); - -require("./typescript"); - -var _utils = require("./utils"); - -var _placeholders = require("./placeholders"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -(0, _toFastProperties.default)(_utils.VISITOR_KEYS); -(0, _toFastProperties.default)(_utils.ALIAS_KEYS); -(0, _toFastProperties.default)(_utils.FLIPPED_ALIAS_KEYS); -(0, _toFastProperties.default)(_utils.NODE_FIELDS); -(0, _toFastProperties.default)(_utils.BUILDER_KEYS); -(0, _toFastProperties.default)(_utils.DEPRECATED_KEYS); -(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_ALIAS); -(0, _toFastProperties.default)(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); -const TYPES = Object.keys(_utils.VISITOR_KEYS).concat(Object.keys(_utils.FLIPPED_ALIAS_KEYS)).concat(Object.keys(_utils.DEPRECATED_KEYS)); -exports.TYPES = TYPES; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/jsx.js b/packages/common/node_modules/@babel/types/lib/definitions/jsx.js deleted file mode 100644 index c7009414d8..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/jsx.js +++ /dev/null @@ -1,161 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -(0, _utils.default)("JSXAttribute", { - visitor: ["name", "value"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName") - }, - value: { - optional: true, - validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer") - } - } -}); -(0, _utils.default)("JSXClosingElement", { - visitor: ["name"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") - } - } -}); -(0, _utils.default)("JSXElement", { - builder: ["openingElement", "closingElement", "children", "selfClosing"], - visitor: ["openingElement", "children", "closingElement"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingElement: { - validate: (0, _utils.assertNodeType)("JSXOpeningElement") - }, - closingElement: { - optional: true, - validate: (0, _utils.assertNodeType)("JSXClosingElement") - }, - children: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) - } - } -}); -(0, _utils.default)("JSXEmptyExpression", { - aliases: ["JSX"] -}); -(0, _utils.default)("JSXExpressionContainer", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression") - } - } -}); -(0, _utils.default)("JSXSpreadChild", { - visitor: ["expression"], - aliases: ["JSX", "Immutable"], - fields: { - expression: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXIdentifier", { - builder: ["name"], - aliases: ["JSX"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("JSXMemberExpression", { - visitor: ["object", "property"], - aliases: ["JSX"], - fields: { - object: { - validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier") - }, - property: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - } - } -}); -(0, _utils.default)("JSXNamespacedName", { - visitor: ["namespace", "name"], - aliases: ["JSX"], - fields: { - namespace: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - }, - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier") - } - } -}); -(0, _utils.default)("JSXOpeningElement", { - builder: ["name", "attributes", "selfClosing"], - visitor: ["name", "attributes"], - aliases: ["JSX", "Immutable"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName") - }, - selfClosing: { - default: false - }, - attributes: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute"))) - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"), - optional: true - } - } -}); -(0, _utils.default)("JSXSpreadAttribute", { - visitor: ["argument"], - aliases: ["JSX"], - fields: { - argument: { - validate: (0, _utils.assertNodeType)("Expression") - } - } -}); -(0, _utils.default)("JSXText", { - aliases: ["JSX", "Immutable"], - builder: ["value"], - fields: { - value: { - validate: (0, _utils.assertValueType)("string") - } - } -}); -(0, _utils.default)("JSXFragment", { - builder: ["openingFragment", "closingFragment", "children"], - visitor: ["openingFragment", "children", "closingFragment"], - aliases: ["JSX", "Immutable", "Expression"], - fields: { - openingFragment: { - validate: (0, _utils.assertNodeType)("JSXOpeningFragment") - }, - closingFragment: { - validate: (0, _utils.assertNodeType)("JSXClosingFragment") - }, - children: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment"))) - } - } -}); -(0, _utils.default)("JSXOpeningFragment", { - aliases: ["JSX", "Immutable"] -}); -(0, _utils.default)("JSXClosingFragment", { - aliases: ["JSX", "Immutable"] -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/misc.js b/packages/common/node_modules/@babel/types/lib/definitions/misc.js deleted file mode 100644 index f72c651151..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/misc.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _placeholders = require("./placeholders"); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -(0, _utils.default)("Noop", { - visitor: [] -}); -(0, _utils.default)("Placeholder", { - visitor: [], - builder: ["expectedNode", "name"], - fields: { - name: { - validate: (0, _utils.assertNodeType)("Identifier") - }, - expectedNode: { - validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS) - } - } -}); -(0, _utils.default)("V8IntrinsicIdentifier", { - builder: ["name"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - } - } -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js b/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js deleted file mode 100644 index 0edf7b2e80..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/placeholders.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; - -var _utils = require("./utils"); - -const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; -exports.PLACEHOLDERS = PLACEHOLDERS; -const PLACEHOLDERS_ALIAS = { - Declaration: ["Statement"], - Pattern: ["PatternLike", "LVal"] -}; -exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; - -for (const type of PLACEHOLDERS) { - const alias = _utils.ALIAS_KEYS[type]; - if (alias && alias.length) PLACEHOLDERS_ALIAS[type] = alias; -} - -const PLACEHOLDERS_FLIPPED_ALIAS = {}; -exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; -Object.keys(PLACEHOLDERS_ALIAS).forEach(type => { - PLACEHOLDERS_ALIAS[type].forEach(alias => { - if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { - PLACEHOLDERS_FLIPPED_ALIAS[alias] = []; - } - - PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type); - }); -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/typescript.js b/packages/common/node_modules/@babel/types/lib/definitions/typescript.js deleted file mode 100644 index 531338f1fa..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/typescript.js +++ /dev/null @@ -1,417 +0,0 @@ -"use strict"; - -var _utils = _interopRequireWildcard(require("./utils")); - -var _core = require("./core"); - -var _es = require("./es2015"); - -function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const bool = (0, _utils.assertValueType)("boolean"); -const tSFunctionTypeAnnotationCommon = { - returnType: { - validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"), - optional: true - }, - typeParameters: { - validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"), - optional: true - } -}; -(0, _utils.default)("TSParameterProperty", { - aliases: ["LVal"], - visitor: ["parameter"], - fields: { - accessibility: { - validate: (0, _utils.assertOneOf)("public", "private", "protected"), - optional: true - }, - readonly: { - validate: (0, _utils.assertValueType)("boolean"), - optional: true - }, - parameter: { - validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern") - } - } -}); -(0, _utils.default)("TSDeclareFunction", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "params", "returnType"], - fields: Object.assign({}, _core.functionDeclarationCommon, {}, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSDeclareMethod", { - visitor: ["decorators", "key", "typeParameters", "params", "returnType"], - fields: Object.assign({}, _es.classMethodOrDeclareMethodCommon, {}, tSFunctionTypeAnnotationCommon) -}); -(0, _utils.default)("TSQualifiedName", { - aliases: ["TSEntityName"], - visitor: ["left", "right"], - fields: { - left: (0, _utils.validateType)("TSEntityName"), - right: (0, _utils.validateType)("Identifier") - } -}); -const signatureDeclarationCommon = { - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - parameters: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") -}; -const callConstructSignatureDeclaration = { - aliases: ["TSTypeElement"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSCallSignatureDeclaration", callConstructSignatureDeclaration); -(0, _utils.default)("TSConstructSignatureDeclaration", callConstructSignatureDeclaration); -const namedTypeElementCommon = { - key: (0, _utils.validateType)("Expression"), - computed: (0, _utils.validate)(bool), - optional: (0, _utils.validateOptional)(bool) -}; -(0, _utils.default)("TSPropertySignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeAnnotation", "initializer"], - fields: Object.assign({}, namedTypeElementCommon, { - readonly: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), - initializer: (0, _utils.validateOptionalType)("Expression") - }) -}); -(0, _utils.default)("TSMethodSignature", { - aliases: ["TSTypeElement"], - visitor: ["key", "typeParameters", "parameters", "typeAnnotation"], - fields: Object.assign({}, signatureDeclarationCommon, {}, namedTypeElementCommon) -}); -(0, _utils.default)("TSIndexSignature", { - aliases: ["TSTypeElement"], - visitor: ["parameters", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - parameters: (0, _utils.validateArrayOfType)("Identifier"), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation") - } -}); -const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"]; - -for (const type of tsKeywordTypes) { - (0, _utils.default)(type, { - aliases: ["TSType"], - visitor: [], - fields: {} - }); -} - -(0, _utils.default)("TSThisType", { - aliases: ["TSType"], - visitor: [], - fields: {} -}); -const fnOrCtr = { - aliases: ["TSType"], - visitor: ["typeParameters", "parameters", "typeAnnotation"], - fields: signatureDeclarationCommon -}; -(0, _utils.default)("TSFunctionType", fnOrCtr); -(0, _utils.default)("TSConstructorType", fnOrCtr); -(0, _utils.default)("TSTypeReference", { - aliases: ["TSType"], - visitor: ["typeName", "typeParameters"], - fields: { - typeName: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSTypePredicate", { - aliases: ["TSType"], - visitor: ["parameterName", "typeAnnotation"], - builder: ["parameterName", "typeAnnotation", "asserts"], - fields: { - parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]), - typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), - asserts: (0, _utils.validateOptional)(bool) - } -}); -(0, _utils.default)("TSTypeQuery", { - aliases: ["TSType"], - visitor: ["exprName"], - fields: { - exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"]) - } -}); -(0, _utils.default)("TSTypeLiteral", { - aliases: ["TSType"], - visitor: ["members"], - fields: { - members: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSArrayType", { - aliases: ["TSType"], - visitor: ["elementType"], - fields: { - elementType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTupleType", { - aliases: ["TSType"], - visitor: ["elementTypes"], - fields: { - elementTypes: (0, _utils.validateArrayOfType)("TSType") - } -}); -(0, _utils.default)("TSOptionalType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSRestType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -const unionOrIntersection = { - aliases: ["TSType"], - visitor: ["types"], - fields: { - types: (0, _utils.validateArrayOfType)("TSType") - } -}; -(0, _utils.default)("TSUnionType", unionOrIntersection); -(0, _utils.default)("TSIntersectionType", unionOrIntersection); -(0, _utils.default)("TSConditionalType", { - aliases: ["TSType"], - visitor: ["checkType", "extendsType", "trueType", "falseType"], - fields: { - checkType: (0, _utils.validateType)("TSType"), - extendsType: (0, _utils.validateType)("TSType"), - trueType: (0, _utils.validateType)("TSType"), - falseType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSInferType", { - aliases: ["TSType"], - visitor: ["typeParameter"], - fields: { - typeParameter: (0, _utils.validateType)("TSTypeParameter") - } -}); -(0, _utils.default)("TSParenthesizedType", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeOperator", { - aliases: ["TSType"], - visitor: ["typeAnnotation"], - fields: { - operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSIndexedAccessType", { - aliases: ["TSType"], - visitor: ["objectType", "indexType"], - fields: { - objectType: (0, _utils.validateType)("TSType"), - indexType: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSMappedType", { - aliases: ["TSType"], - visitor: ["typeParameter", "typeAnnotation"], - fields: { - readonly: (0, _utils.validateOptional)(bool), - typeParameter: (0, _utils.validateType)("TSTypeParameter"), - optional: (0, _utils.validateOptional)(bool), - typeAnnotation: (0, _utils.validateOptionalType)("TSType") - } -}); -(0, _utils.default)("TSLiteralType", { - aliases: ["TSType"], - visitor: ["literal"], - fields: { - literal: (0, _utils.validateType)(["NumericLiteral", "StringLiteral", "BooleanLiteral"]) - } -}); -(0, _utils.default)("TSExpressionWithTypeArguments", { - aliases: ["TSType"], - visitor: ["expression", "typeParameters"], - fields: { - expression: (0, _utils.validateType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSInterfaceDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "extends", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")), - body: (0, _utils.validateType)("TSInterfaceBody") - } -}); -(0, _utils.default)("TSInterfaceBody", { - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("TSTypeElement") - } -}); -(0, _utils.default)("TSTypeAliasDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "typeParameters", "typeAnnotation"], - fields: { - declare: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSAsExpression", { - aliases: ["Expression"], - visitor: ["expression", "typeAnnotation"], - fields: { - expression: (0, _utils.validateType)("Expression"), - typeAnnotation: (0, _utils.validateType)("TSType") - } -}); -(0, _utils.default)("TSTypeAssertion", { - aliases: ["Expression"], - visitor: ["typeAnnotation", "expression"], - fields: { - typeAnnotation: (0, _utils.validateType)("TSType"), - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSEnumDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "members"], - fields: { - declare: (0, _utils.validateOptional)(bool), - const: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)("Identifier"), - members: (0, _utils.validateArrayOfType)("TSEnumMember"), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSEnumMember", { - visitor: ["id", "initializer"], - fields: { - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - initializer: (0, _utils.validateOptionalType)("Expression") - } -}); -(0, _utils.default)("TSModuleDeclaration", { - aliases: ["Statement", "Declaration"], - visitor: ["id", "body"], - fields: { - declare: (0, _utils.validateOptional)(bool), - global: (0, _utils.validateOptional)(bool), - id: (0, _utils.validateType)(["Identifier", "StringLiteral"]), - body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"]) - } -}); -(0, _utils.default)("TSModuleBlock", { - aliases: ["Scopable", "Block", "BlockParent"], - visitor: ["body"], - fields: { - body: (0, _utils.validateArrayOfType)("Statement") - } -}); -(0, _utils.default)("TSImportType", { - aliases: ["TSType"], - visitor: ["argument", "qualifier", "typeParameters"], - fields: { - argument: (0, _utils.validateType)("StringLiteral"), - qualifier: (0, _utils.validateOptionalType)("TSEntityName"), - typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") - } -}); -(0, _utils.default)("TSImportEqualsDeclaration", { - aliases: ["Statement"], - visitor: ["id", "moduleReference"], - fields: { - isExport: (0, _utils.validate)(bool), - id: (0, _utils.validateType)("Identifier"), - moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]) - } -}); -(0, _utils.default)("TSExternalModuleReference", { - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("StringLiteral") - } -}); -(0, _utils.default)("TSNonNullExpression", { - aliases: ["Expression"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSExportAssignment", { - aliases: ["Statement"], - visitor: ["expression"], - fields: { - expression: (0, _utils.validateType)("Expression") - } -}); -(0, _utils.default)("TSNamespaceExportDeclaration", { - aliases: ["Statement"], - visitor: ["id"], - fields: { - id: (0, _utils.validateType)("Identifier") - } -}); -(0, _utils.default)("TSTypeAnnotation", { - visitor: ["typeAnnotation"], - fields: { - typeAnnotation: { - validate: (0, _utils.assertNodeType)("TSType") - } - } -}); -(0, _utils.default)("TSTypeParameterInstantiation", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType"))) - } - } -}); -(0, _utils.default)("TSTypeParameterDeclaration", { - visitor: ["params"], - fields: { - params: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter"))) - } - } -}); -(0, _utils.default)("TSTypeParameter", { - builder: ["constraint", "default", "name"], - visitor: ["constraint", "default"], - fields: { - name: { - validate: (0, _utils.assertValueType)("string") - }, - constraint: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - }, - default: { - validate: (0, _utils.assertNodeType)("TSType"), - optional: true - } - } -}); \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/definitions/utils.js b/packages/common/node_modules/@babel/types/lib/definitions/utils.js deleted file mode 100644 index ab1285fa6d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/definitions/utils.js +++ /dev/null @@ -1,315 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.typeIs = typeIs; -exports.validateType = validateType; -exports.validateOptional = validateOptional; -exports.validateOptionalType = validateOptionalType; -exports.arrayOf = arrayOf; -exports.arrayOfType = arrayOfType; -exports.validateArrayOfType = validateArrayOfType; -exports.assertEach = assertEach; -exports.assertOneOf = assertOneOf; -exports.assertNodeType = assertNodeType; -exports.assertNodeOrValueType = assertNodeOrValueType; -exports.assertValueType = assertValueType; -exports.assertShape = assertShape; -exports.assertOptionalChainStart = assertOptionalChainStart; -exports.chain = chain; -exports.default = defineType; -exports.NODE_PARENT_VALIDATIONS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.ALIAS_KEYS = exports.VISITOR_KEYS = void 0; - -var _is = _interopRequireDefault(require("../validators/is")); - -var _validate = require("../validators/validate"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const VISITOR_KEYS = {}; -exports.VISITOR_KEYS = VISITOR_KEYS; -const ALIAS_KEYS = {}; -exports.ALIAS_KEYS = ALIAS_KEYS; -const FLIPPED_ALIAS_KEYS = {}; -exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; -const NODE_FIELDS = {}; -exports.NODE_FIELDS = NODE_FIELDS; -const BUILDER_KEYS = {}; -exports.BUILDER_KEYS = BUILDER_KEYS; -const DEPRECATED_KEYS = {}; -exports.DEPRECATED_KEYS = DEPRECATED_KEYS; -const NODE_PARENT_VALIDATIONS = {}; -exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; - -function getType(val) { - if (Array.isArray(val)) { - return "array"; - } else if (val === null) { - return "null"; - } else { - return typeof val; - } -} - -function validate(validate) { - return { - validate - }; -} - -function typeIs(typeName) { - return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName); -} - -function validateType(typeName) { - return validate(typeIs(typeName)); -} - -function validateOptional(validate) { - return { - validate, - optional: true - }; -} - -function validateOptionalType(typeName) { - return { - validate: typeIs(typeName), - optional: true - }; -} - -function arrayOf(elementType) { - return chain(assertValueType("array"), assertEach(elementType)); -} - -function arrayOfType(typeName) { - return arrayOf(typeIs(typeName)); -} - -function validateArrayOfType(typeName) { - return validate(arrayOfType(typeName)); -} - -function assertEach(callback) { - function validator(node, key, val) { - if (!Array.isArray(val)) return; - - for (let i = 0; i < val.length; i++) { - const subkey = `${key}[${i}]`; - const v = val[i]; - callback(node, subkey, v); - if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v); - } - } - - validator.each = callback; - return validator; -} - -function assertOneOf(...values) { - function validate(node, key, val) { - if (values.indexOf(val) < 0) { - throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`); - } - } - - validate.oneOf = values; - return validate; -} - -function assertNodeType(...types) { - function validate(node, key, val) { - for (const type of types) { - if ((0, _is.default)(type, val)) { - (0, _validate.validateChild)(node, key, val); - return; - } - } - - throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val && val.type)}`); - } - - validate.oneOfNodeTypes = types; - return validate; -} - -function assertNodeOrValueType(...types) { - function validate(node, key, val) { - for (const type of types) { - if (getType(val) === type || (0, _is.default)(type, val)) { - (0, _validate.validateChild)(node, key, val); - return; - } - } - - throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val && val.type)}`); - } - - validate.oneOfNodeOrValueTypes = types; - return validate; -} - -function assertValueType(type) { - function validate(node, key, val) { - const valid = getType(val) === type; - - if (!valid) { - throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`); - } - } - - validate.type = type; - return validate; -} - -function assertShape(shape) { - function validate(node, key, val) { - const errors = []; - - for (const property of Object.keys(shape)) { - try { - (0, _validate.validateField)(node, property, val[property], shape[property]); - } catch (error) { - if (error instanceof TypeError) { - errors.push(error.message); - continue; - } - - throw error; - } - } - - if (errors.length) { - throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`); - } - } - - validate.shapeOf = shape; - return validate; -} - -function assertOptionalChainStart() { - function validate(node) { - var _current; - - let current = node; - - while (node) { - const { - type - } = current; - - if (type === "OptionalCallExpression") { - if (current.optional) return; - current = current.callee; - continue; - } - - if (type === "OptionalMemberExpression") { - if (current.optional) return; - current = current.object; - continue; - } - - break; - } - - throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`); - } - - return validate; -} - -function chain(...fns) { - function validate(...args) { - for (const fn of fns) { - fn(...args); - } - } - - validate.chainOf = fns; - return validate; -} - -const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"]; -const validFieldKeys = ["default", "optional", "validate"]; - -function defineType(type, opts = {}) { - const inherits = opts.inherits && store[opts.inherits] || {}; - let fields = opts.fields; - - if (!fields) { - fields = {}; - - if (inherits.fields) { - const keys = Object.getOwnPropertyNames(inherits.fields); - - for (const key of keys) { - const field = inherits.fields[key]; - fields[key] = { - default: field.default, - optional: field.optional, - validate: field.validate - }; - } - } - } - - const visitor = opts.visitor || inherits.visitor || []; - const aliases = opts.aliases || inherits.aliases || []; - const builder = opts.builder || inherits.builder || opts.visitor || []; - - for (const k of Object.keys(opts)) { - if (validTypeOpts.indexOf(k) === -1) { - throw new Error(`Unknown type option "${k}" on ${type}`); - } - } - - if (opts.deprecatedAlias) { - DEPRECATED_KEYS[opts.deprecatedAlias] = type; - } - - for (const key of visitor.concat(builder)) { - fields[key] = fields[key] || {}; - } - - for (const key of Object.keys(fields)) { - const field = fields[key]; - - if (field.default !== undefined && builder.indexOf(key) === -1) { - field.optional = true; - } - - if (field.default === undefined) { - field.default = null; - } else if (!field.validate && field.default != null) { - field.validate = assertValueType(getType(field.default)); - } - - for (const k of Object.keys(field)) { - if (validFieldKeys.indexOf(k) === -1) { - throw new Error(`Unknown field key "${k}" on ${type}.${key}`); - } - } - } - - VISITOR_KEYS[type] = opts.visitor = visitor; - BUILDER_KEYS[type] = opts.builder = builder; - NODE_FIELDS[type] = opts.fields = fields; - ALIAS_KEYS[type] = opts.aliases = aliases; - aliases.forEach(alias => { - FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || []; - FLIPPED_ALIAS_KEYS[alias].push(type); - }); - - if (opts.validate) { - NODE_PARENT_VALIDATIONS[type] = opts.validate; - } - - store[type] = opts; -} - -const store = {}; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/index.d.ts b/packages/common/node_modules/@babel/types/lib/index.d.ts deleted file mode 100644 index 6e6a2b572d..0000000000 --- a/packages/common/node_modules/@babel/types/lib/index.d.ts +++ /dev/null @@ -1,2555 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/typescript.js for script used. - -interface BaseComment { - value: string; - start: number; - end: number; - loc: SourceLocation; - type: "CommentBlock" | "CommentLine"; -} - -export interface CommentBlock extends BaseComment { - type: "CommentBlock"; -} - -export interface CommentLine extends BaseComment { - type: "CommentLine"; -} - -export type Comment = CommentBlock | CommentLine; - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -interface BaseNode { - leadingComments: ReadonlyArray | null; - innerComments: ReadonlyArray | null; - trailingComments: ReadonlyArray | null; - start: number | null; - end: number | null; - loc: SourceLocation | null; - type: Node["type"]; -} - -export type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | MixedTypeAnnotation | ModuleDeclaration | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Statement | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression; - -export interface ArrayExpression extends BaseNode { - type: "ArrayExpression"; - elements: Array; -} - -export interface AssignmentExpression extends BaseNode { - type: "AssignmentExpression"; - operator: string; - left: LVal; - right: Expression; -} - -export interface BinaryExpression extends BaseNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: Expression; - right: Expression; -} - -export interface InterpreterDirective extends BaseNode { - type: "InterpreterDirective"; - value: string; -} - -export interface Directive extends BaseNode { - type: "Directive"; - value: DirectiveLiteral; -} - -export interface DirectiveLiteral extends BaseNode { - type: "DirectiveLiteral"; - value: string; -} - -export interface BlockStatement extends BaseNode { - type: "BlockStatement"; - body: Array; - directives: Array; -} - -export interface BreakStatement extends BaseNode { - type: "BreakStatement"; - label: Identifier | null; -} - -export interface CallExpression extends BaseNode { - type: "CallExpression"; - callee: Expression | V8IntrinsicIdentifier; - arguments: Array; - optional: true | false | null; - typeArguments: TypeParameterInstantiation | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface CatchClause extends BaseNode { - type: "CatchClause"; - param: Identifier | ArrayPattern | ObjectPattern | null; - body: BlockStatement; -} - -export interface ConditionalExpression extends BaseNode { - type: "ConditionalExpression"; - test: Expression; - consequent: Expression; - alternate: Expression; -} - -export interface ContinueStatement extends BaseNode { - type: "ContinueStatement"; - label: Identifier | null; -} - -export interface DebuggerStatement extends BaseNode { - type: "DebuggerStatement"; -} - -export interface DoWhileStatement extends BaseNode { - type: "DoWhileStatement"; - test: Expression; - body: Statement; -} - -export interface EmptyStatement extends BaseNode { - type: "EmptyStatement"; -} - -export interface ExpressionStatement extends BaseNode { - type: "ExpressionStatement"; - expression: Expression; -} - -export interface File extends BaseNode { - type: "File"; - program: Program; - comments: any; - tokens: any; -} - -export interface ForInStatement extends BaseNode { - type: "ForInStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; -} - -export interface ForStatement extends BaseNode { - type: "ForStatement"; - init: VariableDeclaration | Expression | null; - test: Expression | null; - update: Expression | null; - body: Statement; -} - -export interface FunctionDeclaration extends BaseNode { - type: "FunctionDeclaration"; - id: Identifier | null; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - declare: boolean | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface FunctionExpression extends BaseNode { - type: "FunctionExpression"; - id: Identifier | null; - params: Array; - body: BlockStatement; - generator: boolean; - async: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface Identifier extends BaseNode { - type: "Identifier"; - name: any; - decorators: Array | null; - optional: boolean | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface IfStatement extends BaseNode { - type: "IfStatement"; - test: Expression; - consequent: Statement; - alternate: Statement | null; -} - -export interface LabeledStatement extends BaseNode { - type: "LabeledStatement"; - label: Identifier; - body: Statement; -} - -export interface StringLiteral extends BaseNode { - type: "StringLiteral"; - value: string; -} - -export interface NumericLiteral extends BaseNode { - type: "NumericLiteral"; - value: number; -} - -export interface NullLiteral extends BaseNode { - type: "NullLiteral"; -} - -export interface BooleanLiteral extends BaseNode { - type: "BooleanLiteral"; - value: boolean; -} - -export interface RegExpLiteral extends BaseNode { - type: "RegExpLiteral"; - pattern: string; - flags: any; -} - -export interface LogicalExpression extends BaseNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: Expression; - right: Expression; -} - -export interface MemberExpression extends BaseNode { - type: "MemberExpression"; - object: Expression; - property: any; - computed: boolean; - optional: true | false | null; -} - -export interface NewExpression extends BaseNode { - type: "NewExpression"; - callee: Expression | V8IntrinsicIdentifier; - arguments: Array; - optional: true | false | null; - typeArguments: TypeParameterInstantiation | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface Program extends BaseNode { - type: "Program"; - body: Array; - directives: Array; - sourceType: "script" | "module"; - interpreter: InterpreterDirective | null; - sourceFile: string; -} - -export interface ObjectExpression extends BaseNode { - type: "ObjectExpression"; - properties: Array; -} - -export interface ObjectMethod extends BaseNode { - type: "ObjectMethod"; - kind: "method" | "get" | "set"; - key: any; - params: Array; - body: BlockStatement; - computed: boolean; - generator: boolean; - async: boolean; - decorators: Array | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ObjectProperty extends BaseNode { - type: "ObjectProperty"; - key: any; - value: Expression | PatternLike; - computed: boolean; - shorthand: any; - decorators: Array | null; -} - -export interface RestElement extends BaseNode { - type: "RestElement"; - argument: LVal; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ReturnStatement extends BaseNode { - type: "ReturnStatement"; - argument: Expression | null; -} - -export interface SequenceExpression extends BaseNode { - type: "SequenceExpression"; - expressions: Array; -} - -export interface ParenthesizedExpression extends BaseNode { - type: "ParenthesizedExpression"; - expression: Expression; -} - -export interface SwitchCase extends BaseNode { - type: "SwitchCase"; - test: Expression | null; - consequent: Array; -} - -export interface SwitchStatement extends BaseNode { - type: "SwitchStatement"; - discriminant: Expression; - cases: Array; -} - -export interface ThisExpression extends BaseNode { - type: "ThisExpression"; -} - -export interface ThrowStatement extends BaseNode { - type: "ThrowStatement"; - argument: Expression; -} - -export interface TryStatement extends BaseNode { - type: "TryStatement"; - block: any; - handler: CatchClause | null; - finalizer: BlockStatement | null; -} - -export interface UnaryExpression extends BaseNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: Expression; - prefix: boolean; -} - -export interface UpdateExpression extends BaseNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: Expression; - prefix: boolean; -} - -export interface VariableDeclaration extends BaseNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare: boolean | null; -} - -export interface VariableDeclarator extends BaseNode { - type: "VariableDeclarator"; - id: LVal; - init: Expression | null; - definite: boolean | null; -} - -export interface WhileStatement extends BaseNode { - type: "WhileStatement"; - test: Expression; - body: Statement; -} - -export interface WithStatement extends BaseNode { - type: "WithStatement"; - object: Expression; - body: Statement; -} - -export interface AssignmentPattern extends BaseNode { - type: "AssignmentPattern"; - left: Identifier | ObjectPattern | ArrayPattern | MemberExpression; - right: Expression; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ArrayPattern extends BaseNode { - type: "ArrayPattern"; - elements: Array; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface ArrowFunctionExpression extends BaseNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BlockStatement | Expression; - async: boolean; - expression: boolean; - generator: boolean; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ClassBody extends BaseNode { - type: "ClassBody"; - body: Array; -} - -export interface ClassExpression extends BaseNode { - type: "ClassExpression"; - id: Identifier | null; - superClass: Expression | null; - body: ClassBody; - decorators: Array | null; - implements: Array | null; - mixins: any; - superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ClassDeclaration extends BaseNode { - type: "ClassDeclaration"; - id: any; - superClass: any; - body: any; - decorators: any; - abstract: boolean | null; - declare: boolean | null; - implements: any; - mixins: any; - superTypeParameters: any; - typeParameters: any; -} - -export interface ExportAllDeclaration extends BaseNode { - type: "ExportAllDeclaration"; - source: StringLiteral; -} - -export interface ExportDefaultDeclaration extends BaseNode { - type: "ExportDefaultDeclaration"; - declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression; -} - -export interface ExportNamedDeclaration extends BaseNode { - type: "ExportNamedDeclaration"; - declaration: any | null; - specifiers: Array; - source: StringLiteral | null; - exportKind: "type" | "value" | null; -} - -export interface ExportSpecifier extends BaseNode { - type: "ExportSpecifier"; - local: Identifier; - exported: Identifier; -} - -export interface ForOfStatement extends BaseNode { - type: "ForOfStatement"; - left: VariableDeclaration | LVal; - right: Expression; - body: Statement; - await: boolean; -} - -export interface ImportDeclaration extends BaseNode { - type: "ImportDeclaration"; - specifiers: Array; - source: StringLiteral; - importKind: "type" | "typeof" | "value" | null; -} - -export interface ImportDefaultSpecifier extends BaseNode { - type: "ImportDefaultSpecifier"; - local: Identifier; -} - -export interface ImportNamespaceSpecifier extends BaseNode { - type: "ImportNamespaceSpecifier"; - local: Identifier; -} - -export interface ImportSpecifier extends BaseNode { - type: "ImportSpecifier"; - local: Identifier; - imported: Identifier; - importKind: "type" | "typeof" | null; -} - -export interface MetaProperty extends BaseNode { - type: "MetaProperty"; - meta: any; - property: Identifier; -} - -export interface ClassMethod extends BaseNode { - type: "ClassMethod"; - kind: "get" | "set" | "method" | "constructor"; - key: Identifier | StringLiteral | NumericLiteral | Expression; - params: Array; - body: BlockStatement; - computed: boolean; - static: boolean; - generator: boolean; - async: boolean; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - decorators: Array | null; - optional: boolean | null; - returnType: TypeAnnotation | TSTypeAnnotation | Noop | null; - typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null; -} - -export interface ObjectPattern extends BaseNode { - type: "ObjectPattern"; - properties: Array; - decorators: Array | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; -} - -export interface SpreadElement extends BaseNode { - type: "SpreadElement"; - argument: Expression; -} - -export interface Super extends BaseNode { - type: "Super"; -} - -export interface TaggedTemplateExpression extends BaseNode { - type: "TaggedTemplateExpression"; - tag: Expression; - quasi: TemplateLiteral; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface TemplateElement extends BaseNode { - type: "TemplateElement"; - value: { raw: string, cooked?: string }; - tail: boolean; -} - -export interface TemplateLiteral extends BaseNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -export interface YieldExpression extends BaseNode { - type: "YieldExpression"; - argument: Expression | null; - delegate: any; -} - -export interface AnyTypeAnnotation extends BaseNode { - type: "AnyTypeAnnotation"; -} - -export interface ArrayTypeAnnotation extends BaseNode { - type: "ArrayTypeAnnotation"; - elementType: FlowType; -} - -export interface BooleanTypeAnnotation extends BaseNode { - type: "BooleanTypeAnnotation"; -} - -export interface BooleanLiteralTypeAnnotation extends BaseNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -export interface NullLiteralTypeAnnotation extends BaseNode { - type: "NullLiteralTypeAnnotation"; -} - -export interface ClassImplements extends BaseNode { - type: "ClassImplements"; - id: Identifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface DeclareClass extends BaseNode { - type: "DeclareClass"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - extends: Array | null; - body: ObjectTypeAnnotation; - implements: Array | null; - mixins: Array | null; -} - -export interface DeclareFunction extends BaseNode { - type: "DeclareFunction"; - id: Identifier; - predicate: DeclaredPredicate | null; -} - -export interface DeclareInterface extends BaseNode { - type: "DeclareInterface"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - extends: Array | null; - body: ObjectTypeAnnotation; - implements: Array | null; - mixins: Array | null; -} - -export interface DeclareModule extends BaseNode { - type: "DeclareModule"; - id: Identifier | StringLiteral; - body: BlockStatement; - kind: "CommonJS" | "ES" | null; -} - -export interface DeclareModuleExports extends BaseNode { - type: "DeclareModuleExports"; - typeAnnotation: TypeAnnotation; -} - -export interface DeclareTypeAlias extends BaseNode { - type: "DeclareTypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - right: FlowType; -} - -export interface DeclareOpaqueType extends BaseNode { - type: "DeclareOpaqueType"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - supertype: FlowType | null; -} - -export interface DeclareVariable extends BaseNode { - type: "DeclareVariable"; - id: Identifier; -} - -export interface DeclareExportDeclaration extends BaseNode { - type: "DeclareExportDeclaration"; - declaration: Flow | null; - specifiers: Array | null; - source: StringLiteral | null; - default: boolean | null; -} - -export interface DeclareExportAllDeclaration extends BaseNode { - type: "DeclareExportAllDeclaration"; - source: StringLiteral; - exportKind: "type" | "value" | null; -} - -export interface DeclaredPredicate extends BaseNode { - type: "DeclaredPredicate"; - value: Flow; -} - -export interface ExistsTypeAnnotation extends BaseNode { - type: "ExistsTypeAnnotation"; -} - -export interface FunctionTypeAnnotation extends BaseNode { - type: "FunctionTypeAnnotation"; - typeParameters: TypeParameterDeclaration | null; - params: Array; - rest: FunctionTypeParam | null; - returnType: FlowType; -} - -export interface FunctionTypeParam extends BaseNode { - type: "FunctionTypeParam"; - name: Identifier | null; - typeAnnotation: FlowType; - optional: boolean | null; -} - -export interface GenericTypeAnnotation extends BaseNode { - type: "GenericTypeAnnotation"; - id: Identifier | QualifiedTypeIdentifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface InferredPredicate extends BaseNode { - type: "InferredPredicate"; -} - -export interface InterfaceExtends extends BaseNode { - type: "InterfaceExtends"; - id: Identifier | QualifiedTypeIdentifier; - typeParameters: TypeParameterInstantiation | null; -} - -export interface InterfaceDeclaration extends BaseNode { - type: "InterfaceDeclaration"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - extends: Array | null; - body: ObjectTypeAnnotation; - implements: Array | null; - mixins: Array | null; -} - -export interface InterfaceTypeAnnotation extends BaseNode { - type: "InterfaceTypeAnnotation"; - extends: Array | null; - body: ObjectTypeAnnotation; -} - -export interface IntersectionTypeAnnotation extends BaseNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -export interface MixedTypeAnnotation extends BaseNode { - type: "MixedTypeAnnotation"; -} - -export interface EmptyTypeAnnotation extends BaseNode { - type: "EmptyTypeAnnotation"; -} - -export interface NullableTypeAnnotation extends BaseNode { - type: "NullableTypeAnnotation"; - typeAnnotation: FlowType; -} - -export interface NumberLiteralTypeAnnotation extends BaseNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -export interface NumberTypeAnnotation extends BaseNode { - type: "NumberTypeAnnotation"; -} - -export interface ObjectTypeAnnotation extends BaseNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers: Array | null; - callProperties: Array | null; - internalSlots: Array | null; - exact: boolean; - inexact: boolean | null; -} - -export interface ObjectTypeInternalSlot extends BaseNode { - type: "ObjectTypeInternalSlot"; - id: Identifier; - value: FlowType; - optional: boolean; - static: boolean; - method: boolean; -} - -export interface ObjectTypeCallProperty extends BaseNode { - type: "ObjectTypeCallProperty"; - value: FlowType; - static: boolean; -} - -export interface ObjectTypeIndexer extends BaseNode { - type: "ObjectTypeIndexer"; - id: Identifier | null; - key: FlowType; - value: FlowType; - variance: Variance | null; - static: boolean; -} - -export interface ObjectTypeProperty extends BaseNode { - type: "ObjectTypeProperty"; - key: Identifier | StringLiteral; - value: FlowType; - variance: Variance | null; - kind: "init" | "get" | "set"; - optional: boolean; - proto: boolean; - static: boolean; -} - -export interface ObjectTypeSpreadProperty extends BaseNode { - type: "ObjectTypeSpreadProperty"; - argument: FlowType; -} - -export interface OpaqueType extends BaseNode { - type: "OpaqueType"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - supertype: FlowType | null; - impltype: FlowType; -} - -export interface QualifiedTypeIdentifier extends BaseNode { - type: "QualifiedTypeIdentifier"; - id: Identifier; - qualification: Identifier | QualifiedTypeIdentifier; -} - -export interface StringLiteralTypeAnnotation extends BaseNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -export interface StringTypeAnnotation extends BaseNode { - type: "StringTypeAnnotation"; -} - -export interface SymbolTypeAnnotation extends BaseNode { - type: "SymbolTypeAnnotation"; -} - -export interface ThisTypeAnnotation extends BaseNode { - type: "ThisTypeAnnotation"; -} - -export interface TupleTypeAnnotation extends BaseNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -export interface TypeofTypeAnnotation extends BaseNode { - type: "TypeofTypeAnnotation"; - argument: FlowType; -} - -export interface TypeAlias extends BaseNode { - type: "TypeAlias"; - id: Identifier; - typeParameters: TypeParameterDeclaration | null; - right: FlowType; -} - -export interface TypeAnnotation extends BaseNode { - type: "TypeAnnotation"; - typeAnnotation: FlowType; -} - -export interface TypeCastExpression extends BaseNode { - type: "TypeCastExpression"; - expression: Expression; - typeAnnotation: TypeAnnotation; -} - -export interface TypeParameter extends BaseNode { - type: "TypeParameter"; - bound: TypeAnnotation | null; - default: FlowType | null; - variance: Variance | null; - name: string; -} - -export interface TypeParameterDeclaration extends BaseNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -export interface TypeParameterInstantiation extends BaseNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -export interface UnionTypeAnnotation extends BaseNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -export interface Variance extends BaseNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -export interface VoidTypeAnnotation extends BaseNode { - type: "VoidTypeAnnotation"; -} - -export interface EnumDeclaration extends BaseNode { - type: "EnumDeclaration"; - id: Identifier; - body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; -} - -export interface EnumBooleanBody extends BaseNode { - type: "EnumBooleanBody"; - members: Array; - explicit: boolean; -} - -export interface EnumNumberBody extends BaseNode { - type: "EnumNumberBody"; - members: Array; - explicit: boolean; -} - -export interface EnumStringBody extends BaseNode { - type: "EnumStringBody"; - members: Array; - explicit: boolean; -} - -export interface EnumSymbolBody extends BaseNode { - type: "EnumSymbolBody"; - members: Array; -} - -export interface EnumBooleanMember extends BaseNode { - type: "EnumBooleanMember"; - id: Identifier; - init: BooleanLiteral; -} - -export interface EnumNumberMember extends BaseNode { - type: "EnumNumberMember"; - id: Identifier; - init: NumericLiteral; -} - -export interface EnumStringMember extends BaseNode { - type: "EnumStringMember"; - id: Identifier; - init: StringLiteral; -} - -export interface EnumDefaultedMember extends BaseNode { - type: "EnumDefaultedMember"; - id: Identifier; -} - -export interface JSXAttribute extends BaseNode { - type: "JSXAttribute"; - name: JSXIdentifier | JSXNamespacedName; - value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null; -} - -export interface JSXClosingElement extends BaseNode { - type: "JSXClosingElement"; - name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; -} - -export interface JSXElement extends BaseNode { - type: "JSXElement"; - openingElement: JSXOpeningElement; - closingElement: JSXClosingElement | null; - children: Array; - selfClosing: any; -} - -export interface JSXEmptyExpression extends BaseNode { - type: "JSXEmptyExpression"; -} - -export interface JSXExpressionContainer extends BaseNode { - type: "JSXExpressionContainer"; - expression: Expression | JSXEmptyExpression; -} - -export interface JSXSpreadChild extends BaseNode { - type: "JSXSpreadChild"; - expression: Expression; -} - -export interface JSXIdentifier extends BaseNode { - type: "JSXIdentifier"; - name: string; -} - -export interface JSXMemberExpression extends BaseNode { - type: "JSXMemberExpression"; - object: JSXMemberExpression | JSXIdentifier; - property: JSXIdentifier; -} - -export interface JSXNamespacedName extends BaseNode { - type: "JSXNamespacedName"; - namespace: JSXIdentifier; - name: JSXIdentifier; -} - -export interface JSXOpeningElement extends BaseNode { - type: "JSXOpeningElement"; - name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName; - attributes: Array; - selfClosing: boolean; - typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null; -} - -export interface JSXSpreadAttribute extends BaseNode { - type: "JSXSpreadAttribute"; - argument: Expression; -} - -export interface JSXText extends BaseNode { - type: "JSXText"; - value: string; -} - -export interface JSXFragment extends BaseNode { - type: "JSXFragment"; - openingFragment: JSXOpeningFragment; - closingFragment: JSXClosingFragment; - children: Array; -} - -export interface JSXOpeningFragment extends BaseNode { - type: "JSXOpeningFragment"; -} - -export interface JSXClosingFragment extends BaseNode { - type: "JSXClosingFragment"; -} - -export interface Noop extends BaseNode { - type: "Noop"; -} - -export interface Placeholder extends BaseNode { - type: "Placeholder"; - expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; - name: Identifier; -} - -export interface V8IntrinsicIdentifier extends BaseNode { - type: "V8IntrinsicIdentifier"; - name: string; -} - -export interface ArgumentPlaceholder extends BaseNode { - type: "ArgumentPlaceholder"; -} - -export interface AwaitExpression extends BaseNode { - type: "AwaitExpression"; - argument: Expression; -} - -export interface BindExpression extends BaseNode { - type: "BindExpression"; - object: any; - callee: any; -} - -export interface ClassProperty extends BaseNode { - type: "ClassProperty"; - key: Identifier | StringLiteral | NumericLiteral | Expression; - value: Expression | null; - typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null; - decorators: Array | null; - computed: boolean; - static: boolean; - abstract: boolean | null; - accessibility: "public" | "private" | "protected" | null; - declare: boolean | null; - definite: boolean | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface OptionalMemberExpression extends BaseNode { - type: "OptionalMemberExpression"; - object: Expression; - property: any; - computed: boolean; - optional: boolean; -} - -export interface PipelineTopicExpression extends BaseNode { - type: "PipelineTopicExpression"; - expression: Expression; -} - -export interface PipelineBareFunction extends BaseNode { - type: "PipelineBareFunction"; - callee: Expression; -} - -export interface PipelinePrimaryTopicReference extends BaseNode { - type: "PipelinePrimaryTopicReference"; -} - -export interface OptionalCallExpression extends BaseNode { - type: "OptionalCallExpression"; - callee: Expression; - arguments: Array; - optional: boolean; - typeArguments: TypeParameterInstantiation | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface ClassPrivateProperty extends BaseNode { - type: "ClassPrivateProperty"; - key: PrivateName; - value: Expression | null; - decorators: Array | null; -} - -export interface ClassPrivateMethod extends BaseNode { - type: "ClassPrivateMethod"; - kind: "get" | "set" | "method" | "constructor"; - key: PrivateName; - params: Array; - body: BlockStatement; - static: boolean; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - computed: boolean; - decorators: Array | null; - generator: boolean; - optional: boolean | null; - returnType: any; - typeParameters: any; -} - -export interface Import extends BaseNode { - type: "Import"; -} - -export interface Decorator extends BaseNode { - type: "Decorator"; - expression: Expression; -} - -export interface DoExpression extends BaseNode { - type: "DoExpression"; - body: BlockStatement; -} - -export interface ExportDefaultSpecifier extends BaseNode { - type: "ExportDefaultSpecifier"; - exported: Identifier; -} - -export interface ExportNamespaceSpecifier extends BaseNode { - type: "ExportNamespaceSpecifier"; - exported: Identifier; -} - -export interface PrivateName extends BaseNode { - type: "PrivateName"; - id: Identifier; -} - -export interface BigIntLiteral extends BaseNode { - type: "BigIntLiteral"; - value: string; -} - -export interface RecordExpression extends BaseNode { - type: "RecordExpression"; - properties: Array; -} - -export interface TupleExpression extends BaseNode { - type: "TupleExpression"; - elements: Array; -} - -export interface TSParameterProperty extends BaseNode { - type: "TSParameterProperty"; - parameter: Identifier | AssignmentPattern; - accessibility: "public" | "private" | "protected" | null; - readonly: boolean | null; -} - -export interface TSDeclareFunction extends BaseNode { - type: "TSDeclareFunction"; - id: Identifier | null; - typeParameters: TSTypeParameterDeclaration | Noop | null; - params: Array; - returnType: TSTypeAnnotation | Noop | null; - async: boolean; - declare: boolean | null; - generator: boolean; -} - -export interface TSDeclareMethod extends BaseNode { - type: "TSDeclareMethod"; - decorators: Array | null; - key: Identifier | StringLiteral | NumericLiteral | Expression; - typeParameters: TSTypeParameterDeclaration | Noop | null; - params: Array; - returnType: TSTypeAnnotation | Noop | null; - abstract: boolean | null; - access: "public" | "private" | "protected" | null; - accessibility: "public" | "private" | "protected" | null; - async: boolean; - computed: boolean; - generator: boolean; - kind: "get" | "set" | "method" | "constructor"; - optional: boolean | null; - static: boolean; -} - -export interface TSQualifiedName extends BaseNode { - type: "TSQualifiedName"; - left: TSEntityName; - right: Identifier; -} - -export interface TSCallSignatureDeclaration extends BaseNode { - type: "TSCallSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSConstructSignatureDeclaration extends BaseNode { - type: "TSConstructSignatureDeclaration"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSPropertySignature extends BaseNode { - type: "TSPropertySignature"; - key: Expression; - typeAnnotation: TSTypeAnnotation | null; - initializer: Expression | null; - computed: boolean | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface TSMethodSignature extends BaseNode { - type: "TSMethodSignature"; - key: Expression; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; - computed: boolean | null; - optional: boolean | null; -} - -export interface TSIndexSignature extends BaseNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; - readonly: boolean | null; -} - -export interface TSAnyKeyword extends BaseNode { - type: "TSAnyKeyword"; -} - -export interface TSBooleanKeyword extends BaseNode { - type: "TSBooleanKeyword"; -} - -export interface TSBigIntKeyword extends BaseNode { - type: "TSBigIntKeyword"; -} - -export interface TSNeverKeyword extends BaseNode { - type: "TSNeverKeyword"; -} - -export interface TSNullKeyword extends BaseNode { - type: "TSNullKeyword"; -} - -export interface TSNumberKeyword extends BaseNode { - type: "TSNumberKeyword"; -} - -export interface TSObjectKeyword extends BaseNode { - type: "TSObjectKeyword"; -} - -export interface TSStringKeyword extends BaseNode { - type: "TSStringKeyword"; -} - -export interface TSSymbolKeyword extends BaseNode { - type: "TSSymbolKeyword"; -} - -export interface TSUndefinedKeyword extends BaseNode { - type: "TSUndefinedKeyword"; -} - -export interface TSUnknownKeyword extends BaseNode { - type: "TSUnknownKeyword"; -} - -export interface TSVoidKeyword extends BaseNode { - type: "TSVoidKeyword"; -} - -export interface TSThisType extends BaseNode { - type: "TSThisType"; -} - -export interface TSFunctionType extends BaseNode { - type: "TSFunctionType"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSConstructorType extends BaseNode { - type: "TSConstructorType"; - typeParameters: TSTypeParameterDeclaration | null; - parameters: Array; - typeAnnotation: TSTypeAnnotation | null; -} - -export interface TSTypeReference extends BaseNode { - type: "TSTypeReference"; - typeName: TSEntityName; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSTypePredicate extends BaseNode { - type: "TSTypePredicate"; - parameterName: Identifier | TSThisType; - typeAnnotation: TSTypeAnnotation | null; - asserts: boolean | null; -} - -export interface TSTypeQuery extends BaseNode { - type: "TSTypeQuery"; - exprName: TSEntityName | TSImportType; -} - -export interface TSTypeLiteral extends BaseNode { - type: "TSTypeLiteral"; - members: Array; -} - -export interface TSArrayType extends BaseNode { - type: "TSArrayType"; - elementType: TSType; -} - -export interface TSTupleType extends BaseNode { - type: "TSTupleType"; - elementTypes: Array; -} - -export interface TSOptionalType extends BaseNode { - type: "TSOptionalType"; - typeAnnotation: TSType; -} - -export interface TSRestType extends BaseNode { - type: "TSRestType"; - typeAnnotation: TSType; -} - -export interface TSUnionType extends BaseNode { - type: "TSUnionType"; - types: Array; -} - -export interface TSIntersectionType extends BaseNode { - type: "TSIntersectionType"; - types: Array; -} - -export interface TSConditionalType extends BaseNode { - type: "TSConditionalType"; - checkType: TSType; - extendsType: TSType; - trueType: TSType; - falseType: TSType; -} - -export interface TSInferType extends BaseNode { - type: "TSInferType"; - typeParameter: TSTypeParameter; -} - -export interface TSParenthesizedType extends BaseNode { - type: "TSParenthesizedType"; - typeAnnotation: TSType; -} - -export interface TSTypeOperator extends BaseNode { - type: "TSTypeOperator"; - typeAnnotation: TSType; - operator: string; -} - -export interface TSIndexedAccessType extends BaseNode { - type: "TSIndexedAccessType"; - objectType: TSType; - indexType: TSType; -} - -export interface TSMappedType extends BaseNode { - type: "TSMappedType"; - typeParameter: TSTypeParameter; - typeAnnotation: TSType | null; - optional: boolean | null; - readonly: boolean | null; -} - -export interface TSLiteralType extends BaseNode { - type: "TSLiteralType"; - literal: NumericLiteral | StringLiteral | BooleanLiteral; -} - -export interface TSExpressionWithTypeArguments extends BaseNode { - type: "TSExpressionWithTypeArguments"; - expression: TSEntityName; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSInterfaceDeclaration extends BaseNode { - type: "TSInterfaceDeclaration"; - id: Identifier; - typeParameters: TSTypeParameterDeclaration | null; - extends: Array | null; - body: TSInterfaceBody; - declare: boolean | null; -} - -export interface TSInterfaceBody extends BaseNode { - type: "TSInterfaceBody"; - body: Array; -} - -export interface TSTypeAliasDeclaration extends BaseNode { - type: "TSTypeAliasDeclaration"; - id: Identifier; - typeParameters: TSTypeParameterDeclaration | null; - typeAnnotation: TSType; - declare: boolean | null; -} - -export interface TSAsExpression extends BaseNode { - type: "TSAsExpression"; - expression: Expression; - typeAnnotation: TSType; -} - -export interface TSTypeAssertion extends BaseNode { - type: "TSTypeAssertion"; - typeAnnotation: TSType; - expression: Expression; -} - -export interface TSEnumDeclaration extends BaseNode { - type: "TSEnumDeclaration"; - id: Identifier; - members: Array; - const: boolean | null; - declare: boolean | null; - initializer: Expression | null; -} - -export interface TSEnumMember extends BaseNode { - type: "TSEnumMember"; - id: Identifier | StringLiteral; - initializer: Expression | null; -} - -export interface TSModuleDeclaration extends BaseNode { - type: "TSModuleDeclaration"; - id: Identifier | StringLiteral; - body: TSModuleBlock | TSModuleDeclaration; - declare: boolean | null; - global: boolean | null; -} - -export interface TSModuleBlock extends BaseNode { - type: "TSModuleBlock"; - body: Array; -} - -export interface TSImportType extends BaseNode { - type: "TSImportType"; - argument: StringLiteral; - qualifier: TSEntityName | null; - typeParameters: TSTypeParameterInstantiation | null; -} - -export interface TSImportEqualsDeclaration extends BaseNode { - type: "TSImportEqualsDeclaration"; - id: Identifier; - moduleReference: TSEntityName | TSExternalModuleReference; - isExport: boolean; -} - -export interface TSExternalModuleReference extends BaseNode { - type: "TSExternalModuleReference"; - expression: StringLiteral; -} - -export interface TSNonNullExpression extends BaseNode { - type: "TSNonNullExpression"; - expression: Expression; -} - -export interface TSExportAssignment extends BaseNode { - type: "TSExportAssignment"; - expression: Expression; -} - -export interface TSNamespaceExportDeclaration extends BaseNode { - type: "TSNamespaceExportDeclaration"; - id: Identifier; -} - -export interface TSTypeAnnotation extends BaseNode { - type: "TSTypeAnnotation"; - typeAnnotation: TSType; -} - -export interface TSTypeParameterInstantiation extends BaseNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -export interface TSTypeParameterDeclaration extends BaseNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -export interface TSTypeParameter extends BaseNode { - type: "TSTypeParameter"; - constraint: TSType | null; - default: TSType | null; - name: string; -} - -/** - * @deprecated Use `NumericLiteral` - */ -export type NumberLiteral = NumericLiteral; - -/** - * @deprecated Use `RegExpLiteral` - */ -export type RegexLiteral = RegExpLiteral; - -/** - * @deprecated Use `RestElement` - */ -export type RestProperty = RestElement; - -/** - * @deprecated Use `SpreadElement` - */ -export type SpreadProperty = SpreadElement; - -export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | TypeCastExpression | JSXElement | JSXFragment | AwaitExpression | BindExpression | OptionalMemberExpression | PipelinePrimaryTopicReference | OptionalCallExpression | Import | DoExpression | BigIntLiteral | RecordExpression | TupleExpression | TSAsExpression | TSTypeAssertion | TSNonNullExpression; -export type Binary = BinaryExpression | LogicalExpression; -export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock; -export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | TSModuleBlock; -export type Block = BlockStatement | Program | TSModuleBlock; -export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration; -export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression; -export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement; -export type Conditional = ConditionalExpression | IfStatement; -export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement; -export type While = DoWhileStatement | WhileStatement; -export type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression; -export type For = ForInStatement | ForStatement | ForOfStatement; -export type ForXStatement = ForInStatement | ForOfStatement; -export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; -export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod; -export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral; -export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration; -export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern; -export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty; -export type TSEntityName = Identifier | TSQualifiedName; -export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral; -export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | BigIntLiteral; -export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty; -export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod; -export type ObjectMember = ObjectMethod | ObjectProperty; -export type Property = ObjectProperty | ClassProperty | ClassPrivateProperty; -export type UnaryLike = UnaryExpression | SpreadElement; -export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern; -export type Class = ClassExpression | ClassDeclaration; -export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration; -export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; -export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier; -export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation; -export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation; -export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation; -export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias; -export type FlowPredicate = DeclaredPredicate | InferredPredicate; -export type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody; -export type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember; -export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment; -export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName; -export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature; -export type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType; - -export interface Aliases { - Expression: Expression; - Binary: Binary; - Scopable: Scopable; - BlockParent: BlockParent; - Block: Block; - Statement: Statement; - Terminatorless: Terminatorless; - CompletionStatement: CompletionStatement; - Conditional: Conditional; - Loop: Loop; - While: While; - ExpressionWrapper: ExpressionWrapper; - For: For; - ForXStatement: ForXStatement; - Function: Function; - FunctionParent: FunctionParent; - Pureish: Pureish; - Declaration: Declaration; - PatternLike: PatternLike; - LVal: LVal; - TSEntityName: TSEntityName; - Literal: Literal; - Immutable: Immutable; - UserWhitespacable: UserWhitespacable; - Method: Method; - ObjectMember: ObjectMember; - Property: Property; - UnaryLike: UnaryLike; - Pattern: Pattern; - Class: Class; - ModuleDeclaration: ModuleDeclaration; - ExportDeclaration: ExportDeclaration; - ModuleSpecifier: ModuleSpecifier; - Flow: Flow; - FlowType: FlowType; - FlowBaseAnnotation: FlowBaseAnnotation; - FlowDeclaration: FlowDeclaration; - FlowPredicate: FlowPredicate; - EnumBody: EnumBody; - EnumMember: EnumMember; - JSX: JSX; - Private: Private; - TSTypeElement: TSTypeElement; - TSType: TSType; -} - -export function arrayExpression(elements?: Array): ArrayExpression; -export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression; -export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression, right: Expression): BinaryExpression; -export function interpreterDirective(value: string): InterpreterDirective; -export function directive(value: DirectiveLiteral): Directive; -export function directiveLiteral(value: string): DirectiveLiteral; -export function blockStatement(body: Array, directives?: Array): BlockStatement; -export function breakStatement(label?: Identifier | null): BreakStatement; -export function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array): CallExpression; -export function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause; -export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression; -export function continueStatement(label?: Identifier | null): ContinueStatement; -export function debuggerStatement(): DebuggerStatement; -export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement; -export function emptyStatement(): EmptyStatement; -export function expressionStatement(expression: Expression): ExpressionStatement; -export function file(program: Program, comments: any, tokens: any): File; -export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement; -export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement; -export function functionDeclaration(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration; -export function functionExpression(id: Identifier | null | undefined, params: Array, body: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression; -export function identifier(name: any): Identifier; -export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement; -export function labeledStatement(label: Identifier, body: Statement): LabeledStatement; -export function stringLiteral(value: string): StringLiteral; -export function numericLiteral(value: number): NumericLiteral; -export function nullLiteral(): NullLiteral; -export function booleanLiteral(value: boolean): BooleanLiteral; -export function regExpLiteral(pattern: string, flags?: any): RegExpLiteral; -export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression; -export function memberExpression(object: Expression, property: any, computed?: boolean, optional?: true | false | null): MemberExpression; -export function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array): NewExpression; -export function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program; -export function objectExpression(properties: Array): ObjectExpression; -export function objectMethod(kind: "method" | "get" | "set" | undefined, key: any, params: Array, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod; -export function objectProperty(key: any, value: Expression | PatternLike, computed?: boolean, shorthand?: any, decorators?: Array | null): ObjectProperty; -export function restElement(argument: LVal): RestElement; -export function returnStatement(argument?: Expression | null): ReturnStatement; -export function sequenceExpression(expressions: Array): SequenceExpression; -export function parenthesizedExpression(expression: Expression): ParenthesizedExpression; -export function switchCase(test: Expression | null | undefined, consequent: Array): SwitchCase; -export function switchStatement(discriminant: Expression, cases: Array): SwitchStatement; -export function thisExpression(): ThisExpression; -export function throwStatement(argument: Expression): ThrowStatement; -export function tryStatement(block: any, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement; -export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression; -export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression; -export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array): VariableDeclaration; -export function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator; -export function whileStatement(test: Expression, body: Statement): WhileStatement; -export function withStatement(object: Expression, body: Statement): WithStatement; -export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern; -export function arrayPattern(elements: Array): ArrayPattern; -export function arrowFunctionExpression(params: Array, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression; -export function classBody(body: Array): ClassBody; -export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array | null): ClassExpression; -export function classDeclaration(id: any, superClass: any, body: any, decorators: any): ClassDeclaration; -export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration; -export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration; -export function exportNamedDeclaration(declaration?: any | null, specifiers?: Array, source?: StringLiteral | null): ExportNamedDeclaration; -export function exportSpecifier(local: Identifier, exported: Identifier): ExportSpecifier; -export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement; -export function importDeclaration(specifiers: Array, source: StringLiteral): ImportDeclaration; -export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier; -export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier; -export function importSpecifier(local: Identifier, imported: Identifier): ImportSpecifier; -export function metaProperty(meta: any, property: Identifier): MetaProperty; -export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod; -export function objectPattern(properties: Array): ObjectPattern; -export function spreadElement(argument: Expression): SpreadElement; -declare function _super(): Super; -export { _super as super} -export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression; -export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): TemplateElement; -export function templateLiteral(quasis: Array, expressions: Array): TemplateLiteral; -export function yieldExpression(argument?: Expression | null, delegate?: any): YieldExpression; -export function anyTypeAnnotation(): AnyTypeAnnotation; -export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation; -export function booleanTypeAnnotation(): BooleanTypeAnnotation; -export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation; -export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation; -export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements; -export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation): DeclareClass; -export function declareFunction(id: Identifier): DeclareFunction; -export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation): DeclareInterface; -export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule; -export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports; -export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias; -export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType; -export function declareVariable(id: Identifier): DeclareVariable; -export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array | null, source?: StringLiteral | null): DeclareExportDeclaration; -export function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration; -export function declaredPredicate(value: Flow): DeclaredPredicate; -export function existsTypeAnnotation(): ExistsTypeAnnotation; -export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation; -export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType): FunctionTypeParam; -export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation; -export function inferredPredicate(): InferredPredicate; -export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends; -export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: ObjectTypeAnnotation): InterfaceDeclaration; -export function interfaceTypeAnnotation(_extends: Array | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation; -export function intersectionTypeAnnotation(types: Array): IntersectionTypeAnnotation; -export function mixedTypeAnnotation(): MixedTypeAnnotation; -export function emptyTypeAnnotation(): EmptyTypeAnnotation; -export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation; -export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation; -export function numberTypeAnnotation(): NumberTypeAnnotation; -export function objectTypeAnnotation(properties: Array, indexers?: Array | null, callProperties?: Array | null, internalSlots?: Array | null, exact?: boolean): ObjectTypeAnnotation; -export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot; -export function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty; -export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer; -export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null): ObjectTypeProperty; -export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty; -export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType; -export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier; -export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation; -export function stringTypeAnnotation(): StringTypeAnnotation; -export function symbolTypeAnnotation(): SymbolTypeAnnotation; -export function thisTypeAnnotation(): ThisTypeAnnotation; -export function tupleTypeAnnotation(types: Array): TupleTypeAnnotation; -export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation; -export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias; -export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation; -export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression; -export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null): TypeParameter; -export function typeParameterDeclaration(params: Array): TypeParameterDeclaration; -export function typeParameterInstantiation(params: Array): TypeParameterInstantiation; -export function unionTypeAnnotation(types: Array): UnionTypeAnnotation; -export function variance(kind: "minus" | "plus"): Variance; -export function voidTypeAnnotation(): VoidTypeAnnotation; -export function enumDeclaration(id: Identifier, body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody): EnumDeclaration; -export function enumBooleanBody(members: Array): EnumBooleanBody; -export function enumNumberBody(members: Array): EnumNumberBody; -export function enumStringBody(members: Array): EnumStringBody; -export function enumSymbolBody(members: Array): EnumSymbolBody; -export function enumBooleanMember(id: Identifier): EnumBooleanMember; -export function enumNumberMember(id: Identifier, init: NumericLiteral): EnumNumberMember; -export function enumStringMember(id: Identifier, init: StringLiteral): EnumStringMember; -export function enumDefaultedMember(id: Identifier): EnumDefaultedMember; -export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute; -export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName): JSXClosingElement; -export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array, selfClosing: any): JSXElement; -export function jsxEmptyExpression(): JSXEmptyExpression; -export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer; -export function jsxSpreadChild(expression: Expression): JSXSpreadChild; -export function jsxIdentifier(name: string): JSXIdentifier; -export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression; -export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName; -export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName, attributes: Array, selfClosing?: boolean): JSXOpeningElement; -export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute; -export function jsxText(value: string): JSXText; -export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array): JSXFragment; -export function jsxOpeningFragment(): JSXOpeningFragment; -export function jsxClosingFragment(): JSXClosingFragment; -export function noop(): Noop; -export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder; -export function v8IntrinsicIdentifier(name: string): V8IntrinsicIdentifier; -export function argumentPlaceholder(): ArgumentPlaceholder; -export function awaitExpression(argument: Expression): AwaitExpression; -export function bindExpression(object: any, callee: any): BindExpression; -export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array | null, computed?: boolean, _static?: boolean): ClassProperty; -export function optionalMemberExpression(object: Expression, property: any, computed: boolean | undefined, optional: boolean): OptionalMemberExpression; -export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression; -export function pipelineBareFunction(callee: Expression): PipelineBareFunction; -export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference; -export function optionalCallExpression(callee: Expression, _arguments: Array, optional: boolean): OptionalCallExpression; -export function classPrivateProperty(key: PrivateName, value?: Expression | null, decorators?: Array | null): ClassPrivateProperty; -export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array, body: BlockStatement, _static?: boolean): ClassPrivateMethod; -declare function _import(): Import; -export { _import as import} -export function decorator(expression: Expression): Decorator; -export function doExpression(body: BlockStatement): DoExpression; -export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier; -export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier; -export function privateName(id: Identifier): PrivateName; -export function bigIntLiteral(value: string): BigIntLiteral; -export function recordExpression(properties: Array): RecordExpression; -export function tupleExpression(elements?: Array): TupleExpression; -export function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty; -export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction; -export function tsDeclareMethod(decorators: Array | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod; -export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName; -export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration; -export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration; -export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null): TSPropertySignature; -export function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSMethodSignature; -export function tsIndexSignature(parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSIndexSignature; -export function tsAnyKeyword(): TSAnyKeyword; -export function tsBooleanKeyword(): TSBooleanKeyword; -export function tsBigIntKeyword(): TSBigIntKeyword; -export function tsNeverKeyword(): TSNeverKeyword; -export function tsNullKeyword(): TSNullKeyword; -export function tsNumberKeyword(): TSNumberKeyword; -export function tsObjectKeyword(): TSObjectKeyword; -export function tsStringKeyword(): TSStringKeyword; -export function tsSymbolKeyword(): TSSymbolKeyword; -export function tsUndefinedKeyword(): TSUndefinedKeyword; -export function tsUnknownKeyword(): TSUnknownKeyword; -export function tsVoidKeyword(): TSVoidKeyword; -export function tsThisType(): TSThisType; -export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType; -export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType; -export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference; -export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate; -export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery; -export function tsTypeLiteral(members: Array): TSTypeLiteral; -export function tsArrayType(elementType: TSType): TSArrayType; -export function tsTupleType(elementTypes: Array): TSTupleType; -export function tsOptionalType(typeAnnotation: TSType): TSOptionalType; -export function tsRestType(typeAnnotation: TSType): TSRestType; -export function tsUnionType(types: Array): TSUnionType; -export function tsIntersectionType(types: Array): TSIntersectionType; -export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType; -export function tsInferType(typeParameter: TSTypeParameter): TSInferType; -export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType; -export function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator; -export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType; -export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null): TSMappedType; -export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral): TSLiteralType; -export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments; -export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration; -export function tsInterfaceBody(body: Array): TSInterfaceBody; -export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration; -export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression; -export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion; -export function tsEnumDeclaration(id: Identifier, members: Array): TSEnumDeclaration; -export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember; -export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration; -export function tsModuleBlock(body: Array): TSModuleBlock; -export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType; -export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration; -export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference; -export function tsNonNullExpression(expression: Expression): TSNonNullExpression; -export function tsExportAssignment(expression: Expression): TSExportAssignment; -export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration; -export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation; -export function tsTypeParameterInstantiation(params: Array): TSTypeParameterInstantiation; -export function tsTypeParameterDeclaration(params: Array): TSTypeParameterDeclaration; -export function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter; -export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation; -// export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is AnyTypeAnnotation; -export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder; -// export function assertArgumentPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is ArgumentPlaceholder; -export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression; -// export function assertArrayExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrayExpression; -export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern; -// export function assertArrayPattern(node: object | null | undefined, opts?: object | null): asserts node is ArrayPattern; -export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation; -// export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ArrayTypeAnnotation; -export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression; -// export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrowFunctionExpression; -export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression; -// export function assertAssignmentExpression(node: object | null | undefined, opts?: object | null): asserts node is AssignmentExpression; -export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern; -// export function assertAssignmentPattern(node: object | null | undefined, opts?: object | null): asserts node is AssignmentPattern; -export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression; -// export function assertAwaitExpression(node: object | null | undefined, opts?: object | null): asserts node is AwaitExpression; -export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral; -// export function assertBigIntLiteral(node: object | null | undefined, opts?: object | null): asserts node is BigIntLiteral; -export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary; -// export function assertBinary(node: object | null | undefined, opts?: object | null): asserts node is Binary; -export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression; -// export function assertBinaryExpression(node: object | null | undefined, opts?: object | null): asserts node is BinaryExpression; -export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression; -// export function assertBindExpression(node: object | null | undefined, opts?: object | null): asserts node is BindExpression; -export function isBlock(node: object | null | undefined, opts?: object | null): node is Block; -// export function assertBlock(node: object | null | undefined, opts?: object | null): asserts node is Block; -export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent; -// export function assertBlockParent(node: object | null | undefined, opts?: object | null): asserts node is BlockParent; -export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement; -// export function assertBlockStatement(node: object | null | undefined, opts?: object | null): asserts node is BlockStatement; -export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral; -// export function assertBooleanLiteral(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteral; -export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation; -// export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteralTypeAnnotation; -export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation; -// export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanTypeAnnotation; -export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement; -// export function assertBreakStatement(node: object | null | undefined, opts?: object | null): asserts node is BreakStatement; -export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression; -// export function assertCallExpression(node: object | null | undefined, opts?: object | null): asserts node is CallExpression; -export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause; -// export function assertCatchClause(node: object | null | undefined, opts?: object | null): asserts node is CatchClause; -export function isClass(node: object | null | undefined, opts?: object | null): node is Class; -// export function assertClass(node: object | null | undefined, opts?: object | null): asserts node is Class; -export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody; -// export function assertClassBody(node: object | null | undefined, opts?: object | null): asserts node is ClassBody; -export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration; -// export function assertClassDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ClassDeclaration; -export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression; -// export function assertClassExpression(node: object | null | undefined, opts?: object | null): asserts node is ClassExpression; -export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements; -// export function assertClassImplements(node: object | null | undefined, opts?: object | null): asserts node is ClassImplements; -export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod; -// export function assertClassMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassMethod; -export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod; -// export function assertClassPrivateMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateMethod; -export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty; -// export function assertClassPrivateProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateProperty; -export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty; -// export function assertClassProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassProperty; -export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement; -// export function assertCompletionStatement(node: object | null | undefined, opts?: object | null): asserts node is CompletionStatement; -export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional; -// export function assertConditional(node: object | null | undefined, opts?: object | null): asserts node is Conditional; -export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression; -// export function assertConditionalExpression(node: object | null | undefined, opts?: object | null): asserts node is ConditionalExpression; -export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement; -// export function assertContinueStatement(node: object | null | undefined, opts?: object | null): asserts node is ContinueStatement; -export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement; -// export function assertDebuggerStatement(node: object | null | undefined, opts?: object | null): asserts node is DebuggerStatement; -export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration; -// export function assertDeclaration(node: object | null | undefined, opts?: object | null): asserts node is Declaration; -export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass; -// export function assertDeclareClass(node: object | null | undefined, opts?: object | null): asserts node is DeclareClass; -export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration; -// export function assertDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportAllDeclaration; -export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration; -// export function assertDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportDeclaration; -export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction; -// export function assertDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is DeclareFunction; -export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface; -// export function assertDeclareInterface(node: object | null | undefined, opts?: object | null): asserts node is DeclareInterface; -export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule; -// export function assertDeclareModule(node: object | null | undefined, opts?: object | null): asserts node is DeclareModule; -export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports; -// export function assertDeclareModuleExports(node: object | null | undefined, opts?: object | null): asserts node is DeclareModuleExports; -export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType; -// export function assertDeclareOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is DeclareOpaqueType; -export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias; -// export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is DeclareTypeAlias; -export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable; -// export function assertDeclareVariable(node: object | null | undefined, opts?: object | null): asserts node is DeclareVariable; -export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate; -// export function assertDeclaredPredicate(node: object | null | undefined, opts?: object | null): asserts node is DeclaredPredicate; -export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator; -// export function assertDecorator(node: object | null | undefined, opts?: object | null): asserts node is Decorator; -export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive; -// export function assertDirective(node: object | null | undefined, opts?: object | null): asserts node is Directive; -export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral; -// export function assertDirectiveLiteral(node: object | null | undefined, opts?: object | null): asserts node is DirectiveLiteral; -export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression; -// export function assertDoExpression(node: object | null | undefined, opts?: object | null): asserts node is DoExpression; -export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement; -// export function assertDoWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is DoWhileStatement; -export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement; -// export function assertEmptyStatement(node: object | null | undefined, opts?: object | null): asserts node is EmptyStatement; -export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation; -// export function assertEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is EmptyTypeAnnotation; -export function isEnumBody(node: object | null | undefined, opts?: object | null): node is EnumBody; -// export function assertEnumBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBody; -export function isEnumBooleanBody(node: object | null | undefined, opts?: object | null): node is EnumBooleanBody; -// export function assertEnumBooleanBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanBody; -export function isEnumBooleanMember(node: object | null | undefined, opts?: object | null): node is EnumBooleanMember; -// export function assertEnumBooleanMember(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanMember; -export function isEnumDeclaration(node: object | null | undefined, opts?: object | null): node is EnumDeclaration; -// export function assertEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is EnumDeclaration; -export function isEnumDefaultedMember(node: object | null | undefined, opts?: object | null): node is EnumDefaultedMember; -// export function assertEnumDefaultedMember(node: object | null | undefined, opts?: object | null): asserts node is EnumDefaultedMember; -export function isEnumMember(node: object | null | undefined, opts?: object | null): node is EnumMember; -// export function assertEnumMember(node: object | null | undefined, opts?: object | null): asserts node is EnumMember; -export function isEnumNumberBody(node: object | null | undefined, opts?: object | null): node is EnumNumberBody; -// export function assertEnumNumberBody(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberBody; -export function isEnumNumberMember(node: object | null | undefined, opts?: object | null): node is EnumNumberMember; -// export function assertEnumNumberMember(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberMember; -export function isEnumStringBody(node: object | null | undefined, opts?: object | null): node is EnumStringBody; -// export function assertEnumStringBody(node: object | null | undefined, opts?: object | null): asserts node is EnumStringBody; -export function isEnumStringMember(node: object | null | undefined, opts?: object | null): node is EnumStringMember; -// export function assertEnumStringMember(node: object | null | undefined, opts?: object | null): asserts node is EnumStringMember; -export function isEnumSymbolBody(node: object | null | undefined, opts?: object | null): node is EnumSymbolBody; -// export function assertEnumSymbolBody(node: object | null | undefined, opts?: object | null): asserts node is EnumSymbolBody; -export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation; -// export function assertExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ExistsTypeAnnotation; -export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration; -// export function assertExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportAllDeclaration; -export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration; -// export function assertExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDeclaration; -export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration; -// export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultDeclaration; -export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier; -// export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultSpecifier; -export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration; -// export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportNamedDeclaration; -export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier; -// export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportNamespaceSpecifier; -export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier; -// export function assertExportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportSpecifier; -export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression; -// export function assertExpression(node: object | null | undefined, opts?: object | null): asserts node is Expression; -export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement; -// export function assertExpressionStatement(node: object | null | undefined, opts?: object | null): asserts node is ExpressionStatement; -export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper; -// export function assertExpressionWrapper(node: object | null | undefined, opts?: object | null): asserts node is ExpressionWrapper; -export function isFile(node: object | null | undefined, opts?: object | null): node is File; -// export function assertFile(node: object | null | undefined, opts?: object | null): asserts node is File; -export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow; -// export function assertFlow(node: object | null | undefined, opts?: object | null): asserts node is Flow; -export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation; -// export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FlowBaseAnnotation; -export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration; -// export function assertFlowDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FlowDeclaration; -export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate; -// export function assertFlowPredicate(node: object | null | undefined, opts?: object | null): asserts node is FlowPredicate; -export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType; -// export function assertFlowType(node: object | null | undefined, opts?: object | null): asserts node is FlowType; -export function isFor(node: object | null | undefined, opts?: object | null): node is For; -// export function assertFor(node: object | null | undefined, opts?: object | null): asserts node is For; -export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement; -// export function assertForInStatement(node: object | null | undefined, opts?: object | null): asserts node is ForInStatement; -export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement; -// export function assertForOfStatement(node: object | null | undefined, opts?: object | null): asserts node is ForOfStatement; -export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement; -// export function assertForStatement(node: object | null | undefined, opts?: object | null): asserts node is ForStatement; -export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement; -// export function assertForXStatement(node: object | null | undefined, opts?: object | null): asserts node is ForXStatement; -export function isFunction(node: object | null | undefined, opts?: object | null): node is Function; -// export function assertFunction(node: object | null | undefined, opts?: object | null): asserts node is Function; -export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration; -// export function assertFunctionDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FunctionDeclaration; -export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression; -// export function assertFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is FunctionExpression; -export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent; -// export function assertFunctionParent(node: object | null | undefined, opts?: object | null): asserts node is FunctionParent; -export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation; -// export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeAnnotation; -export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam; -// export function assertFunctionTypeParam(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeParam; -export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation; -// export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is GenericTypeAnnotation; -export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier; -// export function assertIdentifier(node: object | null | undefined, opts?: object | null): asserts node is Identifier; -export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement; -// export function assertIfStatement(node: object | null | undefined, opts?: object | null): asserts node is IfStatement; -export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable; -// export function assertImmutable(node: object | null | undefined, opts?: object | null): asserts node is Immutable; -export function isImport(node: object | null | undefined, opts?: object | null): node is Import; -// export function assertImport(node: object | null | undefined, opts?: object | null): asserts node is Import; -export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration; -// export function assertImportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ImportDeclaration; -export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier; -// export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportDefaultSpecifier; -export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier; -// export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportNamespaceSpecifier; -export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier; -// export function assertImportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportSpecifier; -export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate; -// export function assertInferredPredicate(node: object | null | undefined, opts?: object | null): asserts node is InferredPredicate; -export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration; -// export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is InterfaceDeclaration; -export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends; -// export function assertInterfaceExtends(node: object | null | undefined, opts?: object | null): asserts node is InterfaceExtends; -export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation; -// export function assertInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is InterfaceTypeAnnotation; -export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective; -// export function assertInterpreterDirective(node: object | null | undefined, opts?: object | null): asserts node is InterpreterDirective; -export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation; -// export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is IntersectionTypeAnnotation; -export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX; -// export function assertJSX(node: object | null | undefined, opts?: object | null): asserts node is JSX; -export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute; -// export function assertJSXAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXAttribute; -export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement; -// export function assertJSXClosingElement(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingElement; -export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment; -// export function assertJSXClosingFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingFragment; -export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement; -// export function assertJSXElement(node: object | null | undefined, opts?: object | null): asserts node is JSXElement; -export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression; -// export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXEmptyExpression; -export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer; -// export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object | null): asserts node is JSXExpressionContainer; -export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment; -// export function assertJSXFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXFragment; -export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier; -// export function assertJSXIdentifier(node: object | null | undefined, opts?: object | null): asserts node is JSXIdentifier; -export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression; -// export function assertJSXMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXMemberExpression; -export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName; -// export function assertJSXNamespacedName(node: object | null | undefined, opts?: object | null): asserts node is JSXNamespacedName; -export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement; -// export function assertJSXOpeningElement(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningElement; -export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment; -// export function assertJSXOpeningFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningFragment; -export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute; -// export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadAttribute; -export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild; -// export function assertJSXSpreadChild(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadChild; -export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText; -// export function assertJSXText(node: object | null | undefined, opts?: object | null): asserts node is JSXText; -export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal; -// export function assertLVal(node: object | null | undefined, opts?: object | null): asserts node is LVal; -export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement; -// export function assertLabeledStatement(node: object | null | undefined, opts?: object | null): asserts node is LabeledStatement; -export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal; -// export function assertLiteral(node: object | null | undefined, opts?: object | null): asserts node is Literal; -export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression; -// export function assertLogicalExpression(node: object | null | undefined, opts?: object | null): asserts node is LogicalExpression; -export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop; -// export function assertLoop(node: object | null | undefined, opts?: object | null): asserts node is Loop; -export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression; -// export function assertMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is MemberExpression; -export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty; -// export function assertMetaProperty(node: object | null | undefined, opts?: object | null): asserts node is MetaProperty; -export function isMethod(node: object | null | undefined, opts?: object | null): node is Method; -// export function assertMethod(node: object | null | undefined, opts?: object | null): asserts node is Method; -export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation; -// export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is MixedTypeAnnotation; -export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration; -// export function assertModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ModuleDeclaration; -export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier; -// export function assertModuleSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ModuleSpecifier; -export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression; -// export function assertNewExpression(node: object | null | undefined, opts?: object | null): asserts node is NewExpression; -export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop; -// export function assertNoop(node: object | null | undefined, opts?: object | null): asserts node is Noop; -export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral; -// export function assertNullLiteral(node: object | null | undefined, opts?: object | null): asserts node is NullLiteral; -export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation; -// export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullLiteralTypeAnnotation; -export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation; -// export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullableTypeAnnotation; -export function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean; -// export function assertNumberLiteral(node: object | null | undefined, opts?: object | null): asserts node; -export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation; -// export function assertNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberLiteralTypeAnnotation; -export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation; -// export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberTypeAnnotation; -export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral; -// export function assertNumericLiteral(node: object | null | undefined, opts?: object | null): asserts node is NumericLiteral; -export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression; -// export function assertObjectExpression(node: object | null | undefined, opts?: object | null): asserts node is ObjectExpression; -export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember; -// export function assertObjectMember(node: object | null | undefined, opts?: object | null): asserts node is ObjectMember; -export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod; -// export function assertObjectMethod(node: object | null | undefined, opts?: object | null): asserts node is ObjectMethod; -export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern; -// export function assertObjectPattern(node: object | null | undefined, opts?: object | null): asserts node is ObjectPattern; -export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty; -// export function assertObjectProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectProperty; -export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation; -// export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeAnnotation; -export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty; -// export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeCallProperty; -export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer; -// export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeIndexer; -export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot; -// export function assertObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeInternalSlot; -export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty; -// export function assertObjectTypeProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeProperty; -export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty; -// export function assertObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeSpreadProperty; -export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType; -// export function assertOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is OpaqueType; -export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression; -// export function assertOptionalCallExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalCallExpression; -export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression; -// export function assertOptionalMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalMemberExpression; -export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression; -// export function assertParenthesizedExpression(node: object | null | undefined, opts?: object | null): asserts node is ParenthesizedExpression; -export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern; -// export function assertPattern(node: object | null | undefined, opts?: object | null): asserts node is Pattern; -export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike; -// export function assertPatternLike(node: object | null | undefined, opts?: object | null): asserts node is PatternLike; -export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction; -// export function assertPipelineBareFunction(node: object | null | undefined, opts?: object | null): asserts node is PipelineBareFunction; -export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference; -// export function assertPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): asserts node is PipelinePrimaryTopicReference; -export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression; -// export function assertPipelineTopicExpression(node: object | null | undefined, opts?: object | null): asserts node is PipelineTopicExpression; -export function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder; -// export function assertPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is Placeholder; -export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private; -// export function assertPrivate(node: object | null | undefined, opts?: object | null): asserts node is Private; -export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName; -// export function assertPrivateName(node: object | null | undefined, opts?: object | null): asserts node is PrivateName; -export function isProgram(node: object | null | undefined, opts?: object | null): node is Program; -// export function assertProgram(node: object | null | undefined, opts?: object | null): asserts node is Program; -export function isProperty(node: object | null | undefined, opts?: object | null): node is Property; -// export function assertProperty(node: object | null | undefined, opts?: object | null): asserts node is Property; -export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish; -// export function assertPureish(node: object | null | undefined, opts?: object | null): asserts node is Pureish; -export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier; -// export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): asserts node is QualifiedTypeIdentifier; -export function isRecordExpression(node: object | null | undefined, opts?: object | null): node is RecordExpression; -// export function assertRecordExpression(node: object | null | undefined, opts?: object | null): asserts node is RecordExpression; -export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral; -// export function assertRegExpLiteral(node: object | null | undefined, opts?: object | null): asserts node is RegExpLiteral; -export function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean; -// export function assertRegexLiteral(node: object | null | undefined, opts?: object | null): asserts node; -export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement; -// export function assertRestElement(node: object | null | undefined, opts?: object | null): asserts node is RestElement; -export function isRestProperty(node: object | null | undefined, opts?: object | null): boolean; -// export function assertRestProperty(node: object | null | undefined, opts?: object | null): asserts node; -export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement; -// export function assertReturnStatement(node: object | null | undefined, opts?: object | null): asserts node is ReturnStatement; -export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable; -// export function assertScopable(node: object | null | undefined, opts?: object | null): asserts node is Scopable; -export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression; -// export function assertSequenceExpression(node: object | null | undefined, opts?: object | null): asserts node is SequenceExpression; -export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement; -// export function assertSpreadElement(node: object | null | undefined, opts?: object | null): asserts node is SpreadElement; -export function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean; -// export function assertSpreadProperty(node: object | null | undefined, opts?: object | null): asserts node; -export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement; -// export function assertStatement(node: object | null | undefined, opts?: object | null): asserts node is Statement; -export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral; -// export function assertStringLiteral(node: object | null | undefined, opts?: object | null): asserts node is StringLiteral; -export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation; -// export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringLiteralTypeAnnotation; -export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation; -// export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringTypeAnnotation; -export function isSuper(node: object | null | undefined, opts?: object | null): node is Super; -// export function assertSuper(node: object | null | undefined, opts?: object | null): asserts node is Super; -export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase; -// export function assertSwitchCase(node: object | null | undefined, opts?: object | null): asserts node is SwitchCase; -export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement; -// export function assertSwitchStatement(node: object | null | undefined, opts?: object | null): asserts node is SwitchStatement; -export function isSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): node is SymbolTypeAnnotation; -// export function assertSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is SymbolTypeAnnotation; -export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword; -// export function assertTSAnyKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSAnyKeyword; -export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType; -// export function assertTSArrayType(node: object | null | undefined, opts?: object | null): asserts node is TSArrayType; -export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression; -// export function assertTSAsExpression(node: object | null | undefined, opts?: object | null): asserts node is TSAsExpression; -export function isTSBigIntKeyword(node: object | null | undefined, opts?: object | null): node is TSBigIntKeyword; -// export function assertTSBigIntKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBigIntKeyword; -export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword; -// export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBooleanKeyword; -export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration; -// export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSCallSignatureDeclaration; -export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType; -// export function assertTSConditionalType(node: object | null | undefined, opts?: object | null): asserts node is TSConditionalType; -export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration; -// export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSConstructSignatureDeclaration; -export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType; -// export function assertTSConstructorType(node: object | null | undefined, opts?: object | null): asserts node is TSConstructorType; -export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction; -// export function assertTSDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareFunction; -export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod; -// export function assertTSDeclareMethod(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareMethod; -export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName; -// export function assertTSEntityName(node: object | null | undefined, opts?: object | null): asserts node is TSEntityName; -export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration; -// export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSEnumDeclaration; -export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember; -// export function assertTSEnumMember(node: object | null | undefined, opts?: object | null): asserts node is TSEnumMember; -export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment; -// export function assertTSExportAssignment(node: object | null | undefined, opts?: object | null): asserts node is TSExportAssignment; -export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments; -// export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): asserts node is TSExpressionWithTypeArguments; -export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference; -// export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object | null): asserts node is TSExternalModuleReference; -export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType; -// export function assertTSFunctionType(node: object | null | undefined, opts?: object | null): asserts node is TSFunctionType; -export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration; -// export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSImportEqualsDeclaration; -export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType; -// export function assertTSImportType(node: object | null | undefined, opts?: object | null): asserts node is TSImportType; -export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature; -// export function assertTSIndexSignature(node: object | null | undefined, opts?: object | null): asserts node is TSIndexSignature; -export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType; -// export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is TSIndexedAccessType; -export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType; -// export function assertTSInferType(node: object | null | undefined, opts?: object | null): asserts node is TSInferType; -export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody; -// export function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceBody; -export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration; -// export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceDeclaration; -export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType; -// export function assertTSIntersectionType(node: object | null | undefined, opts?: object | null): asserts node is TSIntersectionType; -export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType; -// export function assertTSLiteralType(node: object | null | undefined, opts?: object | null): asserts node is TSLiteralType; -export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType; -// export function assertTSMappedType(node: object | null | undefined, opts?: object | null): asserts node is TSMappedType; -export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature; -// export function assertTSMethodSignature(node: object | null | undefined, opts?: object | null): asserts node is TSMethodSignature; -export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock; -// export function assertTSModuleBlock(node: object | null | undefined, opts?: object | null): asserts node is TSModuleBlock; -export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration; -// export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSModuleDeclaration; -export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration; -// export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSNamespaceExportDeclaration; -export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword; -// export function assertTSNeverKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNeverKeyword; -export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression; -// export function assertTSNonNullExpression(node: object | null | undefined, opts?: object | null): asserts node is TSNonNullExpression; -export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword; -// export function assertTSNullKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNullKeyword; -export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword; -// export function assertTSNumberKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNumberKeyword; -export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword; -// export function assertTSObjectKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSObjectKeyword; -export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType; -// export function assertTSOptionalType(node: object | null | undefined, opts?: object | null): asserts node is TSOptionalType; -export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty; -// export function assertTSParameterProperty(node: object | null | undefined, opts?: object | null): asserts node is TSParameterProperty; -export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType; -// export function assertTSParenthesizedType(node: object | null | undefined, opts?: object | null): asserts node is TSParenthesizedType; -export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature; -// export function assertTSPropertySignature(node: object | null | undefined, opts?: object | null): asserts node is TSPropertySignature; -export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName; -// export function assertTSQualifiedName(node: object | null | undefined, opts?: object | null): asserts node is TSQualifiedName; -export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType; -// export function assertTSRestType(node: object | null | undefined, opts?: object | null): asserts node is TSRestType; -export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword; -// export function assertTSStringKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSStringKeyword; -export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword; -// export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSSymbolKeyword; -export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType; -// export function assertTSThisType(node: object | null | undefined, opts?: object | null): asserts node is TSThisType; -export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType; -// export function assertTSTupleType(node: object | null | undefined, opts?: object | null): asserts node is TSTupleType; -export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType; -// export function assertTSType(node: object | null | undefined, opts?: object | null): asserts node is TSType; -export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration; -// export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAliasDeclaration; -export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation; -// export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAnnotation; -export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion; -// export function assertTSTypeAssertion(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAssertion; -export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement; -// export function assertTSTypeElement(node: object | null | undefined, opts?: object | null): asserts node is TSTypeElement; -export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral; -// export function assertTSTypeLiteral(node: object | null | undefined, opts?: object | null): asserts node is TSTypeLiteral; -export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator; -// export function assertTSTypeOperator(node: object | null | undefined, opts?: object | null): asserts node is TSTypeOperator; -export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter; -// export function assertTSTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameter; -export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration; -// export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterDeclaration; -export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation; -// export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterInstantiation; -export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate; -// export function assertTSTypePredicate(node: object | null | undefined, opts?: object | null): asserts node is TSTypePredicate; -export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery; -// export function assertTSTypeQuery(node: object | null | undefined, opts?: object | null): asserts node is TSTypeQuery; -export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference; -// export function assertTSTypeReference(node: object | null | undefined, opts?: object | null): asserts node is TSTypeReference; -export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword; -// export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUndefinedKeyword; -export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType; -// export function assertTSUnionType(node: object | null | undefined, opts?: object | null): asserts node is TSUnionType; -export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword; -// export function assertTSUnknownKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUnknownKeyword; -export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword; -// export function assertTSVoidKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSVoidKeyword; -export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression; -// export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): asserts node is TaggedTemplateExpression; -export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement; -// export function assertTemplateElement(node: object | null | undefined, opts?: object | null): asserts node is TemplateElement; -export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral; -// export function assertTemplateLiteral(node: object | null | undefined, opts?: object | null): asserts node is TemplateLiteral; -export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless; -// export function assertTerminatorless(node: object | null | undefined, opts?: object | null): asserts node is Terminatorless; -export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression; -// export function assertThisExpression(node: object | null | undefined, opts?: object | null): asserts node is ThisExpression; -export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation; -// export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ThisTypeAnnotation; -export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement; -// export function assertThrowStatement(node: object | null | undefined, opts?: object | null): asserts node is ThrowStatement; -export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement; -// export function assertTryStatement(node: object | null | undefined, opts?: object | null): asserts node is TryStatement; -export function isTupleExpression(node: object | null | undefined, opts?: object | null): node is TupleExpression; -// export function assertTupleExpression(node: object | null | undefined, opts?: object | null): asserts node is TupleExpression; -export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation; -// export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TupleTypeAnnotation; -export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias; -// export function assertTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is TypeAlias; -export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation; -// export function assertTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeAnnotation; -export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression; -// export function assertTypeCastExpression(node: object | null | undefined, opts?: object | null): asserts node is TypeCastExpression; -export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter; -// export function assertTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TypeParameter; -export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration; -// export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterDeclaration; -export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation; -// export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterInstantiation; -export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation; -// export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeofTypeAnnotation; -export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression; -// export function assertUnaryExpression(node: object | null | undefined, opts?: object | null): asserts node is UnaryExpression; -export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike; -// export function assertUnaryLike(node: object | null | undefined, opts?: object | null): asserts node is UnaryLike; -export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation; -// export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is UnionTypeAnnotation; -export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression; -// export function assertUpdateExpression(node: object | null | undefined, opts?: object | null): asserts node is UpdateExpression; -export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable; -// export function assertUserWhitespacable(node: object | null | undefined, opts?: object | null): asserts node is UserWhitespacable; -export function isV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): node is V8IntrinsicIdentifier; -// export function assertV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): asserts node is V8IntrinsicIdentifier; -export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration; -// export function assertVariableDeclaration(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclaration; -export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator; -// export function assertVariableDeclarator(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclarator; -export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance; -// export function assertVariance(node: object | null | undefined, opts?: object | null): asserts node is Variance; -export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation; -// export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is VoidTypeAnnotation; -export function isWhile(node: object | null | undefined, opts?: object | null): node is While; -// export function assertWhile(node: object | null | undefined, opts?: object | null): asserts node is While; -export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement; -// export function assertWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is WhileStatement; -export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement; -// export function assertWithStatement(node: object | null | undefined, opts?: object | null): asserts node is WithStatement; -export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression; -// export function assertYieldExpression(node: object | null | undefined, opts?: object | null): asserts node is YieldExpression; -// export function assertNode(obj: any): asserts obj is Node -export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation -export function createUnionTypeAnnotation(types: [T]): T -export function createUnionTypeAnnotation(types: ReadonlyArray): UnionTypeAnnotation -export function buildChildren(node: { children: ReadonlyArray }): JSXElement['children'] -export function clone(n: T): T; -export function cloneDeep(n: T): T; -export function cloneDeepWithoutLoc(n: T): T; -export function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T; -export function cloneWithoutLoc(n: T): T; -export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing' -export function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T -export function addComments(node: T, type: CommentTypeShorthand, comments: ReadonlyArray): T -export function inheritInnerComments(node: Node, parent: Node): void -export function inheritLeadingComments(node: Node, parent: Node): void -export function inheritsComments(node: T, parent: Node): void -export function inheritTrailingComments(node: Node, parent: Node): void -export function removeComments(node: T): T -export function ensureBlock(node: Extract): BlockStatement -export function ensureBlock = 'body'>(node: Extract>, key: K): BlockStatement -export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string -export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement -export function toComputedKey>(node: T, key?: Expression | Identifier): Expression -export function toExpression(node: Function): FunctionExpression -export function toExpression(node: Class): ClassExpression -export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression -export function toIdentifier(name: { toString(): string } | null | undefined): string -export function toKeyAlias(node: Method | Property, key?: Node): string -export function toSequenceExpression(nodes: ReadonlyArray, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined -export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement -export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement -export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined -export function toStatement(node: Class, ignore?: boolean): ClassDeclaration -export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined -export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration -export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined -export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement -export function valueToNode(value: undefined): Identifier -export function valueToNode(value: boolean): BooleanLiteral -export function valueToNode(value: null): NullLiteral -export function valueToNode(value: string): StringLiteral -export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression -export function valueToNode(value: RegExp): RegExpLiteral -export function valueToNode(value: ReadonlyArray): ArrayExpression -export function valueToNode(value: object): ObjectExpression -export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression -export function removeTypeDuplicates(types: ReadonlyArray): FlowType[] -export function appendToMemberExpression>(member: T, append: MemberExpression['property'], computed?: boolean): T -export function inherits(child: T, parent: Node | null | undefined): T -export function prependToMemberExpression>(member: T, prepend: MemberExpression['object']): T -export function removeProperties( - n: Node, - opts?: { preserveComments: boolean } | null -): void; -export function removePropertiesDeep( - n: T, - opts?: { preserveComments: boolean } | null -): T; -export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record> -export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record -export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record> -export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record> -export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record -export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record> -export type TraversalAncestors = ReadonlyArray<{ - node: Node, - key: string, - index?: number, -}>; -export type TraversalHandler = ( - this: undefined, node: Node, parent: TraversalAncestors, type: T -) => void; -export type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, -}; -export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void; -export function traverseFast(n: Node, h: TraversalHandler, state?: T): void; -export function shallowEqual(actual: object, expected: T): actual is T -export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression -export function is(type: T, n: Node | null | undefined, required?: undefined): n is Extract -export function is>(type: T, n: Node | null | undefined, required: Partial

): n is P -export function is

(type: string, n: Node | null | undefined, required: Partial

): n is P -export function is(type: string, n: Node | null | undefined, required?: Partial): n is Node -export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean -export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration -export function isImmutable(node: Node): node is Immutable -export function isLet(node: Node): node is VariableDeclaration -export function isNode(node: object | null | undefined): node is Node -export function isNodesEquivalent>(a: T, b: any): b is T -export function isNodesEquivalent(a: any, b: any): boolean -export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean -export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean -export function isScope(node: Node, parent: Node): node is Scopable -export function isSpecifierDefault(specifier: ModuleSpecifier): boolean -export function isType(nodetype: string, targetType: T): nodetype is T -export function isType(nodetype: string | null | undefined, targetType: string): boolean -export function isValidES3Identifier(name: string): boolean -export function isValidIdentifier(name: string): boolean -export function isVar(node: Node): node is VariableDeclaration -export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray, allowPartial?: boolean): node is MemberExpression -export function validate(n: Node | null | undefined, key: K, value: T[K]): void -export function validate(n: Node, key: string, value: any): void; diff --git a/packages/common/node_modules/@babel/types/lib/index.js b/packages/common/node_modules/@babel/types/lib/index.js deleted file mode 100644 index 94bdf85a3e..0000000000 --- a/packages/common/node_modules/@babel/types/lib/index.js +++ /dev/null @@ -1,588 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = { - react: true, - assertNode: true, - createTypeAnnotationBasedOnTypeof: true, - createUnionTypeAnnotation: true, - cloneNode: true, - clone: true, - cloneDeep: true, - cloneDeepWithoutLoc: true, - cloneWithoutLoc: true, - addComment: true, - addComments: true, - inheritInnerComments: true, - inheritLeadingComments: true, - inheritsComments: true, - inheritTrailingComments: true, - removeComments: true, - ensureBlock: true, - toBindingIdentifierName: true, - toBlock: true, - toComputedKey: true, - toExpression: true, - toIdentifier: true, - toKeyAlias: true, - toSequenceExpression: true, - toStatement: true, - valueToNode: true, - appendToMemberExpression: true, - inherits: true, - prependToMemberExpression: true, - removeProperties: true, - removePropertiesDeep: true, - removeTypeDuplicates: true, - getBindingIdentifiers: true, - getOuterBindingIdentifiers: true, - traverse: true, - traverseFast: true, - shallowEqual: true, - is: true, - isBinding: true, - isBlockScoped: true, - isImmutable: true, - isLet: true, - isNode: true, - isNodesEquivalent: true, - isPlaceholderType: true, - isReferenced: true, - isScope: true, - isSpecifierDefault: true, - isType: true, - isValidES3Identifier: true, - isValidIdentifier: true, - isVar: true, - matchesPattern: true, - validate: true, - buildMatchMemberExpression: true -}; -Object.defineProperty(exports, "assertNode", { - enumerable: true, - get: function () { - return _assertNode.default; - } -}); -Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", { - enumerable: true, - get: function () { - return _createTypeAnnotationBasedOnTypeof.default; - } -}); -Object.defineProperty(exports, "createUnionTypeAnnotation", { - enumerable: true, - get: function () { - return _createUnionTypeAnnotation.default; - } -}); -Object.defineProperty(exports, "cloneNode", { - enumerable: true, - get: function () { - return _cloneNode.default; - } -}); -Object.defineProperty(exports, "clone", { - enumerable: true, - get: function () { - return _clone.default; - } -}); -Object.defineProperty(exports, "cloneDeep", { - enumerable: true, - get: function () { - return _cloneDeep.default; - } -}); -Object.defineProperty(exports, "cloneDeepWithoutLoc", { - enumerable: true, - get: function () { - return _cloneDeepWithoutLoc.default; - } -}); -Object.defineProperty(exports, "cloneWithoutLoc", { - enumerable: true, - get: function () { - return _cloneWithoutLoc.default; - } -}); -Object.defineProperty(exports, "addComment", { - enumerable: true, - get: function () { - return _addComment.default; - } -}); -Object.defineProperty(exports, "addComments", { - enumerable: true, - get: function () { - return _addComments.default; - } -}); -Object.defineProperty(exports, "inheritInnerComments", { - enumerable: true, - get: function () { - return _inheritInnerComments.default; - } -}); -Object.defineProperty(exports, "inheritLeadingComments", { - enumerable: true, - get: function () { - return _inheritLeadingComments.default; - } -}); -Object.defineProperty(exports, "inheritsComments", { - enumerable: true, - get: function () { - return _inheritsComments.default; - } -}); -Object.defineProperty(exports, "inheritTrailingComments", { - enumerable: true, - get: function () { - return _inheritTrailingComments.default; - } -}); -Object.defineProperty(exports, "removeComments", { - enumerable: true, - get: function () { - return _removeComments.default; - } -}); -Object.defineProperty(exports, "ensureBlock", { - enumerable: true, - get: function () { - return _ensureBlock.default; - } -}); -Object.defineProperty(exports, "toBindingIdentifierName", { - enumerable: true, - get: function () { - return _toBindingIdentifierName.default; - } -}); -Object.defineProperty(exports, "toBlock", { - enumerable: true, - get: function () { - return _toBlock.default; - } -}); -Object.defineProperty(exports, "toComputedKey", { - enumerable: true, - get: function () { - return _toComputedKey.default; - } -}); -Object.defineProperty(exports, "toExpression", { - enumerable: true, - get: function () { - return _toExpression.default; - } -}); -Object.defineProperty(exports, "toIdentifier", { - enumerable: true, - get: function () { - return _toIdentifier.default; - } -}); -Object.defineProperty(exports, "toKeyAlias", { - enumerable: true, - get: function () { - return _toKeyAlias.default; - } -}); -Object.defineProperty(exports, "toSequenceExpression", { - enumerable: true, - get: function () { - return _toSequenceExpression.default; - } -}); -Object.defineProperty(exports, "toStatement", { - enumerable: true, - get: function () { - return _toStatement.default; - } -}); -Object.defineProperty(exports, "valueToNode", { - enumerable: true, - get: function () { - return _valueToNode.default; - } -}); -Object.defineProperty(exports, "appendToMemberExpression", { - enumerable: true, - get: function () { - return _appendToMemberExpression.default; - } -}); -Object.defineProperty(exports, "inherits", { - enumerable: true, - get: function () { - return _inherits.default; - } -}); -Object.defineProperty(exports, "prependToMemberExpression", { - enumerable: true, - get: function () { - return _prependToMemberExpression.default; - } -}); -Object.defineProperty(exports, "removeProperties", { - enumerable: true, - get: function () { - return _removeProperties.default; - } -}); -Object.defineProperty(exports, "removePropertiesDeep", { - enumerable: true, - get: function () { - return _removePropertiesDeep.default; - } -}); -Object.defineProperty(exports, "removeTypeDuplicates", { - enumerable: true, - get: function () { - return _removeTypeDuplicates.default; - } -}); -Object.defineProperty(exports, "getBindingIdentifiers", { - enumerable: true, - get: function () { - return _getBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "getOuterBindingIdentifiers", { - enumerable: true, - get: function () { - return _getOuterBindingIdentifiers.default; - } -}); -Object.defineProperty(exports, "traverse", { - enumerable: true, - get: function () { - return _traverse.default; - } -}); -Object.defineProperty(exports, "traverseFast", { - enumerable: true, - get: function () { - return _traverseFast.default; - } -}); -Object.defineProperty(exports, "shallowEqual", { - enumerable: true, - get: function () { - return _shallowEqual.default; - } -}); -Object.defineProperty(exports, "is", { - enumerable: true, - get: function () { - return _is.default; - } -}); -Object.defineProperty(exports, "isBinding", { - enumerable: true, - get: function () { - return _isBinding.default; - } -}); -Object.defineProperty(exports, "isBlockScoped", { - enumerable: true, - get: function () { - return _isBlockScoped.default; - } -}); -Object.defineProperty(exports, "isImmutable", { - enumerable: true, - get: function () { - return _isImmutable.default; - } -}); -Object.defineProperty(exports, "isLet", { - enumerable: true, - get: function () { - return _isLet.default; - } -}); -Object.defineProperty(exports, "isNode", { - enumerable: true, - get: function () { - return _isNode.default; - } -}); -Object.defineProperty(exports, "isNodesEquivalent", { - enumerable: true, - get: function () { - return _isNodesEquivalent.default; - } -}); -Object.defineProperty(exports, "isPlaceholderType", { - enumerable: true, - get: function () { - return _isPlaceholderType.default; - } -}); -Object.defineProperty(exports, "isReferenced", { - enumerable: true, - get: function () { - return _isReferenced.default; - } -}); -Object.defineProperty(exports, "isScope", { - enumerable: true, - get: function () { - return _isScope.default; - } -}); -Object.defineProperty(exports, "isSpecifierDefault", { - enumerable: true, - get: function () { - return _isSpecifierDefault.default; - } -}); -Object.defineProperty(exports, "isType", { - enumerable: true, - get: function () { - return _isType.default; - } -}); -Object.defineProperty(exports, "isValidES3Identifier", { - enumerable: true, - get: function () { - return _isValidES3Identifier.default; - } -}); -Object.defineProperty(exports, "isValidIdentifier", { - enumerable: true, - get: function () { - return _isValidIdentifier.default; - } -}); -Object.defineProperty(exports, "isVar", { - enumerable: true, - get: function () { - return _isVar.default; - } -}); -Object.defineProperty(exports, "matchesPattern", { - enumerable: true, - get: function () { - return _matchesPattern.default; - } -}); -Object.defineProperty(exports, "validate", { - enumerable: true, - get: function () { - return _validate.default; - } -}); -Object.defineProperty(exports, "buildMatchMemberExpression", { - enumerable: true, - get: function () { - return _buildMatchMemberExpression.default; - } -}); -exports.react = void 0; - -var _isReactComponent = _interopRequireDefault(require("./validators/react/isReactComponent")); - -var _isCompatTag = _interopRequireDefault(require("./validators/react/isCompatTag")); - -var _buildChildren = _interopRequireDefault(require("./builders/react/buildChildren")); - -var _assertNode = _interopRequireDefault(require("./asserts/assertNode")); - -var _generated = require("./asserts/generated"); - -Object.keys(_generated).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated[key]; - } - }); -}); - -var _createTypeAnnotationBasedOnTypeof = _interopRequireDefault(require("./builders/flow/createTypeAnnotationBasedOnTypeof")); - -var _createUnionTypeAnnotation = _interopRequireDefault(require("./builders/flow/createUnionTypeAnnotation")); - -var _generated2 = require("./builders/generated"); - -Object.keys(_generated2).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated2[key]; - } - }); -}); - -var _cloneNode = _interopRequireDefault(require("./clone/cloneNode")); - -var _clone = _interopRequireDefault(require("./clone/clone")); - -var _cloneDeep = _interopRequireDefault(require("./clone/cloneDeep")); - -var _cloneDeepWithoutLoc = _interopRequireDefault(require("./clone/cloneDeepWithoutLoc")); - -var _cloneWithoutLoc = _interopRequireDefault(require("./clone/cloneWithoutLoc")); - -var _addComment = _interopRequireDefault(require("./comments/addComment")); - -var _addComments = _interopRequireDefault(require("./comments/addComments")); - -var _inheritInnerComments = _interopRequireDefault(require("./comments/inheritInnerComments")); - -var _inheritLeadingComments = _interopRequireDefault(require("./comments/inheritLeadingComments")); - -var _inheritsComments = _interopRequireDefault(require("./comments/inheritsComments")); - -var _inheritTrailingComments = _interopRequireDefault(require("./comments/inheritTrailingComments")); - -var _removeComments = _interopRequireDefault(require("./comments/removeComments")); - -var _generated3 = require("./constants/generated"); - -Object.keys(_generated3).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated3[key]; - } - }); -}); - -var _constants = require("./constants"); - -Object.keys(_constants).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _constants[key]; - } - }); -}); - -var _ensureBlock = _interopRequireDefault(require("./converters/ensureBlock")); - -var _toBindingIdentifierName = _interopRequireDefault(require("./converters/toBindingIdentifierName")); - -var _toBlock = _interopRequireDefault(require("./converters/toBlock")); - -var _toComputedKey = _interopRequireDefault(require("./converters/toComputedKey")); - -var _toExpression = _interopRequireDefault(require("./converters/toExpression")); - -var _toIdentifier = _interopRequireDefault(require("./converters/toIdentifier")); - -var _toKeyAlias = _interopRequireDefault(require("./converters/toKeyAlias")); - -var _toSequenceExpression = _interopRequireDefault(require("./converters/toSequenceExpression")); - -var _toStatement = _interopRequireDefault(require("./converters/toStatement")); - -var _valueToNode = _interopRequireDefault(require("./converters/valueToNode")); - -var _definitions = require("./definitions"); - -Object.keys(_definitions).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _definitions[key]; - } - }); -}); - -var _appendToMemberExpression = _interopRequireDefault(require("./modifications/appendToMemberExpression")); - -var _inherits = _interopRequireDefault(require("./modifications/inherits")); - -var _prependToMemberExpression = _interopRequireDefault(require("./modifications/prependToMemberExpression")); - -var _removeProperties = _interopRequireDefault(require("./modifications/removeProperties")); - -var _removePropertiesDeep = _interopRequireDefault(require("./modifications/removePropertiesDeep")); - -var _removeTypeDuplicates = _interopRequireDefault(require("./modifications/flow/removeTypeDuplicates")); - -var _getBindingIdentifiers = _interopRequireDefault(require("./retrievers/getBindingIdentifiers")); - -var _getOuterBindingIdentifiers = _interopRequireDefault(require("./retrievers/getOuterBindingIdentifiers")); - -var _traverse = _interopRequireDefault(require("./traverse/traverse")); - -var _traverseFast = _interopRequireDefault(require("./traverse/traverseFast")); - -var _shallowEqual = _interopRequireDefault(require("./utils/shallowEqual")); - -var _is = _interopRequireDefault(require("./validators/is")); - -var _isBinding = _interopRequireDefault(require("./validators/isBinding")); - -var _isBlockScoped = _interopRequireDefault(require("./validators/isBlockScoped")); - -var _isImmutable = _interopRequireDefault(require("./validators/isImmutable")); - -var _isLet = _interopRequireDefault(require("./validators/isLet")); - -var _isNode = _interopRequireDefault(require("./validators/isNode")); - -var _isNodesEquivalent = _interopRequireDefault(require("./validators/isNodesEquivalent")); - -var _isPlaceholderType = _interopRequireDefault(require("./validators/isPlaceholderType")); - -var _isReferenced = _interopRequireDefault(require("./validators/isReferenced")); - -var _isScope = _interopRequireDefault(require("./validators/isScope")); - -var _isSpecifierDefault = _interopRequireDefault(require("./validators/isSpecifierDefault")); - -var _isType = _interopRequireDefault(require("./validators/isType")); - -var _isValidES3Identifier = _interopRequireDefault(require("./validators/isValidES3Identifier")); - -var _isValidIdentifier = _interopRequireDefault(require("./validators/isValidIdentifier")); - -var _isVar = _interopRequireDefault(require("./validators/isVar")); - -var _matchesPattern = _interopRequireDefault(require("./validators/matchesPattern")); - -var _validate = _interopRequireDefault(require("./validators/validate")); - -var _buildMatchMemberExpression = _interopRequireDefault(require("./validators/buildMatchMemberExpression")); - -var _generated4 = require("./validators/generated"); - -Object.keys(_generated4).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function () { - return _generated4[key]; - } - }); -}); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const react = { - isReactComponent: _isReactComponent.default, - isCompatTag: _isCompatTag.default, - buildChildren: _buildChildren.default -}; -exports.react = react; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/index.js.flow b/packages/common/node_modules/@babel/types/lib/index.js.flow deleted file mode 100644 index c536937f80..0000000000 --- a/packages/common/node_modules/@babel/types/lib/index.js.flow +++ /dev/null @@ -1,2138 +0,0 @@ -// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/flow.js for script used. - -declare class BabelNodeComment { - value: string; - start: number; - end: number; - loc: BabelNodeSourceLocation; -} - -declare class BabelNodeCommentBlock extends BabelNodeComment { - type: "CommentBlock"; -} - -declare class BabelNodeCommentLine extends BabelNodeComment { - type: "CommentLine"; -} - -declare class BabelNodeSourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class BabelNode { - leadingComments?: Array; - innerComments?: Array; - trailingComments?: Array; - start: ?number; - end: ?number; - loc: ?BabelNodeSourceLocation; -} - -declare class BabelNodeArrayExpression extends BabelNode { - type: "ArrayExpression"; - elements?: Array; -} - -declare class BabelNodeAssignmentExpression extends BabelNode { - type: "AssignmentExpression"; - operator: string; - left: BabelNodeLVal; - right: BabelNodeExpression; -} - -declare class BabelNodeBinaryExpression extends BabelNode { - type: "BinaryExpression"; - operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<="; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeInterpreterDirective extends BabelNode { - type: "InterpreterDirective"; - value: string; -} - -declare class BabelNodeDirective extends BabelNode { - type: "Directive"; - value: BabelNodeDirectiveLiteral; -} - -declare class BabelNodeDirectiveLiteral extends BabelNode { - type: "DirectiveLiteral"; - value: string; -} - -declare class BabelNodeBlockStatement extends BabelNode { - type: "BlockStatement"; - body: Array; - directives?: Array; -} - -declare class BabelNodeBreakStatement extends BabelNode { - type: "BreakStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeCallExpression extends BabelNode { - type: "CallExpression"; - callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier; - arguments: Array; - optional?: true | false; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeCatchClause extends BabelNode { - type: "CatchClause"; - param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeConditionalExpression extends BabelNode { - type: "ConditionalExpression"; - test: BabelNodeExpression; - consequent: BabelNodeExpression; - alternate: BabelNodeExpression; -} - -declare class BabelNodeContinueStatement extends BabelNode { - type: "ContinueStatement"; - label?: BabelNodeIdentifier; -} - -declare class BabelNodeDebuggerStatement extends BabelNode { - type: "DebuggerStatement"; -} - -declare class BabelNodeDoWhileStatement extends BabelNode { - type: "DoWhileStatement"; - test: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeEmptyStatement extends BabelNode { - type: "EmptyStatement"; -} - -declare class BabelNodeExpressionStatement extends BabelNode { - type: "ExpressionStatement"; - expression: BabelNodeExpression; -} - -declare class BabelNodeFile extends BabelNode { - type: "File"; - program: BabelNodeProgram; - comments: any; - tokens: any; -} - -declare class BabelNodeForInStatement extends BabelNode { - type: "ForInStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeForStatement extends BabelNode { - type: "ForStatement"; - init?: BabelNodeVariableDeclaration | BabelNodeExpression; - test?: BabelNodeExpression; - update?: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeFunctionDeclaration extends BabelNode { - type: "FunctionDeclaration"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - declare?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeFunctionExpression extends BabelNode { - type: "FunctionExpression"; - id?: BabelNodeIdentifier; - params: Array; - body: BabelNodeBlockStatement; - generator?: boolean; - async?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeIdentifier extends BabelNode { - type: "Identifier"; - name: any; - decorators?: Array; - optional?: boolean; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeIfStatement extends BabelNode { - type: "IfStatement"; - test: BabelNodeExpression; - consequent: BabelNodeStatement; - alternate?: BabelNodeStatement; -} - -declare class BabelNodeLabeledStatement extends BabelNode { - type: "LabeledStatement"; - label: BabelNodeIdentifier; - body: BabelNodeStatement; -} - -declare class BabelNodeStringLiteral extends BabelNode { - type: "StringLiteral"; - value: string; -} - -declare class BabelNodeNumericLiteral extends BabelNode { - type: "NumericLiteral"; - value: number; -} - -declare class BabelNodeNullLiteral extends BabelNode { - type: "NullLiteral"; -} - -declare class BabelNodeBooleanLiteral extends BabelNode { - type: "BooleanLiteral"; - value: boolean; -} - -declare class BabelNodeRegExpLiteral extends BabelNode { - type: "RegExpLiteral"; - pattern: string; - flags?: any; -} - -declare class BabelNodeLogicalExpression extends BabelNode { - type: "LogicalExpression"; - operator: "||" | "&&" | "??"; - left: BabelNodeExpression; - right: BabelNodeExpression; -} - -declare class BabelNodeMemberExpression extends BabelNode { - type: "MemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional?: true | false; -} - -declare class BabelNodeNewExpression extends BabelNode { - type: "NewExpression"; - callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier; - arguments: Array; - optional?: true | false; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeProgram extends BabelNode { - type: "Program"; - body: Array; - directives?: Array; - sourceType?: "script" | "module"; - interpreter?: BabelNodeInterpreterDirective; - sourceFile: string; -} - -declare class BabelNodeObjectExpression extends BabelNode { - type: "ObjectExpression"; - properties: Array; -} - -declare class BabelNodeObjectMethod extends BabelNode { - type: "ObjectMethod"; - kind?: "method" | "get" | "set"; - key: any; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - generator?: boolean; - async?: boolean; - decorators?: Array; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectProperty extends BabelNode { - type: "ObjectProperty"; - key: any; - value: BabelNodeExpression | BabelNodePatternLike; - computed?: boolean; - shorthand?: any; - decorators?: Array; -} - -declare class BabelNodeRestElement extends BabelNode { - type: "RestElement"; - argument: BabelNodeLVal; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeReturnStatement extends BabelNode { - type: "ReturnStatement"; - argument?: BabelNodeExpression; -} - -declare class BabelNodeSequenceExpression extends BabelNode { - type: "SequenceExpression"; - expressions: Array; -} - -declare class BabelNodeParenthesizedExpression extends BabelNode { - type: "ParenthesizedExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeSwitchCase extends BabelNode { - type: "SwitchCase"; - test?: BabelNodeExpression; - consequent: Array; -} - -declare class BabelNodeSwitchStatement extends BabelNode { - type: "SwitchStatement"; - discriminant: BabelNodeExpression; - cases: Array; -} - -declare class BabelNodeThisExpression extends BabelNode { - type: "ThisExpression"; -} - -declare class BabelNodeThrowStatement extends BabelNode { - type: "ThrowStatement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeTryStatement extends BabelNode { - type: "TryStatement"; - block: any; - handler?: BabelNodeCatchClause; - finalizer?: BabelNodeBlockStatement; -} - -declare class BabelNodeUnaryExpression extends BabelNode { - type: "UnaryExpression"; - operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeUpdateExpression extends BabelNode { - type: "UpdateExpression"; - operator: "++" | "--"; - argument: BabelNodeExpression; - prefix?: boolean; -} - -declare class BabelNodeVariableDeclaration extends BabelNode { - type: "VariableDeclaration"; - kind: "var" | "let" | "const"; - declarations: Array; - declare?: boolean; -} - -declare class BabelNodeVariableDeclarator extends BabelNode { - type: "VariableDeclarator"; - id: BabelNodeLVal; - init?: BabelNodeExpression; - definite?: boolean; -} - -declare class BabelNodeWhileStatement extends BabelNode { - type: "WhileStatement"; - test: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeWithStatement extends BabelNode { - type: "WithStatement"; - object: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeAssignmentPattern extends BabelNode { - type: "AssignmentPattern"; - left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression; - right: BabelNodeExpression; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrayPattern extends BabelNode { - type: "ArrayPattern"; - elements: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeArrowFunctionExpression extends BabelNode { - type: "ArrowFunctionExpression"; - params: Array; - body: BabelNodeBlockStatement | BabelNodeExpression; - async?: boolean; - expression: boolean; - generator?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassBody extends BabelNode { - type: "ClassBody"; - body: Array; -} - -declare class BabelNodeClassExpression extends BabelNode { - type: "ClassExpression"; - id?: BabelNodeIdentifier; - superClass?: BabelNodeExpression; - body: BabelNodeClassBody; - decorators?: Array; - mixins: any; - superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeClassDeclaration extends BabelNode { - type: "ClassDeclaration"; - id: any; - superClass: any; - body: any; - decorators: any; - abstract?: boolean; - declare?: boolean; - mixins: any; - superTypeParameters: any; - typeParameters: any; -} - -declare class BabelNodeExportAllDeclaration extends BabelNode { - type: "ExportAllDeclaration"; - source: BabelNodeStringLiteral; -} - -declare class BabelNodeExportDefaultDeclaration extends BabelNode { - type: "ExportDefaultDeclaration"; - declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression; -} - -declare class BabelNodeExportNamedDeclaration extends BabelNode { - type: "ExportNamedDeclaration"; - declaration?: any; - specifiers?: Array; - source?: BabelNodeStringLiteral; - exportKind?: "type" | "value"; -} - -declare class BabelNodeExportSpecifier extends BabelNode { - type: "ExportSpecifier"; - local: BabelNodeIdentifier; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeForOfStatement extends BabelNode { - type: "ForOfStatement"; - left: BabelNodeVariableDeclaration | BabelNodeLVal; - right: BabelNodeExpression; - body: BabelNodeStatement; -} - -declare class BabelNodeImportDeclaration extends BabelNode { - type: "ImportDeclaration"; - specifiers: Array; - source: BabelNodeStringLiteral; - importKind?: "type" | "typeof" | "value"; -} - -declare class BabelNodeImportDefaultSpecifier extends BabelNode { - type: "ImportDefaultSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportNamespaceSpecifier extends BabelNode { - type: "ImportNamespaceSpecifier"; - local: BabelNodeIdentifier; -} - -declare class BabelNodeImportSpecifier extends BabelNode { - type: "ImportSpecifier"; - local: BabelNodeIdentifier; - imported: BabelNodeIdentifier; - importKind?: "type" | "typeof"; -} - -declare class BabelNodeMetaProperty extends BabelNode { - type: "MetaProperty"; - meta: any; - property: BabelNodeIdentifier; -} - -declare class BabelNodeClassMethod extends BabelNode { - type: "ClassMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - params: Array; - body: BabelNodeBlockStatement; - computed?: boolean; - generator?: boolean; - async?: boolean; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - decorators?: Array; - optional?: boolean; - returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; -} - -declare class BabelNodeObjectPattern extends BabelNode { - type: "ObjectPattern"; - properties: Array; - decorators?: Array; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; -} - -declare class BabelNodeSpreadElement extends BabelNode { - type: "SpreadElement"; - argument: BabelNodeExpression; -} - -declare class BabelNodeSuper extends BabelNode { - type: "Super"; -} - -declare class BabelNodeTaggedTemplateExpression extends BabelNode { - type: "TaggedTemplateExpression"; - tag: BabelNodeExpression; - quasi: BabelNodeTemplateLiteral; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTemplateElement extends BabelNode { - type: "TemplateElement"; - value: { raw: string, cooked?: string }; - tail?: boolean; -} - -declare class BabelNodeTemplateLiteral extends BabelNode { - type: "TemplateLiteral"; - quasis: Array; - expressions: Array; -} - -declare class BabelNodeYieldExpression extends BabelNode { - type: "YieldExpression"; - argument?: BabelNodeExpression; - delegate?: any; -} - -declare class BabelNodeAnyTypeAnnotation extends BabelNode { - type: "AnyTypeAnnotation"; -} - -declare class BabelNodeArrayTypeAnnotation extends BabelNode { - type: "ArrayTypeAnnotation"; - elementType: BabelNodeFlowType; -} - -declare class BabelNodeBooleanTypeAnnotation extends BabelNode { - type: "BooleanTypeAnnotation"; -} - -declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode { - type: "BooleanLiteralTypeAnnotation"; - value: boolean; -} - -declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode { - type: "NullLiteralTypeAnnotation"; -} - -declare class BabelNodeClassImplements extends BabelNode { - type: "ClassImplements"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeDeclareClass extends BabelNode { - type: "DeclareClass"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareFunction extends BabelNode { - type: "DeclareFunction"; - id: BabelNodeIdentifier; - predicate?: BabelNodeDeclaredPredicate; -} - -declare class BabelNodeDeclareInterface extends BabelNode { - type: "DeclareInterface"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeDeclareModule extends BabelNode { - type: "DeclareModule"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeBlockStatement; - kind?: "CommonJS" | "ES"; -} - -declare class BabelNodeDeclareModuleExports extends BabelNode { - type: "DeclareModuleExports"; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeDeclareTypeAlias extends BabelNode { - type: "DeclareTypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeDeclareOpaqueType extends BabelNode { - type: "DeclareOpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; -} - -declare class BabelNodeDeclareVariable extends BabelNode { - type: "DeclareVariable"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeDeclareExportDeclaration extends BabelNode { - type: "DeclareExportDeclaration"; - declaration?: BabelNodeFlow; - specifiers?: Array; - source?: BabelNodeStringLiteral; -} - -declare class BabelNodeDeclareExportAllDeclaration extends BabelNode { - type: "DeclareExportAllDeclaration"; - source: BabelNodeStringLiteral; - exportKind?: "type" | "value"; -} - -declare class BabelNodeDeclaredPredicate extends BabelNode { - type: "DeclaredPredicate"; - value: BabelNodeFlow; -} - -declare class BabelNodeExistsTypeAnnotation extends BabelNode { - type: "ExistsTypeAnnotation"; -} - -declare class BabelNodeFunctionTypeAnnotation extends BabelNode { - type: "FunctionTypeAnnotation"; - typeParameters?: BabelNodeTypeParameterDeclaration; - params: Array; - rest?: BabelNodeFunctionTypeParam; - returnType: BabelNodeFlowType; -} - -declare class BabelNodeFunctionTypeParam extends BabelNode { - type: "FunctionTypeParam"; - name?: BabelNodeIdentifier; - typeAnnotation: BabelNodeFlowType; - optional?: boolean; -} - -declare class BabelNodeGenericTypeAnnotation extends BabelNode { - type: "GenericTypeAnnotation"; - id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInferredPredicate extends BabelNode { - type: "InferredPredicate"; -} - -declare class BabelNodeInterfaceExtends extends BabelNode { - type: "InterfaceExtends"; - id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; - typeParameters?: BabelNodeTypeParameterInstantiation; -} - -declare class BabelNodeInterfaceDeclaration extends BabelNode { - type: "InterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - body: BabelNodeObjectTypeAnnotation; - mixins?: Array; -} - -declare class BabelNodeInterfaceTypeAnnotation extends BabelNode { - type: "InterfaceTypeAnnotation"; - body: BabelNodeObjectTypeAnnotation; -} - -declare class BabelNodeIntersectionTypeAnnotation extends BabelNode { - type: "IntersectionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeMixedTypeAnnotation extends BabelNode { - type: "MixedTypeAnnotation"; -} - -declare class BabelNodeEmptyTypeAnnotation extends BabelNode { - type: "EmptyTypeAnnotation"; -} - -declare class BabelNodeNullableTypeAnnotation extends BabelNode { - type: "NullableTypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode { - type: "NumberLiteralTypeAnnotation"; - value: number; -} - -declare class BabelNodeNumberTypeAnnotation extends BabelNode { - type: "NumberTypeAnnotation"; -} - -declare class BabelNodeObjectTypeAnnotation extends BabelNode { - type: "ObjectTypeAnnotation"; - properties: Array; - indexers?: Array; - callProperties?: Array; - internalSlots?: Array; - exact?: boolean; - inexact?: boolean; -} - -declare class BabelNodeObjectTypeInternalSlot extends BabelNode { - type: "ObjectTypeInternalSlot"; - id: BabelNodeIdentifier; - value: BabelNodeFlowType; - optional: boolean; - method: boolean; -} - -declare class BabelNodeObjectTypeCallProperty extends BabelNode { - type: "ObjectTypeCallProperty"; - value: BabelNodeFlowType; -} - -declare class BabelNodeObjectTypeIndexer extends BabelNode { - type: "ObjectTypeIndexer"; - id?: BabelNodeIdentifier; - key: BabelNodeFlowType; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; -} - -declare class BabelNodeObjectTypeProperty extends BabelNode { - type: "ObjectTypeProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral; - value: BabelNodeFlowType; - variance?: BabelNodeVariance; - kind: "init" | "get" | "set"; - optional: boolean; - proto: boolean; -} - -declare class BabelNodeObjectTypeSpreadProperty extends BabelNode { - type: "ObjectTypeSpreadProperty"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeOpaqueType extends BabelNode { - type: "OpaqueType"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - supertype?: BabelNodeFlowType; - impltype: BabelNodeFlowType; -} - -declare class BabelNodeQualifiedTypeIdentifier extends BabelNode { - type: "QualifiedTypeIdentifier"; - id: BabelNodeIdentifier; - qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier; -} - -declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode { - type: "StringLiteralTypeAnnotation"; - value: string; -} - -declare class BabelNodeStringTypeAnnotation extends BabelNode { - type: "StringTypeAnnotation"; -} - -declare class BabelNodeSymbolTypeAnnotation extends BabelNode { - type: "SymbolTypeAnnotation"; -} - -declare class BabelNodeThisTypeAnnotation extends BabelNode { - type: "ThisTypeAnnotation"; -} - -declare class BabelNodeTupleTypeAnnotation extends BabelNode { - type: "TupleTypeAnnotation"; - types: Array; -} - -declare class BabelNodeTypeofTypeAnnotation extends BabelNode { - type: "TypeofTypeAnnotation"; - argument: BabelNodeFlowType; -} - -declare class BabelNodeTypeAlias extends BabelNode { - type: "TypeAlias"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTypeParameterDeclaration; - right: BabelNodeFlowType; -} - -declare class BabelNodeTypeAnnotation extends BabelNode { - type: "TypeAnnotation"; - typeAnnotation: BabelNodeFlowType; -} - -declare class BabelNodeTypeCastExpression extends BabelNode { - type: "TypeCastExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTypeAnnotation; -} - -declare class BabelNodeTypeParameter extends BabelNode { - type: "TypeParameter"; - bound?: BabelNodeTypeAnnotation; - variance?: BabelNodeVariance; - name: string; -} - -declare class BabelNodeTypeParameterDeclaration extends BabelNode { - type: "TypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTypeParameterInstantiation extends BabelNode { - type: "TypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeUnionTypeAnnotation extends BabelNode { - type: "UnionTypeAnnotation"; - types: Array; -} - -declare class BabelNodeVariance extends BabelNode { - type: "Variance"; - kind: "minus" | "plus"; -} - -declare class BabelNodeVoidTypeAnnotation extends BabelNode { - type: "VoidTypeAnnotation"; -} - -declare class BabelNodeEnumDeclaration extends BabelNode { - type: "EnumDeclaration"; - id: BabelNodeIdentifier; - body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody; -} - -declare class BabelNodeEnumBooleanBody extends BabelNode { - type: "EnumBooleanBody"; - members: Array; - explicit: boolean; -} - -declare class BabelNodeEnumNumberBody extends BabelNode { - type: "EnumNumberBody"; - members: Array; - explicit: boolean; -} - -declare class BabelNodeEnumStringBody extends BabelNode { - type: "EnumStringBody"; - members: Array; - explicit: boolean; -} - -declare class BabelNodeEnumSymbolBody extends BabelNode { - type: "EnumSymbolBody"; - members: Array; -} - -declare class BabelNodeEnumBooleanMember extends BabelNode { - type: "EnumBooleanMember"; - id: BabelNodeIdentifier; - init: BabelNodeBooleanLiteral; -} - -declare class BabelNodeEnumNumberMember extends BabelNode { - type: "EnumNumberMember"; - id: BabelNodeIdentifier; - init: BabelNodeNumericLiteral; -} - -declare class BabelNodeEnumStringMember extends BabelNode { - type: "EnumStringMember"; - id: BabelNodeIdentifier; - init: BabelNodeStringLiteral; -} - -declare class BabelNodeEnumDefaultedMember extends BabelNode { - type: "EnumDefaultedMember"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeJSXAttribute extends BabelNode { - type: "JSXAttribute"; - name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName; - value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer; -} - -declare class BabelNodeJSXClosingElement extends BabelNode { - type: "JSXClosingElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName; -} - -declare class BabelNodeJSXElement extends BabelNode { - type: "JSXElement"; - openingElement: BabelNodeJSXOpeningElement; - closingElement?: BabelNodeJSXClosingElement; - children: Array; - selfClosing: any; -} - -declare class BabelNodeJSXEmptyExpression extends BabelNode { - type: "JSXEmptyExpression"; -} - -declare class BabelNodeJSXExpressionContainer extends BabelNode { - type: "JSXExpressionContainer"; - expression: BabelNodeExpression | BabelNodeJSXEmptyExpression; -} - -declare class BabelNodeJSXSpreadChild extends BabelNode { - type: "JSXSpreadChild"; - expression: BabelNodeExpression; -} - -declare class BabelNodeJSXIdentifier extends BabelNode { - type: "JSXIdentifier"; - name: string; -} - -declare class BabelNodeJSXMemberExpression extends BabelNode { - type: "JSXMemberExpression"; - object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier; - property: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXNamespacedName extends BabelNode { - type: "JSXNamespacedName"; - namespace: BabelNodeJSXIdentifier; - name: BabelNodeJSXIdentifier; -} - -declare class BabelNodeJSXOpeningElement extends BabelNode { - type: "JSXOpeningElement"; - name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName; - attributes: Array; - selfClosing?: boolean; - typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeJSXSpreadAttribute extends BabelNode { - type: "JSXSpreadAttribute"; - argument: BabelNodeExpression; -} - -declare class BabelNodeJSXText extends BabelNode { - type: "JSXText"; - value: string; -} - -declare class BabelNodeJSXFragment extends BabelNode { - type: "JSXFragment"; - openingFragment: BabelNodeJSXOpeningFragment; - closingFragment: BabelNodeJSXClosingFragment; - children: Array; -} - -declare class BabelNodeJSXOpeningFragment extends BabelNode { - type: "JSXOpeningFragment"; -} - -declare class BabelNodeJSXClosingFragment extends BabelNode { - type: "JSXClosingFragment"; -} - -declare class BabelNodeNoop extends BabelNode { - type: "Noop"; -} - -declare class BabelNodePlaceholder extends BabelNode { - type: "Placeholder"; - expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern"; - name: BabelNodeIdentifier; -} - -declare class BabelNodeV8IntrinsicIdentifier extends BabelNode { - type: "V8IntrinsicIdentifier"; - name: string; -} - -declare class BabelNodeArgumentPlaceholder extends BabelNode { - type: "ArgumentPlaceholder"; -} - -declare class BabelNodeAwaitExpression extends BabelNode { - type: "AwaitExpression"; - argument: BabelNodeExpression; -} - -declare class BabelNodeBindExpression extends BabelNode { - type: "BindExpression"; - object: any; - callee: any; -} - -declare class BabelNodeClassProperty extends BabelNode { - type: "ClassProperty"; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - value?: BabelNodeExpression; - typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop; - decorators?: Array; - computed?: boolean; - abstract?: boolean; - accessibility?: "public" | "private" | "protected"; - declare?: boolean; - definite?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeOptionalMemberExpression extends BabelNode { - type: "OptionalMemberExpression"; - object: BabelNodeExpression; - property: any; - computed?: boolean; - optional: boolean; -} - -declare class BabelNodePipelineTopicExpression extends BabelNode { - type: "PipelineTopicExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodePipelineBareFunction extends BabelNode { - type: "PipelineBareFunction"; - callee: BabelNodeExpression; -} - -declare class BabelNodePipelinePrimaryTopicReference extends BabelNode { - type: "PipelinePrimaryTopicReference"; -} - -declare class BabelNodeOptionalCallExpression extends BabelNode { - type: "OptionalCallExpression"; - callee: BabelNodeExpression; - arguments: Array; - optional: boolean; - typeArguments?: BabelNodeTypeParameterInstantiation; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeClassPrivateProperty extends BabelNode { - type: "ClassPrivateProperty"; - key: BabelNodePrivateName; - value?: BabelNodeExpression; - decorators?: Array; -} - -declare class BabelNodeClassPrivateMethod extends BabelNode { - type: "ClassPrivateMethod"; - kind?: "get" | "set" | "method" | "constructor"; - key: BabelNodePrivateName; - params: Array; - body: BabelNodeBlockStatement; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - decorators?: Array; - generator?: boolean; - optional?: boolean; - returnType: any; - typeParameters: any; -} - -declare class BabelNodeImport extends BabelNode { - type: "Import"; -} - -declare class BabelNodeDecorator extends BabelNode { - type: "Decorator"; - expression: BabelNodeExpression; -} - -declare class BabelNodeDoExpression extends BabelNode { - type: "DoExpression"; - body: BabelNodeBlockStatement; -} - -declare class BabelNodeExportDefaultSpecifier extends BabelNode { - type: "ExportDefaultSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodeExportNamespaceSpecifier extends BabelNode { - type: "ExportNamespaceSpecifier"; - exported: BabelNodeIdentifier; -} - -declare class BabelNodePrivateName extends BabelNode { - type: "PrivateName"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeBigIntLiteral extends BabelNode { - type: "BigIntLiteral"; - value: string; -} - -declare class BabelNodeRecordExpression extends BabelNode { - type: "RecordExpression"; - properties: Array; -} - -declare class BabelNodeTupleExpression extends BabelNode { - type: "TupleExpression"; - elements?: Array; -} - -declare class BabelNodeTSParameterProperty extends BabelNode { - type: "TSParameterProperty"; - parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern; - accessibility?: "public" | "private" | "protected"; - readonly?: boolean; -} - -declare class BabelNodeTSDeclareFunction extends BabelNode { - type: "TSDeclareFunction"; - id?: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - async?: boolean; - declare?: boolean; - generator?: boolean; -} - -declare class BabelNodeTSDeclareMethod extends BabelNode { - type: "TSDeclareMethod"; - decorators?: Array; - key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop; - params: Array; - returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop; - abstract?: boolean; - access?: "public" | "private" | "protected"; - accessibility?: "public" | "private" | "protected"; - async?: boolean; - computed?: boolean; - generator?: boolean; - kind?: "get" | "set" | "method" | "constructor"; - optional?: boolean; -} - -declare class BabelNodeTSQualifiedName extends BabelNode { - type: "TSQualifiedName"; - left: BabelNodeTSEntityName; - right: BabelNodeIdentifier; -} - -declare class BabelNodeTSCallSignatureDeclaration extends BabelNode { - type: "TSCallSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode { - type: "TSConstructSignatureDeclaration"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSPropertySignature extends BabelNode { - type: "TSPropertySignature"; - key: BabelNodeExpression; - typeAnnotation?: BabelNodeTSTypeAnnotation; - initializer?: BabelNodeExpression; - computed?: boolean; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSMethodSignature extends BabelNode { - type: "TSMethodSignature"; - key: BabelNodeExpression; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - computed?: boolean; - optional?: boolean; -} - -declare class BabelNodeTSIndexSignature extends BabelNode { - type: "TSIndexSignature"; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; - readonly?: boolean; -} - -declare class BabelNodeTSAnyKeyword extends BabelNode { - type: "TSAnyKeyword"; -} - -declare class BabelNodeTSBooleanKeyword extends BabelNode { - type: "TSBooleanKeyword"; -} - -declare class BabelNodeTSBigIntKeyword extends BabelNode { - type: "TSBigIntKeyword"; -} - -declare class BabelNodeTSNeverKeyword extends BabelNode { - type: "TSNeverKeyword"; -} - -declare class BabelNodeTSNullKeyword extends BabelNode { - type: "TSNullKeyword"; -} - -declare class BabelNodeTSNumberKeyword extends BabelNode { - type: "TSNumberKeyword"; -} - -declare class BabelNodeTSObjectKeyword extends BabelNode { - type: "TSObjectKeyword"; -} - -declare class BabelNodeTSStringKeyword extends BabelNode { - type: "TSStringKeyword"; -} - -declare class BabelNodeTSSymbolKeyword extends BabelNode { - type: "TSSymbolKeyword"; -} - -declare class BabelNodeTSUndefinedKeyword extends BabelNode { - type: "TSUndefinedKeyword"; -} - -declare class BabelNodeTSUnknownKeyword extends BabelNode { - type: "TSUnknownKeyword"; -} - -declare class BabelNodeTSVoidKeyword extends BabelNode { - type: "TSVoidKeyword"; -} - -declare class BabelNodeTSThisType extends BabelNode { - type: "TSThisType"; -} - -declare class BabelNodeTSFunctionType extends BabelNode { - type: "TSFunctionType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSConstructorType extends BabelNode { - type: "TSConstructorType"; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - parameters: Array; - typeAnnotation?: BabelNodeTSTypeAnnotation; -} - -declare class BabelNodeTSTypeReference extends BabelNode { - type: "TSTypeReference"; - typeName: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSTypePredicate extends BabelNode { - type: "TSTypePredicate"; - parameterName: BabelNodeIdentifier | BabelNodeTSThisType; - typeAnnotation?: BabelNodeTSTypeAnnotation; - asserts?: boolean; -} - -declare class BabelNodeTSTypeQuery extends BabelNode { - type: "TSTypeQuery"; - exprName: BabelNodeTSEntityName | BabelNodeTSImportType; -} - -declare class BabelNodeTSTypeLiteral extends BabelNode { - type: "TSTypeLiteral"; - members: Array; -} - -declare class BabelNodeTSArrayType extends BabelNode { - type: "TSArrayType"; - elementType: BabelNodeTSType; -} - -declare class BabelNodeTSTupleType extends BabelNode { - type: "TSTupleType"; - elementTypes: Array; -} - -declare class BabelNodeTSOptionalType extends BabelNode { - type: "TSOptionalType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSRestType extends BabelNode { - type: "TSRestType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSUnionType extends BabelNode { - type: "TSUnionType"; - types: Array; -} - -declare class BabelNodeTSIntersectionType extends BabelNode { - type: "TSIntersectionType"; - types: Array; -} - -declare class BabelNodeTSConditionalType extends BabelNode { - type: "TSConditionalType"; - checkType: BabelNodeTSType; - extendsType: BabelNodeTSType; - trueType: BabelNodeTSType; - falseType: BabelNodeTSType; -} - -declare class BabelNodeTSInferType extends BabelNode { - type: "TSInferType"; - typeParameter: BabelNodeTSTypeParameter; -} - -declare class BabelNodeTSParenthesizedType extends BabelNode { - type: "TSParenthesizedType"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeOperator extends BabelNode { - type: "TSTypeOperator"; - typeAnnotation: BabelNodeTSType; - operator: string; -} - -declare class BabelNodeTSIndexedAccessType extends BabelNode { - type: "TSIndexedAccessType"; - objectType: BabelNodeTSType; - indexType: BabelNodeTSType; -} - -declare class BabelNodeTSMappedType extends BabelNode { - type: "TSMappedType"; - typeParameter: BabelNodeTSTypeParameter; - typeAnnotation?: BabelNodeTSType; - optional?: boolean; - readonly?: boolean; -} - -declare class BabelNodeTSLiteralType extends BabelNode { - type: "TSLiteralType"; - literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral; -} - -declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode { - type: "TSExpressionWithTypeArguments"; - expression: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSInterfaceDeclaration extends BabelNode { - type: "TSInterfaceDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - body: BabelNodeTSInterfaceBody; - declare?: boolean; -} - -declare class BabelNodeTSInterfaceBody extends BabelNode { - type: "TSInterfaceBody"; - body: Array; -} - -declare class BabelNodeTSTypeAliasDeclaration extends BabelNode { - type: "TSTypeAliasDeclaration"; - id: BabelNodeIdentifier; - typeParameters?: BabelNodeTSTypeParameterDeclaration; - typeAnnotation: BabelNodeTSType; - declare?: boolean; -} - -declare class BabelNodeTSAsExpression extends BabelNode { - type: "TSAsExpression"; - expression: BabelNodeExpression; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeAssertion extends BabelNode { - type: "TSTypeAssertion"; - typeAnnotation: BabelNodeTSType; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSEnumDeclaration extends BabelNode { - type: "TSEnumDeclaration"; - id: BabelNodeIdentifier; - members: Array; - declare?: boolean; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSEnumMember extends BabelNode { - type: "TSEnumMember"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - initializer?: BabelNodeExpression; -} - -declare class BabelNodeTSModuleDeclaration extends BabelNode { - type: "TSModuleDeclaration"; - id: BabelNodeIdentifier | BabelNodeStringLiteral; - body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration; - declare?: boolean; - global?: boolean; -} - -declare class BabelNodeTSModuleBlock extends BabelNode { - type: "TSModuleBlock"; - body: Array; -} - -declare class BabelNodeTSImportType extends BabelNode { - type: "TSImportType"; - argument: BabelNodeStringLiteral; - qualifier?: BabelNodeTSEntityName; - typeParameters?: BabelNodeTSTypeParameterInstantiation; -} - -declare class BabelNodeTSImportEqualsDeclaration extends BabelNode { - type: "TSImportEqualsDeclaration"; - id: BabelNodeIdentifier; - moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference; - isExport: boolean; -} - -declare class BabelNodeTSExternalModuleReference extends BabelNode { - type: "TSExternalModuleReference"; - expression: BabelNodeStringLiteral; -} - -declare class BabelNodeTSNonNullExpression extends BabelNode { - type: "TSNonNullExpression"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSExportAssignment extends BabelNode { - type: "TSExportAssignment"; - expression: BabelNodeExpression; -} - -declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode { - type: "TSNamespaceExportDeclaration"; - id: BabelNodeIdentifier; -} - -declare class BabelNodeTSTypeAnnotation extends BabelNode { - type: "TSTypeAnnotation"; - typeAnnotation: BabelNodeTSType; -} - -declare class BabelNodeTSTypeParameterInstantiation extends BabelNode { - type: "TSTypeParameterInstantiation"; - params: Array; -} - -declare class BabelNodeTSTypeParameterDeclaration extends BabelNode { - type: "TSTypeParameterDeclaration"; - params: Array; -} - -declare class BabelNodeTSTypeParameter extends BabelNode { - type: "TSTypeParameter"; - constraint?: BabelNodeTSType; - name: string; -} - -type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeAwaitExpression | BabelNodeBindExpression | BabelNodeOptionalMemberExpression | BabelNodePipelinePrimaryTopicReference | BabelNodeOptionalCallExpression | BabelNodeImport | BabelNodeDoExpression | BabelNodeBigIntLiteral | BabelNodeRecordExpression | BabelNodeTupleExpression | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression; -type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression; -type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; -type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeTSModuleBlock; -type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock; -type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration; -type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression; -type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement; -type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement; -type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement; -type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement; -type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression; -type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement; -type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement; -type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeArrowFunctionExpression | BabelNodeBigIntLiteral; -type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration; -type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty; -type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName; -type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral; -type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeBigIntLiteral; -type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty; -type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod; -type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty; -type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassPrivateProperty; -type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement; -type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern; -type BabelNodeClass = BabelNodeClassExpression | BabelNodeClassDeclaration; -type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration; -type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration; -type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier; -type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation; -type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias; -type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate; -type BabelNodeEnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody; -type BabelNodeEnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember; -type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment; -type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName; -type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature; -type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType; - -declare module "@babel/types" { - declare function arrayExpression(elements?: Array): BabelNodeArrayExpression; - declare function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression; - declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeBinaryExpression; - declare function interpreterDirective(value: string): BabelNodeInterpreterDirective; - declare function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective; - declare function directiveLiteral(value: string): BabelNodeDirectiveLiteral; - declare function blockStatement(body: Array, directives?: Array): BabelNodeBlockStatement; - declare function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement; - declare function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array): BabelNodeCallExpression; - declare function catchClause(param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause; - declare function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression; - declare function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement; - declare function debuggerStatement(): BabelNodeDebuggerStatement; - declare function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement; - declare function emptyStatement(): BabelNodeEmptyStatement; - declare function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement; - declare function file(program: BabelNodeProgram, comments: any, tokens: any): BabelNodeFile; - declare function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement; - declare function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement; - declare function functionDeclaration(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionDeclaration; - declare function functionExpression(id?: BabelNodeIdentifier, params: Array, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionExpression; - declare function identifier(name: any): BabelNodeIdentifier; - declare function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement; - declare function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement; - declare function stringLiteral(value: string): BabelNodeStringLiteral; - declare function numericLiteral(value: number): BabelNodeNumericLiteral; - declare function nullLiteral(): BabelNodeNullLiteral; - declare function booleanLiteral(value: boolean): BabelNodeBooleanLiteral; - declare function regExpLiteral(pattern: string, flags?: any): BabelNodeRegExpLiteral; - declare function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression; - declare function memberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional?: true | false): BabelNodeMemberExpression; - declare function newExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array): BabelNodeNewExpression; - declare function program(body: Array, directives?: Array, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram; - declare function objectExpression(properties: Array): BabelNodeObjectExpression; - declare function objectMethod(kind?: "method" | "get" | "set", key: any, params: Array, body: BabelNodeBlockStatement, computed?: boolean, generator?: boolean, async?: boolean): BabelNodeObjectMethod; - declare function objectProperty(key: any, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: any, decorators?: Array): BabelNodeObjectProperty; - declare function restElement(argument: BabelNodeLVal): BabelNodeRestElement; - declare function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement; - declare function sequenceExpression(expressions: Array): BabelNodeSequenceExpression; - declare function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression; - declare function switchCase(test?: BabelNodeExpression, consequent: Array): BabelNodeSwitchCase; - declare function switchStatement(discriminant: BabelNodeExpression, cases: Array): BabelNodeSwitchStatement; - declare function thisExpression(): BabelNodeThisExpression; - declare function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement; - declare function tryStatement(block: any, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement; - declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression; - declare function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression; - declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array): BabelNodeVariableDeclaration; - declare function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression): BabelNodeVariableDeclarator; - declare function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement; - declare function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement; - declare function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern; - declare function arrayPattern(elements: Array): BabelNodeArrayPattern; - declare function arrowFunctionExpression(params: Array, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean): BabelNodeArrowFunctionExpression; - declare function classBody(body: Array): BabelNodeClassBody; - declare function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array): BabelNodeClassExpression; - declare function classDeclaration(id: any, superClass: any, body: any, decorators: any): BabelNodeClassDeclaration; - declare function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration; - declare function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration; - declare function exportNamedDeclaration(declaration?: any, specifiers?: Array, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration; - declare function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier): BabelNodeExportSpecifier; - declare function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement; - declare function importDeclaration(specifiers: Array, source: BabelNodeStringLiteral): BabelNodeImportDeclaration; - declare function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier; - declare function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier; - declare function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier): BabelNodeImportSpecifier; - declare function metaProperty(meta: any, property: BabelNodeIdentifier): BabelNodeMetaProperty; - declare function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): BabelNodeClassMethod; - declare function objectPattern(properties: Array): BabelNodeObjectPattern; - declare function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement; - declare function _super(): BabelNodeSuper; - declare export { _super as super } - declare function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression; - declare function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement; - declare function templateLiteral(quasis: Array, expressions: Array): BabelNodeTemplateLiteral; - declare function yieldExpression(argument?: BabelNodeExpression, delegate?: any): BabelNodeYieldExpression; - declare function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation; - declare function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation; - declare function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation; - declare function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation; - declare function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation; - declare function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements; - declare function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareClass; - declare function declareFunction(id: BabelNodeIdentifier): BabelNodeDeclareFunction; - declare function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareInterface; - declare function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule; - declare function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports; - declare function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias; - declare function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType; - declare function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable; - declare function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array, source?: BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration; - declare function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration; - declare function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate; - declare function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation; - declare function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation; - declare function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType): BabelNodeFunctionTypeParam; - declare function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation; - declare function inferredPredicate(): BabelNodeInferredPredicate; - declare function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends; - declare function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceDeclaration; - declare function interfaceTypeAnnotation(_extends?: Array, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation; - declare function intersectionTypeAnnotation(types: Array): BabelNodeIntersectionTypeAnnotation; - declare function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation; - declare function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation; - declare function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation; - declare function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation; - declare function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation; - declare function objectTypeAnnotation(properties: Array, indexers?: Array, callProperties?: Array, internalSlots?: Array, exact?: boolean): BabelNodeObjectTypeAnnotation; - declare function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot; - declare function objectTypeCallProperty(value: BabelNodeFlowType): BabelNodeObjectTypeCallProperty; - declare function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeIndexer; - declare function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeProperty; - declare function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty; - declare function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType; - declare function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier; - declare function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation; - declare function stringTypeAnnotation(): BabelNodeStringTypeAnnotation; - declare function symbolTypeAnnotation(): BabelNodeSymbolTypeAnnotation; - declare function thisTypeAnnotation(): BabelNodeThisTypeAnnotation; - declare function tupleTypeAnnotation(types: Array): BabelNodeTupleTypeAnnotation; - declare function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation; - declare function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias; - declare function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation; - declare function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression; - declare function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeTypeParameter; - declare function typeParameterDeclaration(params: Array): BabelNodeTypeParameterDeclaration; - declare function typeParameterInstantiation(params: Array): BabelNodeTypeParameterInstantiation; - declare function unionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation; - declare function variance(kind: "minus" | "plus"): BabelNodeVariance; - declare function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation; - declare function enumDeclaration(id: BabelNodeIdentifier, body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody): BabelNodeEnumDeclaration; - declare function enumBooleanBody(members: Array): BabelNodeEnumBooleanBody; - declare function enumNumberBody(members: Array): BabelNodeEnumNumberBody; - declare function enumStringBody(members: Array): BabelNodeEnumStringBody; - declare function enumSymbolBody(members: Array): BabelNodeEnumSymbolBody; - declare function enumBooleanMember(id: BabelNodeIdentifier): BabelNodeEnumBooleanMember; - declare function enumNumberMember(id: BabelNodeIdentifier, init: BabelNodeNumericLiteral): BabelNodeEnumNumberMember; - declare function enumStringMember(id: BabelNodeIdentifier, init: BabelNodeStringLiteral): BabelNodeEnumStringMember; - declare function enumDefaultedMember(id: BabelNodeIdentifier): BabelNodeEnumDefaultedMember; - declare function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute; - declare function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName): BabelNodeJSXClosingElement; - declare function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array, selfClosing: any): BabelNodeJSXElement; - declare function jsxEmptyExpression(): BabelNodeJSXEmptyExpression; - declare function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer; - declare function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild; - declare function jsxIdentifier(name: string): BabelNodeJSXIdentifier; - declare function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression; - declare function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName; - declare function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName, attributes: Array, selfClosing?: boolean): BabelNodeJSXOpeningElement; - declare function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute; - declare function jsxText(value: string): BabelNodeJSXText; - declare function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array): BabelNodeJSXFragment; - declare function jsxOpeningFragment(): BabelNodeJSXOpeningFragment; - declare function jsxClosingFragment(): BabelNodeJSXClosingFragment; - declare function noop(): BabelNodeNoop; - declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder; - declare function v8IntrinsicIdentifier(name: string): BabelNodeV8IntrinsicIdentifier; - declare function argumentPlaceholder(): BabelNodeArgumentPlaceholder; - declare function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression; - declare function bindExpression(object: any, callee: any): BabelNodeBindExpression; - declare function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array, computed?: boolean, _static?: boolean): BabelNodeClassProperty; - declare function optionalMemberExpression(object: BabelNodeExpression, property: any, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression; - declare function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression; - declare function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction; - declare function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference; - declare function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array, optional: boolean): BabelNodeOptionalCallExpression; - declare function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression, decorators?: Array): BabelNodeClassPrivateProperty; - declare function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array, body: BabelNodeBlockStatement, _static?: boolean): BabelNodeClassPrivateMethod; - declare function _import(): BabelNodeImport; - declare export { _import as import } - declare function decorator(expression: BabelNodeExpression): BabelNodeDecorator; - declare function doExpression(body: BabelNodeBlockStatement): BabelNodeDoExpression; - declare function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier; - declare function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier; - declare function privateName(id: BabelNodeIdentifier): BabelNodePrivateName; - declare function bigIntLiteral(value: string): BabelNodeBigIntLiteral; - declare function recordExpression(properties: Array): BabelNodeRecordExpression; - declare function tupleExpression(elements?: Array): BabelNodeTupleExpression; - declare function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern): BabelNodeTSParameterProperty; - declare function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareFunction; - declare function tsDeclareMethod(decorators?: Array, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareMethod; - declare function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName; - declare function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration; - declare function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration; - declare function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression): BabelNodeTSPropertySignature; - declare function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSMethodSignature; - declare function tsIndexSignature(parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSIndexSignature; - declare function tsAnyKeyword(): BabelNodeTSAnyKeyword; - declare function tsBooleanKeyword(): BabelNodeTSBooleanKeyword; - declare function tsBigIntKeyword(): BabelNodeTSBigIntKeyword; - declare function tsNeverKeyword(): BabelNodeTSNeverKeyword; - declare function tsNullKeyword(): BabelNodeTSNullKeyword; - declare function tsNumberKeyword(): BabelNodeTSNumberKeyword; - declare function tsObjectKeyword(): BabelNodeTSObjectKeyword; - declare function tsStringKeyword(): BabelNodeTSStringKeyword; - declare function tsSymbolKeyword(): BabelNodeTSSymbolKeyword; - declare function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword; - declare function tsUnknownKeyword(): BabelNodeTSUnknownKeyword; - declare function tsVoidKeyword(): BabelNodeTSVoidKeyword; - declare function tsThisType(): BabelNodeTSThisType; - declare function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType; - declare function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType; - declare function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference; - declare function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation?: BabelNodeTSTypeAnnotation, asserts?: boolean): BabelNodeTSTypePredicate; - declare function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery; - declare function tsTypeLiteral(members: Array): BabelNodeTSTypeLiteral; - declare function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType; - declare function tsTupleType(elementTypes: Array): BabelNodeTSTupleType; - declare function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType; - declare function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType; - declare function tsUnionType(types: Array): BabelNodeTSUnionType; - declare function tsIntersectionType(types: Array): BabelNodeTSIntersectionType; - declare function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType; - declare function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType; - declare function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType; - declare function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator; - declare function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType; - declare function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType): BabelNodeTSMappedType; - declare function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral): BabelNodeTSLiteralType; - declare function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments; - declare function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration; - declare function tsInterfaceBody(body: Array): BabelNodeTSInterfaceBody; - declare function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAliasDeclaration; - declare function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression; - declare function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion; - declare function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array): BabelNodeTSEnumDeclaration; - declare function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember; - declare function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration): BabelNodeTSModuleDeclaration; - declare function tsModuleBlock(body: Array): BabelNodeTSModuleBlock; - declare function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType; - declare function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference): BabelNodeTSImportEqualsDeclaration; - declare function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference; - declare function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression; - declare function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment; - declare function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration; - declare function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation; - declare function tsTypeParameterInstantiation(params: Array): BabelNodeTSTypeParameterInstantiation; - declare function tsTypeParameterDeclaration(params: Array): BabelNodeTSTypeParameterDeclaration; - declare function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name: string): BabelNodeTSTypeParameter; - declare function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression) - declare function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression) - declare function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression) - declare function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective) - declare function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective) - declare function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral) - declare function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement) - declare function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement) - declare function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression) - declare function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause) - declare function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression) - declare function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement) - declare function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement) - declare function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement) - declare function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement) - declare function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement) - declare function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile) - declare function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement) - declare function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement) - declare function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration) - declare function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression) - declare function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier) - declare function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement) - declare function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement) - declare function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral) - declare function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral) - declare function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral) - declare function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral) - declare function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral) - declare function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression) - declare function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression) - declare function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression) - declare function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram) - declare function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression) - declare function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod) - declare function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty) - declare function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement) - declare function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement) - declare function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression) - declare function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression) - declare function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase) - declare function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement) - declare function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression) - declare function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement) - declare function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement) - declare function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression) - declare function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression) - declare function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration) - declare function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator) - declare function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement) - declare function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement) - declare function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern) - declare function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern) - declare function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression) - declare function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody) - declare function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression) - declare function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration) - declare function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration) - declare function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration) - declare function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration) - declare function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier) - declare function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement) - declare function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration) - declare function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier) - declare function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier) - declare function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier) - declare function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty) - declare function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod) - declare function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern) - declare function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement) - declare function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper) - declare function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression) - declare function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement) - declare function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral) - declare function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression) - declare function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation) - declare function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation) - declare function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation) - declare function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation) - declare function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation) - declare function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements) - declare function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass) - declare function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction) - declare function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface) - declare function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule) - declare function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports) - declare function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias) - declare function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType) - declare function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable) - declare function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration) - declare function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration) - declare function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate) - declare function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation) - declare function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation) - declare function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam) - declare function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation) - declare function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate) - declare function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends) - declare function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration) - declare function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation) - declare function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation) - declare function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation) - declare function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation) - declare function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation) - declare function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation) - declare function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation) - declare function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation) - declare function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot) - declare function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty) - declare function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer) - declare function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty) - declare function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty) - declare function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType) - declare function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier) - declare function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation) - declare function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation) - declare function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSymbolTypeAnnotation) - declare function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation) - declare function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation) - declare function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation) - declare function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias) - declare function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation) - declare function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression) - declare function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter) - declare function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration) - declare function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation) - declare function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation) - declare function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance) - declare function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation) - declare function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDeclaration) - declare function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanBody) - declare function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberBody) - declare function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringBody) - declare function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumSymbolBody) - declare function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanMember) - declare function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberMember) - declare function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringMember) - declare function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDefaultedMember) - declare function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute) - declare function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement) - declare function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement) - declare function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression) - declare function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer) - declare function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild) - declare function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier) - declare function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression) - declare function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName) - declare function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement) - declare function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute) - declare function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText) - declare function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment) - declare function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment) - declare function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment) - declare function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop) - declare function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder) - declare function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeV8IntrinsicIdentifier) - declare function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder) - declare function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression) - declare function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression) - declare function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty) - declare function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression) - declare function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression) - declare function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction) - declare function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference) - declare function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression) - declare function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty) - declare function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod) - declare function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport) - declare function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator) - declare function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression) - declare function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier) - declare function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier) - declare function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName) - declare function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral) - declare function isRecordExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRecordExpression) - declare function isTupleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleExpression) - declare function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty) - declare function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction) - declare function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod) - declare function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName) - declare function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration) - declare function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration) - declare function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature) - declare function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature) - declare function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature) - declare function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword) - declare function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword) - declare function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBigIntKeyword) - declare function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword) - declare function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword) - declare function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword) - declare function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword) - declare function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword) - declare function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword) - declare function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword) - declare function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword) - declare function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword) - declare function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType) - declare function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType) - declare function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType) - declare function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference) - declare function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate) - declare function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery) - declare function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral) - declare function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType) - declare function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType) - declare function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType) - declare function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType) - declare function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType) - declare function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType) - declare function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType) - declare function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType) - declare function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType) - declare function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator) - declare function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType) - declare function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType) - declare function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType) - declare function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments) - declare function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration) - declare function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody) - declare function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration) - declare function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression) - declare function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion) - declare function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration) - declare function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember) - declare function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration) - declare function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock) - declare function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType) - declare function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration) - declare function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference) - declare function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression) - declare function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment) - declare function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration) - declare function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation) - declare function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation) - declare function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration) - declare function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter) - declare function isExpression(node: ?Object, opts?: ?Object): boolean - declare function isBinary(node: ?Object, opts?: ?Object): boolean - declare function isScopable(node: ?Object, opts?: ?Object): boolean - declare function isBlockParent(node: ?Object, opts?: ?Object): boolean - declare function isBlock(node: ?Object, opts?: ?Object): boolean - declare function isStatement(node: ?Object, opts?: ?Object): boolean - declare function isTerminatorless(node: ?Object, opts?: ?Object): boolean - declare function isCompletionStatement(node: ?Object, opts?: ?Object): boolean - declare function isConditional(node: ?Object, opts?: ?Object): boolean - declare function isLoop(node: ?Object, opts?: ?Object): boolean - declare function isWhile(node: ?Object, opts?: ?Object): boolean - declare function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean - declare function isFor(node: ?Object, opts?: ?Object): boolean - declare function isForXStatement(node: ?Object, opts?: ?Object): boolean - declare function isFunction(node: ?Object, opts?: ?Object): boolean - declare function isFunctionParent(node: ?Object, opts?: ?Object): boolean - declare function isPureish(node: ?Object, opts?: ?Object): boolean - declare function isDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isPatternLike(node: ?Object, opts?: ?Object): boolean - declare function isLVal(node: ?Object, opts?: ?Object): boolean - declare function isTSEntityName(node: ?Object, opts?: ?Object): boolean - declare function isLiteral(node: ?Object, opts?: ?Object): boolean - declare function isImmutable(node: ?Object, opts?: ?Object): boolean - declare function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean - declare function isMethod(node: ?Object, opts?: ?Object): boolean - declare function isObjectMember(node: ?Object, opts?: ?Object): boolean - declare function isProperty(node: ?Object, opts?: ?Object): boolean - declare function isUnaryLike(node: ?Object, opts?: ?Object): boolean - declare function isPattern(node: ?Object, opts?: ?Object): boolean - declare function isClass(node: ?Object, opts?: ?Object): boolean - declare function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isExportDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean - declare function isFlow(node: ?Object, opts?: ?Object): boolean - declare function isFlowType(node: ?Object, opts?: ?Object): boolean - declare function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean - declare function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean - declare function isFlowPredicate(node: ?Object, opts?: ?Object): boolean - declare function isEnumBody(node: ?Object, opts?: ?Object): boolean - declare function isEnumMember(node: ?Object, opts?: ?Object): boolean - declare function isJSX(node: ?Object, opts?: ?Object): boolean - declare function isPrivate(node: ?Object, opts?: ?Object): boolean - declare function isTSTypeElement(node: ?Object, opts?: ?Object): boolean - declare function isTSType(node: ?Object, opts?: ?Object): boolean - declare function isNumberLiteral(node: ?Object, opts?: ?Object): boolean - declare function isRegexLiteral(node: ?Object, opts?: ?Object): boolean - declare function isRestProperty(node: ?Object, opts?: ?Object): boolean - declare function isSpreadProperty(node: ?Object, opts?: ?Object): boolean - declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation - declare function createUnionTypeAnnotation(types: Array): BabelNodeUnionTypeAnnotation - declare function buildChildren(node: { children: Array }): Array - declare function clone(n: T): T; - declare function cloneDeep(n: T): T; - declare function cloneDeepWithoutLoc(n: T): T; - declare function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T; - declare function cloneWithoutLoc(n: T): T; - declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing' - declare function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T - declare function addComments(node: T, type: CommentTypeShorthand, comments: Array): T - declare function inheritInnerComments(node: Node, parent: Node): void - declare function inheritLeadingComments(node: Node, parent: Node): void - declare function inheritsComments(node: T, parent: Node): void - declare function inheritTrailingComments(node: Node, parent: Node): void - declare function removeComments(node: T): T - declare function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement - declare function toBindingIdentifierName(name?: ?string): string - declare function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement - declare function toComputedKey(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNodeExpression | BabelNodeIdentifier): BabelNodeExpression - declare function toExpression(node: BabelNodeExpressionStatement | BabelNodeExpression | BabelNodeClass | BabelNodeFunction): BabelNodeExpression - declare function toIdentifier(name?: ?string): string - declare function toKeyAlias(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNode): string - declare function toStatement(node: BabelNodeStatement | BabelNodeClass | BabelNodeFunction | BabelNodeAssignmentExpression, ignore?: boolean): BabelNodeStatement | void - declare function valueToNode(value: any): BabelNodeExpression - declare function removeTypeDuplicates(types: Array): Array - declare function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression - declare function inherits(child: T, parent: BabelNode | null | void): T - declare function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression - declare function removeProperties(n: T, opts: ?{}): void; - declare function removePropertiesDeep(n: T, opts: ?{}): T; - declare function getBindingIdentifiers(node: BabelNode, duplicates: boolean, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier | Array } - declare function getOuterBindingIdentifiers(node: Node, duplicates: boolean): { [key: string]: BabelNodeIdentifier | Array } - declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - }; - declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void; - declare function traverseFast(n: Node, h: TraversalHandler, state?: T): void; - declare function shallowEqual(actual: Object, expected: Object): boolean - declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean - declare function is(type: string, n: BabelNode, opts: Object): boolean; - declare function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean - declare function isBlockScoped(node: BabelNode): boolean - declare function isImmutable(node: BabelNode): boolean - declare function isLet(node: BabelNode): boolean - declare function isNode(node: ?Object): boolean - declare function isNodesEquivalent(a: any, b: any): boolean - declare function isPlaceholderType(placeholderType: string, targetType: string): boolean - declare function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean - declare function isScope(node: BabelNode, parent: BabelNode): boolean - declare function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean - declare function isType(nodetype: ?string, targetType: string): boolean - declare function isValidES3Identifier(name: string): boolean - declare function isValidES3Identifier(name: string): boolean - declare function isValidIdentifier(name: string): boolean - declare function isVar(node: BabelNode): boolean - declare function matchesPattern(node: ?BabelNode, match: string | Array, allowPartial?: boolean): boolean - declare function validate(n: BabelNode, key: string, value: mixed): void; -} diff --git a/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js deleted file mode 100644 index 6a0ac93c5c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = appendToMemberExpression; - -var _generated = require("../builders/generated"); - -function appendToMemberExpression(member, append, computed = false) { - member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed); - member.property = append; - member.computed = !!computed; - return member; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js deleted file mode 100644 index 5802683995..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeTypeDuplicates; - -var _generated = require("../../validators/generated"); - -function removeTypeDuplicates(nodes) { - const generics = {}; - const bases = {}; - const typeGroups = []; - const types = []; - - for (let i = 0; i < nodes.length; i++) { - const node = nodes[i]; - if (!node) continue; - - if (types.indexOf(node) >= 0) { - continue; - } - - if ((0, _generated.isAnyTypeAnnotation)(node)) { - return [node]; - } - - if ((0, _generated.isFlowBaseAnnotation)(node)) { - bases[node.type] = node; - continue; - } - - if ((0, _generated.isUnionTypeAnnotation)(node)) { - if (typeGroups.indexOf(node.types) < 0) { - nodes = nodes.concat(node.types); - typeGroups.push(node.types); - } - - continue; - } - - if ((0, _generated.isGenericTypeAnnotation)(node)) { - const name = node.id.name; - - if (generics[name]) { - let existing = generics[name]; - - if (existing.typeParameters) { - if (node.typeParameters) { - existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params)); - } - } else { - existing = node.typeParameters; - } - } else { - generics[name] = node; - } - - continue; - } - - types.push(node); - } - - for (const type of Object.keys(bases)) { - types.push(bases[type]); - } - - for (const name of Object.keys(generics)) { - types.push(generics[name]); - } - - return types; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/inherits.js b/packages/common/node_modules/@babel/types/lib/modifications/inherits.js deleted file mode 100644 index 64d72fcf2f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/inherits.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inherits; - -var _constants = require("../constants"); - -var _inheritsComments = _interopRequireDefault(require("../comments/inheritsComments")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inherits(child, parent) { - if (!child || !parent) return child; - - for (const key of _constants.INHERIT_KEYS.optional) { - if (child[key] == null) { - child[key] = parent[key]; - } - } - - for (const key of Object.keys(parent)) { - if (key[0] === "_" && key !== "__clone") child[key] = parent[key]; - } - - for (const key of _constants.INHERIT_KEYS.force) { - child[key] = parent[key]; - } - - (0, _inheritsComments.default)(child, parent); - return child; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js deleted file mode 100644 index ee6de0ec33..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = prependToMemberExpression; - -var _generated = require("../builders/generated"); - -function prependToMemberExpression(member, prepend) { - member.object = (0, _generated.memberExpression)(prepend, member.object); - return member; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js b/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js deleted file mode 100644 index f9cf8e6065..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/removeProperties.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removeProperties; - -var _constants = require("../constants"); - -const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"]; - -const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS); - -function removeProperties(node, opts = {}) { - const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS; - - for (const key of map) { - if (node[key] != null) node[key] = undefined; - } - - for (const key of Object.keys(node)) { - if (key[0] === "_" && node[key] != null) node[key] = undefined; - } - - const symbols = Object.getOwnPropertySymbols(node); - - for (const sym of symbols) { - node[sym] = null; - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js deleted file mode 100644 index d11a84a832..0000000000 --- a/packages/common/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = removePropertiesDeep; - -var _traverseFast = _interopRequireDefault(require("../traverse/traverseFast")); - -var _removeProperties = _interopRequireDefault(require("./removeProperties")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function removePropertiesDeep(tree, opts) { - (0, _traverseFast.default)(tree, _removeProperties.default, opts); - return tree; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js deleted file mode 100644 index 189f4b8eb3..0000000000 --- a/packages/common/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getBindingIdentifiers; - -var _generated = require("../validators/generated"); - -function getBindingIdentifiers(node, duplicates, outerOnly) { - let search = [].concat(node); - const ids = Object.create(null); - - while (search.length) { - const id = search.shift(); - if (!id) continue; - const keys = getBindingIdentifiers.keys[id.type]; - - if ((0, _generated.isIdentifier)(id)) { - if (duplicates) { - const _ids = ids[id.name] = ids[id.name] || []; - - _ids.push(id); - } else { - ids[id.name] = id; - } - - continue; - } - - if ((0, _generated.isExportDeclaration)(id)) { - if ((0, _generated.isDeclaration)(id.declaration)) { - search.push(id.declaration); - } - - continue; - } - - if (outerOnly) { - if ((0, _generated.isFunctionDeclaration)(id)) { - search.push(id.id); - continue; - } - - if ((0, _generated.isFunctionExpression)(id)) { - continue; - } - } - - if (keys) { - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - - if (id[key]) { - search = search.concat(id[key]); - } - } - } - } - - return ids; -} - -getBindingIdentifiers.keys = { - DeclareClass: ["id"], - DeclareFunction: ["id"], - DeclareModule: ["id"], - DeclareVariable: ["id"], - DeclareInterface: ["id"], - DeclareTypeAlias: ["id"], - DeclareOpaqueType: ["id"], - InterfaceDeclaration: ["id"], - TypeAlias: ["id"], - OpaqueType: ["id"], - CatchClause: ["param"], - LabeledStatement: ["label"], - UnaryExpression: ["argument"], - AssignmentExpression: ["left"], - ImportSpecifier: ["local"], - ImportNamespaceSpecifier: ["local"], - ImportDefaultSpecifier: ["local"], - ImportDeclaration: ["specifiers"], - ExportSpecifier: ["exported"], - ExportNamespaceSpecifier: ["exported"], - ExportDefaultSpecifier: ["exported"], - FunctionDeclaration: ["id", "params"], - FunctionExpression: ["id", "params"], - ArrowFunctionExpression: ["params"], - ObjectMethod: ["params"], - ClassMethod: ["params"], - ForInStatement: ["left"], - ForOfStatement: ["left"], - ClassDeclaration: ["id"], - ClassExpression: ["id"], - RestElement: ["argument"], - UpdateExpression: ["argument"], - ObjectProperty: ["value"], - AssignmentPattern: ["left"], - ArrayPattern: ["elements"], - ObjectPattern: ["properties"], - VariableDeclaration: ["declarations"], - VariableDeclarator: ["id"] -}; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js deleted file mode 100644 index 8e1e3cb200..0000000000 --- a/packages/common/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getOuterBindingIdentifiers; - -var _getBindingIdentifiers = _interopRequireDefault(require("./getBindingIdentifiers")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function getOuterBindingIdentifiers(node, duplicates) { - return (0, _getBindingIdentifiers.default)(node, duplicates, true); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/traverse/traverse.js b/packages/common/node_modules/@babel/types/lib/traverse/traverse.js deleted file mode 100644 index 775aed1eed..0000000000 --- a/packages/common/node_modules/@babel/types/lib/traverse/traverse.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverse; - -var _definitions = require("../definitions"); - -function traverse(node, handlers, state) { - if (typeof handlers === "function") { - handlers = { - enter: handlers - }; - } - - const { - enter, - exit - } = handlers; - traverseSimpleImpl(node, enter, exit, state, []); -} - -function traverseSimpleImpl(node, enter, exit, state, ancestors) { - const keys = _definitions.VISITOR_KEYS[node.type]; - if (!keys) return; - if (enter) enter(node, ancestors, state); - - for (const key of keys) { - const subNode = node[key]; - - if (Array.isArray(subNode)) { - for (let i = 0; i < subNode.length; i++) { - const child = subNode[i]; - if (!child) continue; - ancestors.push({ - node, - key, - index: i - }); - traverseSimpleImpl(child, enter, exit, state, ancestors); - ancestors.pop(); - } - } else if (subNode) { - ancestors.push({ - node, - key - }); - traverseSimpleImpl(subNode, enter, exit, state, ancestors); - ancestors.pop(); - } - } - - if (exit) exit(node, ancestors, state); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js b/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js deleted file mode 100644 index f038dd835e..0000000000 --- a/packages/common/node_modules/@babel/types/lib/traverse/traverseFast.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = traverseFast; - -var _definitions = require("../definitions"); - -function traverseFast(node, enter, opts) { - if (!node) return; - const keys = _definitions.VISITOR_KEYS[node.type]; - if (!keys) return; - opts = opts || {}; - enter(node, opts); - - for (const key of keys) { - const subNode = node[key]; - - if (Array.isArray(subNode)) { - for (const node of subNode) { - traverseFast(node, enter, opts); - } - } else { - traverseFast(subNode, enter, opts); - } - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/utils/inherit.js b/packages/common/node_modules/@babel/types/lib/utils/inherit.js deleted file mode 100644 index f6691c7034..0000000000 --- a/packages/common/node_modules/@babel/types/lib/utils/inherit.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = inherit; - -var _uniq = _interopRequireDefault(require("lodash/uniq")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function inherit(key, child, parent) { - if (child && parent) { - child[key] = (0, _uniq.default)([].concat(child[key], parent[key]).filter(Boolean)); - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js deleted file mode 100644 index f0ca13369b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = cleanJSXElementLiteralChild; - -var _generated = require("../../builders/generated"); - -function cleanJSXElementLiteralChild(child, args) { - const lines = child.value.split(/\r\n|\n|\r/); - let lastNonEmptyLine = 0; - - for (let i = 0; i < lines.length; i++) { - if (lines[i].match(/[^ \t]/)) { - lastNonEmptyLine = i; - } - } - - let str = ""; - - for (let i = 0; i < lines.length; i++) { - const line = lines[i]; - const isFirstLine = i === 0; - const isLastLine = i === lines.length - 1; - const isLastNonEmptyLine = i === lastNonEmptyLine; - let trimmedLine = line.replace(/\t/g, " "); - - if (!isFirstLine) { - trimmedLine = trimmedLine.replace(/^[ ]+/, ""); - } - - if (!isLastLine) { - trimmedLine = trimmedLine.replace(/[ ]+$/, ""); - } - - if (trimmedLine) { - if (!isLastNonEmptyLine) { - trimmedLine += " "; - } - - str += trimmedLine; - } - } - - if (str) args.push((0, _generated.stringLiteral)(str)); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js b/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js deleted file mode 100644 index fae259e4fc..0000000000 --- a/packages/common/node_modules/@babel/types/lib/utils/shallowEqual.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = shallowEqual; - -function shallowEqual(actual, expected) { - const keys = Object.keys(expected); - - for (const key of keys) { - if (actual[key] !== expected[key]) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js deleted file mode 100644 index 0faa29c5d6..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = buildMatchMemberExpression; - -var _matchesPattern = _interopRequireDefault(require("./matchesPattern")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function buildMatchMemberExpression(match, allowPartial) { - const parts = match.split("."); - return member => (0, _matchesPattern.default)(member, parts, allowPartial); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/generated/index.js b/packages/common/node_modules/@babel/types/lib/validators/generated/index.js deleted file mode 100644 index e0dd917f37..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/generated/index.js +++ /dev/null @@ -1,4573 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.isArrayExpression = isArrayExpression; -exports.isAssignmentExpression = isAssignmentExpression; -exports.isBinaryExpression = isBinaryExpression; -exports.isInterpreterDirective = isInterpreterDirective; -exports.isDirective = isDirective; -exports.isDirectiveLiteral = isDirectiveLiteral; -exports.isBlockStatement = isBlockStatement; -exports.isBreakStatement = isBreakStatement; -exports.isCallExpression = isCallExpression; -exports.isCatchClause = isCatchClause; -exports.isConditionalExpression = isConditionalExpression; -exports.isContinueStatement = isContinueStatement; -exports.isDebuggerStatement = isDebuggerStatement; -exports.isDoWhileStatement = isDoWhileStatement; -exports.isEmptyStatement = isEmptyStatement; -exports.isExpressionStatement = isExpressionStatement; -exports.isFile = isFile; -exports.isForInStatement = isForInStatement; -exports.isForStatement = isForStatement; -exports.isFunctionDeclaration = isFunctionDeclaration; -exports.isFunctionExpression = isFunctionExpression; -exports.isIdentifier = isIdentifier; -exports.isIfStatement = isIfStatement; -exports.isLabeledStatement = isLabeledStatement; -exports.isStringLiteral = isStringLiteral; -exports.isNumericLiteral = isNumericLiteral; -exports.isNullLiteral = isNullLiteral; -exports.isBooleanLiteral = isBooleanLiteral; -exports.isRegExpLiteral = isRegExpLiteral; -exports.isLogicalExpression = isLogicalExpression; -exports.isMemberExpression = isMemberExpression; -exports.isNewExpression = isNewExpression; -exports.isProgram = isProgram; -exports.isObjectExpression = isObjectExpression; -exports.isObjectMethod = isObjectMethod; -exports.isObjectProperty = isObjectProperty; -exports.isRestElement = isRestElement; -exports.isReturnStatement = isReturnStatement; -exports.isSequenceExpression = isSequenceExpression; -exports.isParenthesizedExpression = isParenthesizedExpression; -exports.isSwitchCase = isSwitchCase; -exports.isSwitchStatement = isSwitchStatement; -exports.isThisExpression = isThisExpression; -exports.isThrowStatement = isThrowStatement; -exports.isTryStatement = isTryStatement; -exports.isUnaryExpression = isUnaryExpression; -exports.isUpdateExpression = isUpdateExpression; -exports.isVariableDeclaration = isVariableDeclaration; -exports.isVariableDeclarator = isVariableDeclarator; -exports.isWhileStatement = isWhileStatement; -exports.isWithStatement = isWithStatement; -exports.isAssignmentPattern = isAssignmentPattern; -exports.isArrayPattern = isArrayPattern; -exports.isArrowFunctionExpression = isArrowFunctionExpression; -exports.isClassBody = isClassBody; -exports.isClassExpression = isClassExpression; -exports.isClassDeclaration = isClassDeclaration; -exports.isExportAllDeclaration = isExportAllDeclaration; -exports.isExportDefaultDeclaration = isExportDefaultDeclaration; -exports.isExportNamedDeclaration = isExportNamedDeclaration; -exports.isExportSpecifier = isExportSpecifier; -exports.isForOfStatement = isForOfStatement; -exports.isImportDeclaration = isImportDeclaration; -exports.isImportDefaultSpecifier = isImportDefaultSpecifier; -exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier; -exports.isImportSpecifier = isImportSpecifier; -exports.isMetaProperty = isMetaProperty; -exports.isClassMethod = isClassMethod; -exports.isObjectPattern = isObjectPattern; -exports.isSpreadElement = isSpreadElement; -exports.isSuper = isSuper; -exports.isTaggedTemplateExpression = isTaggedTemplateExpression; -exports.isTemplateElement = isTemplateElement; -exports.isTemplateLiteral = isTemplateLiteral; -exports.isYieldExpression = isYieldExpression; -exports.isAnyTypeAnnotation = isAnyTypeAnnotation; -exports.isArrayTypeAnnotation = isArrayTypeAnnotation; -exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation; -exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation; -exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation; -exports.isClassImplements = isClassImplements; -exports.isDeclareClass = isDeclareClass; -exports.isDeclareFunction = isDeclareFunction; -exports.isDeclareInterface = isDeclareInterface; -exports.isDeclareModule = isDeclareModule; -exports.isDeclareModuleExports = isDeclareModuleExports; -exports.isDeclareTypeAlias = isDeclareTypeAlias; -exports.isDeclareOpaqueType = isDeclareOpaqueType; -exports.isDeclareVariable = isDeclareVariable; -exports.isDeclareExportDeclaration = isDeclareExportDeclaration; -exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration; -exports.isDeclaredPredicate = isDeclaredPredicate; -exports.isExistsTypeAnnotation = isExistsTypeAnnotation; -exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation; -exports.isFunctionTypeParam = isFunctionTypeParam; -exports.isGenericTypeAnnotation = isGenericTypeAnnotation; -exports.isInferredPredicate = isInferredPredicate; -exports.isInterfaceExtends = isInterfaceExtends; -exports.isInterfaceDeclaration = isInterfaceDeclaration; -exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation; -exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation; -exports.isMixedTypeAnnotation = isMixedTypeAnnotation; -exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation; -exports.isNullableTypeAnnotation = isNullableTypeAnnotation; -exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation; -exports.isNumberTypeAnnotation = isNumberTypeAnnotation; -exports.isObjectTypeAnnotation = isObjectTypeAnnotation; -exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot; -exports.isObjectTypeCallProperty = isObjectTypeCallProperty; -exports.isObjectTypeIndexer = isObjectTypeIndexer; -exports.isObjectTypeProperty = isObjectTypeProperty; -exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty; -exports.isOpaqueType = isOpaqueType; -exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier; -exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation; -exports.isStringTypeAnnotation = isStringTypeAnnotation; -exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation; -exports.isThisTypeAnnotation = isThisTypeAnnotation; -exports.isTupleTypeAnnotation = isTupleTypeAnnotation; -exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation; -exports.isTypeAlias = isTypeAlias; -exports.isTypeAnnotation = isTypeAnnotation; -exports.isTypeCastExpression = isTypeCastExpression; -exports.isTypeParameter = isTypeParameter; -exports.isTypeParameterDeclaration = isTypeParameterDeclaration; -exports.isTypeParameterInstantiation = isTypeParameterInstantiation; -exports.isUnionTypeAnnotation = isUnionTypeAnnotation; -exports.isVariance = isVariance; -exports.isVoidTypeAnnotation = isVoidTypeAnnotation; -exports.isEnumDeclaration = isEnumDeclaration; -exports.isEnumBooleanBody = isEnumBooleanBody; -exports.isEnumNumberBody = isEnumNumberBody; -exports.isEnumStringBody = isEnumStringBody; -exports.isEnumSymbolBody = isEnumSymbolBody; -exports.isEnumBooleanMember = isEnumBooleanMember; -exports.isEnumNumberMember = isEnumNumberMember; -exports.isEnumStringMember = isEnumStringMember; -exports.isEnumDefaultedMember = isEnumDefaultedMember; -exports.isJSXAttribute = isJSXAttribute; -exports.isJSXClosingElement = isJSXClosingElement; -exports.isJSXElement = isJSXElement; -exports.isJSXEmptyExpression = isJSXEmptyExpression; -exports.isJSXExpressionContainer = isJSXExpressionContainer; -exports.isJSXSpreadChild = isJSXSpreadChild; -exports.isJSXIdentifier = isJSXIdentifier; -exports.isJSXMemberExpression = isJSXMemberExpression; -exports.isJSXNamespacedName = isJSXNamespacedName; -exports.isJSXOpeningElement = isJSXOpeningElement; -exports.isJSXSpreadAttribute = isJSXSpreadAttribute; -exports.isJSXText = isJSXText; -exports.isJSXFragment = isJSXFragment; -exports.isJSXOpeningFragment = isJSXOpeningFragment; -exports.isJSXClosingFragment = isJSXClosingFragment; -exports.isNoop = isNoop; -exports.isPlaceholder = isPlaceholder; -exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier; -exports.isArgumentPlaceholder = isArgumentPlaceholder; -exports.isAwaitExpression = isAwaitExpression; -exports.isBindExpression = isBindExpression; -exports.isClassProperty = isClassProperty; -exports.isOptionalMemberExpression = isOptionalMemberExpression; -exports.isPipelineTopicExpression = isPipelineTopicExpression; -exports.isPipelineBareFunction = isPipelineBareFunction; -exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference; -exports.isOptionalCallExpression = isOptionalCallExpression; -exports.isClassPrivateProperty = isClassPrivateProperty; -exports.isClassPrivateMethod = isClassPrivateMethod; -exports.isImport = isImport; -exports.isDecorator = isDecorator; -exports.isDoExpression = isDoExpression; -exports.isExportDefaultSpecifier = isExportDefaultSpecifier; -exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier; -exports.isPrivateName = isPrivateName; -exports.isBigIntLiteral = isBigIntLiteral; -exports.isRecordExpression = isRecordExpression; -exports.isTupleExpression = isTupleExpression; -exports.isTSParameterProperty = isTSParameterProperty; -exports.isTSDeclareFunction = isTSDeclareFunction; -exports.isTSDeclareMethod = isTSDeclareMethod; -exports.isTSQualifiedName = isTSQualifiedName; -exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration; -exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration; -exports.isTSPropertySignature = isTSPropertySignature; -exports.isTSMethodSignature = isTSMethodSignature; -exports.isTSIndexSignature = isTSIndexSignature; -exports.isTSAnyKeyword = isTSAnyKeyword; -exports.isTSBooleanKeyword = isTSBooleanKeyword; -exports.isTSBigIntKeyword = isTSBigIntKeyword; -exports.isTSNeverKeyword = isTSNeverKeyword; -exports.isTSNullKeyword = isTSNullKeyword; -exports.isTSNumberKeyword = isTSNumberKeyword; -exports.isTSObjectKeyword = isTSObjectKeyword; -exports.isTSStringKeyword = isTSStringKeyword; -exports.isTSSymbolKeyword = isTSSymbolKeyword; -exports.isTSUndefinedKeyword = isTSUndefinedKeyword; -exports.isTSUnknownKeyword = isTSUnknownKeyword; -exports.isTSVoidKeyword = isTSVoidKeyword; -exports.isTSThisType = isTSThisType; -exports.isTSFunctionType = isTSFunctionType; -exports.isTSConstructorType = isTSConstructorType; -exports.isTSTypeReference = isTSTypeReference; -exports.isTSTypePredicate = isTSTypePredicate; -exports.isTSTypeQuery = isTSTypeQuery; -exports.isTSTypeLiteral = isTSTypeLiteral; -exports.isTSArrayType = isTSArrayType; -exports.isTSTupleType = isTSTupleType; -exports.isTSOptionalType = isTSOptionalType; -exports.isTSRestType = isTSRestType; -exports.isTSUnionType = isTSUnionType; -exports.isTSIntersectionType = isTSIntersectionType; -exports.isTSConditionalType = isTSConditionalType; -exports.isTSInferType = isTSInferType; -exports.isTSParenthesizedType = isTSParenthesizedType; -exports.isTSTypeOperator = isTSTypeOperator; -exports.isTSIndexedAccessType = isTSIndexedAccessType; -exports.isTSMappedType = isTSMappedType; -exports.isTSLiteralType = isTSLiteralType; -exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments; -exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration; -exports.isTSInterfaceBody = isTSInterfaceBody; -exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration; -exports.isTSAsExpression = isTSAsExpression; -exports.isTSTypeAssertion = isTSTypeAssertion; -exports.isTSEnumDeclaration = isTSEnumDeclaration; -exports.isTSEnumMember = isTSEnumMember; -exports.isTSModuleDeclaration = isTSModuleDeclaration; -exports.isTSModuleBlock = isTSModuleBlock; -exports.isTSImportType = isTSImportType; -exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration; -exports.isTSExternalModuleReference = isTSExternalModuleReference; -exports.isTSNonNullExpression = isTSNonNullExpression; -exports.isTSExportAssignment = isTSExportAssignment; -exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration; -exports.isTSTypeAnnotation = isTSTypeAnnotation; -exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation; -exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration; -exports.isTSTypeParameter = isTSTypeParameter; -exports.isExpression = isExpression; -exports.isBinary = isBinary; -exports.isScopable = isScopable; -exports.isBlockParent = isBlockParent; -exports.isBlock = isBlock; -exports.isStatement = isStatement; -exports.isTerminatorless = isTerminatorless; -exports.isCompletionStatement = isCompletionStatement; -exports.isConditional = isConditional; -exports.isLoop = isLoop; -exports.isWhile = isWhile; -exports.isExpressionWrapper = isExpressionWrapper; -exports.isFor = isFor; -exports.isForXStatement = isForXStatement; -exports.isFunction = isFunction; -exports.isFunctionParent = isFunctionParent; -exports.isPureish = isPureish; -exports.isDeclaration = isDeclaration; -exports.isPatternLike = isPatternLike; -exports.isLVal = isLVal; -exports.isTSEntityName = isTSEntityName; -exports.isLiteral = isLiteral; -exports.isImmutable = isImmutable; -exports.isUserWhitespacable = isUserWhitespacable; -exports.isMethod = isMethod; -exports.isObjectMember = isObjectMember; -exports.isProperty = isProperty; -exports.isUnaryLike = isUnaryLike; -exports.isPattern = isPattern; -exports.isClass = isClass; -exports.isModuleDeclaration = isModuleDeclaration; -exports.isExportDeclaration = isExportDeclaration; -exports.isModuleSpecifier = isModuleSpecifier; -exports.isFlow = isFlow; -exports.isFlowType = isFlowType; -exports.isFlowBaseAnnotation = isFlowBaseAnnotation; -exports.isFlowDeclaration = isFlowDeclaration; -exports.isFlowPredicate = isFlowPredicate; -exports.isEnumBody = isEnumBody; -exports.isEnumMember = isEnumMember; -exports.isJSX = isJSX; -exports.isPrivate = isPrivate; -exports.isTSTypeElement = isTSTypeElement; -exports.isTSType = isTSType; -exports.isNumberLiteral = isNumberLiteral; -exports.isRegexLiteral = isRegexLiteral; -exports.isRestProperty = isRestProperty; -exports.isSpreadProperty = isSpreadProperty; - -var _shallowEqual = _interopRequireDefault(require("../../utils/shallowEqual")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isArrayExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AssignmentExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinaryExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BinaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterpreterDirective(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterpreterDirective") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirective(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Directive") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDirectiveLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DirectiveLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BlockStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBreakStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BreakStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCallExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCatchClause(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CatchClause") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditionalExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ConditionalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isContinueStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ContinueStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDebuggerStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DebuggerStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoWhileStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DoWhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EmptyStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExpressionStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFile(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "File") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForInStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForInStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Identifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIfStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "IfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLabeledStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LabeledStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumericLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumericLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegExpLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RegExpLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLogicalExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LogicalExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNewExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NewExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProgram(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Program") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RestElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isReturnStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ReturnStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSequenceExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SequenceExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isParenthesizedExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ParenthesizedExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchCase(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SwitchCase") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSwitchStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SwitchStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThisExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThrowStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThrowStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTryStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TryStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnaryExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUpdateExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UpdateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VariableDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariableDeclarator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VariableDeclarator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhileStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "WhileStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWithStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "WithStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAssignmentPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AssignmentPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrowFunctionExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrowFunctionExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportAllDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDefaultDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamedDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportNamedDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForOfStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForOfStatement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportDefaultSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportNamespaceSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImportSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ImportSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMetaProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MetaProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectPattern") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SpreadElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSuper(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Super") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTaggedTemplateExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TaggedTemplateExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TemplateElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTemplateLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TemplateLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isYieldExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "YieldExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAnyTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AnyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArrayTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArrayTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBooleanLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BooleanLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassImplements(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassImplements") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareClass(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareClass") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareInterface(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareInterface") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModule(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareModule") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareModuleExports(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareModuleExports") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareTypeAlias(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareTypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareOpaqueType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareOpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareVariable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareVariable") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclareExportAllDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclareExportAllDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaredPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DeclaredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExistsTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExistsTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionTypeParam(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionTypeParam") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isGenericTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "GenericTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInferredPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InferredPredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceExtends(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceExtends") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isInterfaceTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "InterfaceTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isIntersectionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "IntersectionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMixedTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "MixedTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEmptyTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EmptyTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNullableTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NullableTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeInternalSlot(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeInternalSlot") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeCallProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeCallProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeIndexer(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeIndexer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectTypeSpreadProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectTypeSpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOpaqueType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OpaqueType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isQualifiedTypeIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "QualifiedTypeIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringLiteralTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringLiteralTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStringTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "StringTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSymbolTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SymbolTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isThisTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ThisTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTupleTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TupleTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeofTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeofTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAlias(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeAlias") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeCastExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeCastExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameter(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTypeParameterInstantiation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnionTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnionTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVariance(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Variance") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isVoidTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "VoidTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumBooleanBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumBooleanBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumNumberBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumNumberBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumStringBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumStringBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumSymbolBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumSymbolBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumBooleanMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumBooleanMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumNumberMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumNumberMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumStringMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumStringMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumDefaultedMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumDefaultedMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXAttribute(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXClosingElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXEmptyExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXEmptyExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXExpressionContainer(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXExpressionContainer") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadChild(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXSpreadChild") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXNamespacedName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXNamespacedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXOpeningElement") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXSpreadAttribute(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXSpreadAttribute") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXText(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXText") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXOpeningFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXOpeningFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSXClosingFragment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSXClosingFragment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNoop(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Noop") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPlaceholder(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Placeholder") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isV8IntrinsicIdentifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "V8IntrinsicIdentifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isArgumentPlaceholder(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ArgumentPlaceholder") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isAwaitExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "AwaitExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBindExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BindExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalMemberExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OptionalMemberExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelineTopicExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelineTopicExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelineBareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelineBareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPipelinePrimaryTopicReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PipelinePrimaryTopicReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isOptionalCallExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "OptionalCallExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassPrivateProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClassPrivateMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ClassPrivateMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImport(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Import") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDecorator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Decorator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDoExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "DoExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDefaultSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDefaultSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportNamespaceSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportNamespaceSpecifier") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivateName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PrivateName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBigIntLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BigIntLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRecordExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RecordExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTupleExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TupleExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParameterProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSParameterProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSDeclareFunction") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSDeclareMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSDeclareMethod") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSQualifiedName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSQualifiedName") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSCallSignatureDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSCallSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructSignatureDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConstructSignatureDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSPropertySignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSPropertySignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMethodSignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSMethodSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexSignature(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIndexSignature") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAnyKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSAnyKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSBooleanKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSBooleanKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSBigIntKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSBigIntKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNeverKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNeverKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNullKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNullKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNumberKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNumberKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSObjectKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSObjectKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSStringKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSStringKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSSymbolKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSSymbolKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUndefinedKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUndefinedKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnknownKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUnknownKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSVoidKeyword(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSVoidKeyword") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSThisType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSThisType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSFunctionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSFunctionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConstructorType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConstructorType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypePredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypePredicate") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeQuery(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeQuery") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSArrayType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSArrayType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTupleType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTupleType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSOptionalType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSOptionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSRestType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSRestType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSUnionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSUnionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIntersectionType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIntersectionType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSConditionalType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSConditionalType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInferType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInferType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSParenthesizedType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSParenthesizedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeOperator(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeOperator") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSIndexedAccessType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSIndexedAccessType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSMappedType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSMappedType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSLiteralType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSLiteralType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExpressionWithTypeArguments(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExpressionWithTypeArguments") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInterfaceDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSInterfaceBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSInterfaceBody") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAliasDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAliasDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSAsExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSAsExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAssertion(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAssertion") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEnumDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEnumMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEnumMember") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSModuleDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSModuleBlock(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSModuleBlock") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSImportType") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSImportEqualsDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSImportEqualsDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExternalModuleReference(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExternalModuleReference") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNonNullExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNonNullExpression") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSExportAssignment(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSExportAssignment") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSNamespaceExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSNamespaceExportDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeAnnotation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterInstantiation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameterInstantiation") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameterDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameterDeclaration") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeParameter(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeParameter") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpression(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Expression" || "ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "AwaitExpression" === nodeType || "BindExpression" === nodeType || "OptionalMemberExpression" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "OptionalCallExpression" === nodeType || "Import" === nodeType || "DoExpression" === nodeType || "BigIntLiteral" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBinary(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Binary" || "BinaryExpression" === nodeType || "LogicalExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isScopable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Scopable" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlockParent(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "BlockParent" || "BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isBlock(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Block" || "BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Statement" || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTerminatorless(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Terminatorless" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isCompletionStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "CompletionStatement" || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isConditional(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Conditional" || "ConditionalExpression" === nodeType || "IfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLoop(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Loop" || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isWhile(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "While" || "DoWhileStatement" === nodeType || "WhileStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExpressionWrapper(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExpressionWrapper" || "ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFor(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "For" || "ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isForXStatement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ForXStatement" || "ForInStatement" === nodeType || "ForOfStatement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunction(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Function" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFunctionParent(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FunctionParent" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPureish(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Pureish" || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Declaration" || "FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPatternLike(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "PatternLike" || "Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLVal(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "LVal" || "Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSEntityName(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSEntityName" || "Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isLiteral(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Literal" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isImmutable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Immutable" || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "BigIntLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUserWhitespacable(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UserWhitespacable" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isMethod(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Method" || "ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isObjectMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ObjectMember" || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isProperty(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Property" || "ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassPrivateProperty" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isUnaryLike(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "UnaryLike" || "UnaryExpression" === nodeType || "SpreadElement" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPattern(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Pattern" || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isClass(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Class" || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ModuleDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isExportDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ExportDeclaration" || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isModuleSpecifier(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "ModuleSpecifier" || "ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlow(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Flow" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowType" || "AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowBaseAnnotation(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowBaseAnnotation" || "AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowDeclaration(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowDeclaration" || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isFlowPredicate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "FlowPredicate" || "DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumBody(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumBody" || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isEnumMember(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "EnumMember" || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isJSX(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "JSX" || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isPrivate(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "Private" || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSTypeElement(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSTypeElement" || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isTSType(node, opts) { - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "TSType" || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isNumberLiteral(node, opts) { - console.trace("The node type NumberLiteral has been renamed to NumericLiteral"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "NumberLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRegexLiteral(node, opts) { - console.trace("The node type RegexLiteral has been renamed to RegExpLiteral"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RegexLiteral") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isRestProperty(node, opts) { - console.trace("The node type RestProperty has been renamed to RestElement"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "RestProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} - -function isSpreadProperty(node, opts) { - console.trace("The node type SpreadProperty has been renamed to SpreadElement"); - if (!node) return false; - const nodeType = node.type; - - if (nodeType === "SpreadProperty") { - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } - } - - return false; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/is.js b/packages/common/node_modules/@babel/types/lib/validators/is.js deleted file mode 100644 index a68c108861..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/is.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = is; - -var _shallowEqual = _interopRequireDefault(require("../utils/shallowEqual")); - -var _isType = _interopRequireDefault(require("./isType")); - -var _isPlaceholderType = _interopRequireDefault(require("./isPlaceholderType")); - -var _definitions = require("../definitions"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function is(type, node, opts) { - if (!node) return false; - const matches = (0, _isType.default)(node.type, type); - - if (!matches) { - if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) { - return (0, _isPlaceholderType.default)(node.expectedNode, type); - } - - return false; - } - - if (typeof opts === "undefined") { - return true; - } else { - return (0, _shallowEqual.default)(node, opts); - } -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isBinding.js b/packages/common/node_modules/@babel/types/lib/validators/isBinding.js deleted file mode 100644 index e18ad19760..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isBinding.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isBinding; - -var _getBindingIdentifiers = _interopRequireDefault(require("../retrievers/getBindingIdentifiers")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isBinding(node, parent, grandparent) { - if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") { - return false; - } - - const keys = _getBindingIdentifiers.default.keys[parent.type]; - - if (keys) { - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - const val = parent[key]; - - if (Array.isArray(val)) { - if (val.indexOf(node) >= 0) return true; - } else { - if (val === node) return true; - } - } - } - - return false; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js b/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js deleted file mode 100644 index 7e6549e03b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isBlockScoped.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isBlockScoped; - -var _generated = require("./generated"); - -var _isLet = _interopRequireDefault(require("./isLet")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isBlockScoped(node) { - return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js b/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js deleted file mode 100644 index b00b23d4ce..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isImmutable.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isImmutable; - -var _isType = _interopRequireDefault(require("./isType")); - -var _generated = require("./generated"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function isImmutable(node) { - if ((0, _isType.default)(node.type, "Immutable")) return true; - - if ((0, _generated.isIdentifier)(node)) { - if (node.name === "undefined") { - return true; - } else { - return false; - } - } - - return false; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isLet.js b/packages/common/node_modules/@babel/types/lib/validators/isLet.js deleted file mode 100644 index 93d7562808..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isLet.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isLet; - -var _generated = require("./generated"); - -var _constants = require("../constants"); - -function isLet(node) { - return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isNode.js b/packages/common/node_modules/@babel/types/lib/validators/isNode.js deleted file mode 100644 index e88a47aac4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isNode.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isNode; - -var _definitions = require("../definitions"); - -function isNode(node) { - return !!(node && _definitions.VISITOR_KEYS[node.type]); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js deleted file mode 100644 index 0c3b8ac437..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isNodesEquivalent; - -var _definitions = require("../definitions"); - -function isNodesEquivalent(a, b) { - if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) { - return a === b; - } - - if (a.type !== b.type) { - return false; - } - - const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type); - const visitorKeys = _definitions.VISITOR_KEYS[a.type]; - - for (const field of fields) { - if (typeof a[field] !== typeof b[field]) { - return false; - } - - if (a[field] == null && b[field] == null) { - continue; - } else if (a[field] == null || b[field] == null) { - return false; - } - - if (Array.isArray(a[field])) { - if (!Array.isArray(b[field])) { - return false; - } - - if (a[field].length !== b[field].length) { - return false; - } - - for (let i = 0; i < a[field].length; i++) { - if (!isNodesEquivalent(a[field][i], b[field][i])) { - return false; - } - } - - continue; - } - - if (typeof a[field] === "object" && (!visitorKeys || !visitorKeys.includes(field))) { - for (const key of Object.keys(a[field])) { - if (a[field][key] !== b[field][key]) { - return false; - } - } - - continue; - } - - if (!isNodesEquivalent(a[field], b[field])) { - return false; - } - } - - return true; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js deleted file mode 100644 index e8271de0b1..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isPlaceholderType.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isPlaceholderType; - -var _definitions = require("../definitions"); - -function isPlaceholderType(placeholderType, targetType) { - if (placeholderType === targetType) return true; - const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType]; - - if (aliases) { - for (const alias of aliases) { - if (targetType === alias) return true; - } - } - - return false; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js b/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js deleted file mode 100644 index 8fd1662348..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isReferenced.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isReferenced; - -function isReferenced(node, parent, grandparent) { - switch (parent.type) { - case "MemberExpression": - case "JSXMemberExpression": - case "OptionalMemberExpression": - if (parent.property === node) { - return !!parent.computed; - } - - return parent.object === node; - - case "VariableDeclarator": - return parent.init === node; - - case "ArrowFunctionExpression": - return parent.body === node; - - case "ExportSpecifier": - if (parent.source) { - return false; - } - - return parent.local === node; - - case "PrivateName": - return false; - - case "ClassMethod": - case "ClassPrivateMethod": - case "ObjectMethod": - if (parent.params.includes(node)) { - return false; - } - - case "ObjectProperty": - case "ClassProperty": - case "ClassPrivateProperty": - if (parent.key === node) { - return !!parent.computed; - } - - if (parent.value === node) { - return !grandparent || grandparent.type !== "ObjectPattern"; - } - - return true; - - case "ClassDeclaration": - case "ClassExpression": - return parent.superClass === node; - - case "AssignmentExpression": - return parent.right === node; - - case "AssignmentPattern": - return parent.right === node; - - case "LabeledStatement": - return false; - - case "CatchClause": - return false; - - case "RestElement": - return false; - - case "BreakStatement": - case "ContinueStatement": - return false; - - case "FunctionDeclaration": - case "FunctionExpression": - return false; - - case "ExportNamespaceSpecifier": - case "ExportDefaultSpecifier": - return false; - - case "ImportDefaultSpecifier": - case "ImportNamespaceSpecifier": - case "ImportSpecifier": - return false; - - case "JSXAttribute": - return false; - - case "ObjectPattern": - case "ArrayPattern": - return false; - - case "MetaProperty": - return false; - - case "ObjectTypeProperty": - return parent.key !== node; - - case "TSEnumMember": - return parent.id !== node; - - case "TSPropertySignature": - if (parent.key === node) { - return !!parent.computed; - } - - return true; - } - - return true; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isScope.js b/packages/common/node_modules/@babel/types/lib/validators/isScope.js deleted file mode 100644 index d4cd46c8c4..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isScope.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isScope; - -var _generated = require("./generated"); - -function isScope(node, parent) { - if ((0, _generated.isBlockStatement)(node) && (0, _generated.isFunction)(parent, { - body: node - })) { - return false; - } - - if ((0, _generated.isBlockStatement)(node) && (0, _generated.isCatchClause)(parent, { - body: node - })) { - return false; - } - - if ((0, _generated.isPattern)(node) && (0, _generated.isFunction)(parent)) { - return true; - } - - return (0, _generated.isScopable)(node); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js deleted file mode 100644 index 25431cc273..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isSpecifierDefault; - -var _generated = require("./generated"); - -function isSpecifierDefault(specifier) { - return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, { - name: "default" - }); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isType.js b/packages/common/node_modules/@babel/types/lib/validators/isType.js deleted file mode 100644 index 59d31dfbbf..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isType.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isType; - -var _definitions = require("../definitions"); - -function isType(nodeType, targetType) { - if (nodeType === targetType) return true; - if (_definitions.ALIAS_KEYS[targetType]) return false; - const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType]; - - if (aliases) { - if (aliases[0] === nodeType) return true; - - for (const alias of aliases) { - if (nodeType === alias) return true; - } - } - - return false; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js deleted file mode 100644 index 8455cab269..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isValidES3Identifier; - -var _isValidIdentifier = _interopRequireDefault(require("./isValidIdentifier")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]); - -function isValidES3Identifier(name) { - return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js deleted file mode 100644 index c1adb9afe0..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isValidIdentifier.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isValidIdentifier; - -var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); - -function isValidIdentifier(name, reserved = true) { - if (typeof name !== "string") return false; - - if (reserved) { - if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name)) { - return false; - } else if (name === "await") { - return false; - } - } - - return (0, _helperValidatorIdentifier.isIdentifierName)(name); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/isVar.js b/packages/common/node_modules/@babel/types/lib/validators/isVar.js deleted file mode 100644 index a34801d18f..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/isVar.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isVar; - -var _generated = require("./generated"); - -var _constants = require("../constants"); - -function isVar(node) { - return (0, _generated.isVariableDeclaration)(node, { - kind: "var" - }) && !node[_constants.BLOCK_SCOPED_SYMBOL]; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js b/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js deleted file mode 100644 index 538e011f4c..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/matchesPattern.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = matchesPattern; - -var _generated = require("./generated"); - -function matchesPattern(member, match, allowPartial) { - if (!(0, _generated.isMemberExpression)(member)) return false; - const parts = Array.isArray(match) ? match : match.split("."); - const nodes = []; - let node; - - for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) { - nodes.push(node.property); - } - - nodes.push(node); - if (nodes.length < parts.length) return false; - if (!allowPartial && nodes.length > parts.length) return false; - - for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) { - const node = nodes[j]; - let value; - - if ((0, _generated.isIdentifier)(node)) { - value = node.name; - } else if ((0, _generated.isStringLiteral)(node)) { - value = node.value; - } else { - return false; - } - - if (parts[i] !== value) return false; - } - - return true; -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js deleted file mode 100644 index 57761c2b1b..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/react/isCompatTag.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = isCompatTag; - -function isCompatTag(tagName) { - return !!tagName && /^[a-z]/.test(tagName); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js deleted file mode 100644 index 33b30d71e9..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/react/isReactComponent.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _buildMatchMemberExpression = _interopRequireDefault(require("../buildMatchMemberExpression")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); -var _default = isReactComponent; -exports.default = _default; \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/lib/validators/validate.js b/packages/common/node_modules/@babel/types/lib/validators/validate.js deleted file mode 100644 index 4604f4b2ea..0000000000 --- a/packages/common/node_modules/@babel/types/lib/validators/validate.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = validate; -exports.validateField = validateField; -exports.validateChild = validateChild; - -var _definitions = require("../definitions"); - -function validate(node, key, val) { - if (!node) return; - const fields = _definitions.NODE_FIELDS[node.type]; - if (!fields) return; - const field = fields[key]; - validateField(node, key, val, field); - validateChild(node, key, val); -} - -function validateField(node, key, val, field) { - if (!field || !field.validate) return; - if (field.optional && val == null) return; - field.validate(node, key, val); -} - -function validateChild(node, key, val) { - if (val == null) return; - const validate = _definitions.NODE_PARENT_VALIDATIONS[val.type]; - if (!validate) return; - validate(node, key, val); -} \ No newline at end of file diff --git a/packages/common/node_modules/@babel/types/package.json b/packages/common/node_modules/@babel/types/package.json deleted file mode 100644 index 177e1c90bd..0000000000 --- a/packages/common/node_modules/@babel/types/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@babel/types", - "version": "7.9.5", - "description": "Babel Types is a Lodash-esque utility library for AST nodes", - "author": "Sebastian McKenzie ", - "homepage": "https://babeljs.io/", - "license": "MIT", - "publishConfig": { - "access": "public" - }, - "repository": "https://github.com/babel/babel/tree/master/packages/babel-types", - "main": "lib/index.js", - "types": "lib/index.d.ts", - "dependencies": { - "@babel/helper-validator-identifier": "^7.9.5", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - }, - "devDependencies": { - "@babel/generator": "^7.9.5", - "@babel/parser": "^7.9.0" - }, - "gitHead": "5b97e77e030cf3853a147fdff81844ea4026219d" -} diff --git a/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js b/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js deleted file mode 100644 index bf0b036c18..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generateTypeHelpers.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -const path = require("path"); -const chalk = require("chalk"); -const generateBuilders = require("./generators/generateBuilders"); -const generateValidators = require("./generators/generateValidators"); -const generateAsserts = require("./generators/generateAsserts"); -const generateConstants = require("./generators/generateConstants"); -const format = require("../../../scripts/utils/formatCode"); -const writeFile = require("../../../scripts/utils/writeFileAndMkDir"); - -const baseDir = path.join(__dirname, "../src"); - -console.log("Generating @babel/types dynamic functions"); - -const buildersFile = path.join(baseDir, "builders/generated/index.js"); -writeFile(buildersFile, format(generateBuilders(), buildersFile)); -console.log(` ${chalk.green("✔")} Generated builders`); - -const validatorsFile = path.join(baseDir, "validators/generated/index.js"); -writeFile(validatorsFile, format(generateValidators(), validatorsFile)); -console.log(` ${chalk.green("✔")} Generated validators`); - -const assertsFile = path.join(baseDir, "asserts/generated/index.js"); -writeFile(assertsFile, format(generateAsserts(), assertsFile)); -console.log(` ${chalk.green("✔")} Generated asserts`); - -const constantsFile = path.join(baseDir, "constants/generated/index.js"); -writeFile(constantsFile, format(generateConstants(), constantsFile)); -console.log(` ${chalk.green("✔")} Generated constants`); diff --git a/packages/common/node_modules/@babel/types/scripts/generators/docs.js b/packages/common/node_modules/@babel/types/scripts/generators/docs.js deleted file mode 100644 index 340dbbc113..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/docs.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; - -const util = require("util"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -const types = require("../../"); - -const readme = [ - `# @babel/types - -> This module contains methods for building ASTs manually and for checking the types of AST nodes. - -## Install - -\`\`\`sh -npm install --save-dev @babel/types -\`\`\` - -## API`, -]; - -const customTypes = { - ClassMethod: { - key: "if computed then `Expression` else `Identifier | Literal`", - }, - Identifier: { - name: "`string`", - }, - MemberExpression: { - property: "if computed then `Expression` else `Identifier`", - }, - ObjectMethod: { - key: "if computed then `Expression` else `Identifier | Literal`", - }, - ObjectProperty: { - key: "if computed then `Expression` else `Identifier | Literal`", - }, -}; -Object.keys(types.BUILDER_KEYS) - .sort() - .forEach(function(key) { - readme.push("### " + key[0].toLowerCase() + key.substr(1)); - readme.push("```javascript"); - readme.push( - "t." + - toFunctionName(key) + - "(" + - types.BUILDER_KEYS[key].join(", ") + - ")" - ); - readme.push("```"); - readme.push(""); - readme.push( - "See also `t.is" + - key + - "(node, opts)` and `t.assert" + - key + - "(node, opts)`." - ); - readme.push(""); - if (types.ALIAS_KEYS[key] && types.ALIAS_KEYS[key].length) { - readme.push( - "Aliases: " + - types.ALIAS_KEYS[key] - .map(function(key) { - return "`" + key + "`"; - }) - .join(", ") - ); - readme.push(""); - } - Object.keys(types.NODE_FIELDS[key]) - .sort(function(fieldA, fieldB) { - const indexA = types.BUILDER_KEYS[key].indexOf(fieldA); - const indexB = types.BUILDER_KEYS[key].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }) - .forEach(function(field) { - const defaultValue = types.NODE_FIELDS[key][field].default; - const fieldDescription = ["`" + field + "`"]; - const validator = types.NODE_FIELDS[key][field].validate; - if (customTypes[key] && customTypes[key][field]) { - fieldDescription.push(`: ${customTypes[key][field]}`); - } else if (validator) { - try { - fieldDescription.push( - ": `" + stringifyValidator(validator, "") + "`" - ); - } catch (ex) { - if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") { - console.log( - "Unrecognised validator type for " + key + "." + field - ); - console.dir(ex.validator, { depth: 10, colors: true }); - } - } - } - if (defaultValue !== null || types.NODE_FIELDS[key][field].optional) { - fieldDescription.push( - " (default: `" + util.inspect(defaultValue) + "`" - ); - if (types.BUILDER_KEYS[key].indexOf(field) < 0) { - fieldDescription.push(", excluded from builder function"); - } - fieldDescription.push(")"); - } else { - fieldDescription.push(" (required)"); - } - readme.push(" - " + fieldDescription.join("")); - }); - - readme.push(""); - readme.push("---"); - readme.push(""); - }); - -process.stdout.write(readme.join("\n")); diff --git a/packages/common/node_modules/@babel/types/scripts/generators/flow.js b/packages/common/node_modules/@babel/types/scripts/generators/flow.js deleted file mode 100644 index ec664e7fe4..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/flow.js +++ /dev/null @@ -1,249 +0,0 @@ -"use strict"; - -const t = require("../../"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -const NODE_PREFIX = "BabelNode"; - -let code = `// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/flow.js for script used. - -declare class ${NODE_PREFIX}Comment { - value: string; - start: number; - end: number; - loc: ${NODE_PREFIX}SourceLocation; -} - -declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment { - type: "CommentBlock"; -} - -declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment { - type: "CommentLine"; -} - -declare class ${NODE_PREFIX}SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -declare class ${NODE_PREFIX} { - leadingComments?: Array<${NODE_PREFIX}Comment>; - innerComments?: Array<${NODE_PREFIX}Comment>; - trailingComments?: Array<${NODE_PREFIX}Comment>; - start: ?number; - end: ?number; - loc: ?${NODE_PREFIX}SourceLocation; -}\n\n`; - -// - -const lines = []; - -for (const type in t.NODE_FIELDS) { - const fields = t.NODE_FIELDS[type]; - - const struct = ['type: "' + type + '";']; - const args = []; - const builderNames = t.BUILDER_KEYS[type]; - - Object.keys(t.NODE_FIELDS[type]) - .sort((fieldA, fieldB) => { - const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); - const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }) - .forEach(fieldName => { - const field = fields[fieldName]; - - let suffix = ""; - if (field.optional || field.default != null) suffix += "?"; - - let typeAnnotation = "any"; - - const validate = field.validate; - if (validate) { - typeAnnotation = stringifyValidator(validate, NODE_PREFIX); - } - - if (typeAnnotation) { - suffix += ": " + typeAnnotation; - } - if (builderNames.includes(fieldName)) { - args.push(t.toBindingIdentifierName(fieldName) + suffix); - } - - if (t.isValidIdentifier(fieldName)) { - struct.push(fieldName + suffix + ";"); - } - }); - - code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} { - ${struct.join("\n ").trim()} -}\n\n`; - - // Flow chokes on super() and import() :/ - if (type !== "Super" && type !== "Import") { - lines.push( - `declare function ${toFunctionName(type)}(${args.join( - ", " - )}): ${NODE_PREFIX}${type};` - ); - } else { - const functionName = toFunctionName(type); - lines.push( - `declare function _${functionName}(${args.join( - ", " - )}): ${NODE_PREFIX}${type};`, - `declare export { _${functionName} as ${functionName} }` - ); - } -} - -for (let i = 0; i < t.TYPES.length; i++) { - let decl = `declare function is${t.TYPES[i]}(node: ?Object, opts?: ?Object): boolean`; - - if (t.NODE_FIELDS[t.TYPES[i]]) { - decl += ` %checks (node instanceof ${NODE_PREFIX}${t.TYPES[i]})`; - } - - lines.push(decl); -} - -lines.push( - // builders/ - // eslint-disable-next-line max-len - `declare function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): ${NODE_PREFIX}TypeAnnotation`, - // eslint-disable-next-line max-len - `declare function createUnionTypeAnnotation(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`, - // this smells like "internal API" - // eslint-disable-next-line max-len - `declare function buildChildren(node: { children: Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment | ${NODE_PREFIX}JSXEmptyExpression> }): Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment>`, - - // clone/ - `declare function clone(n: T): T;`, - `declare function cloneDeep(n: T): T;`, - `declare function cloneDeepWithoutLoc(n: T): T;`, - `declare function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T;`, - `declare function cloneWithoutLoc(n: T): T;`, - - // comments/ - `declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`, - // eslint-disable-next-line max-len - `declare function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`, - // eslint-disable-next-line max-len - `declare function addComments(node: T, type: CommentTypeShorthand, comments: Array): T`, - `declare function inheritInnerComments(node: Node, parent: Node): void`, - `declare function inheritLeadingComments(node: Node, parent: Node): void`, - `declare function inheritsComments(node: T, parent: Node): void`, - `declare function inheritTrailingComments(node: Node, parent: Node): void`, - `declare function removeComments(node: T): T`, - - // converters/ - `declare function ensureBlock(node: ${NODE_PREFIX}, key: string): ${NODE_PREFIX}BlockStatement`, - `declare function toBindingIdentifierName(name?: ?string): string`, - // eslint-disable-next-line max-len - `declare function toBlock(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Expression, parent?: ${NODE_PREFIX}Function | null): ${NODE_PREFIX}BlockStatement`, - // eslint-disable-next-line max-len - `declare function toComputedKey(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}Expression | ${NODE_PREFIX}Identifier): ${NODE_PREFIX}Expression`, - // eslint-disable-next-line max-len - `declare function toExpression(node: ${NODE_PREFIX}ExpressionStatement | ${NODE_PREFIX}Expression | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function): ${NODE_PREFIX}Expression`, - `declare function toIdentifier(name?: ?string): string`, - // eslint-disable-next-line max-len - `declare function toKeyAlias(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}): string`, - // toSequenceExpression relies on types that aren't declared in flow - // eslint-disable-next-line max-len - `declare function toStatement(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function | ${NODE_PREFIX}AssignmentExpression, ignore?: boolean): ${NODE_PREFIX}Statement | void`, - `declare function valueToNode(value: any): ${NODE_PREFIX}Expression`, - - // modifications/ - // eslint-disable-next-line max-len - `declare function removeTypeDuplicates(types: Array<${NODE_PREFIX}FlowType>): Array<${NODE_PREFIX}FlowType>`, - // eslint-disable-next-line max-len - `declare function appendToMemberExpression(member: ${NODE_PREFIX}MemberExpression, append: ${NODE_PREFIX}, computed?: boolean): ${NODE_PREFIX}MemberExpression`, - // eslint-disable-next-line max-len - `declare function inherits(child: T, parent: ${NODE_PREFIX} | null | void): T`, - // eslint-disable-next-line max-len - `declare function prependToMemberExpression(member: ${NODE_PREFIX}MemberExpression, prepend: ${NODE_PREFIX}Expression): ${NODE_PREFIX}MemberExpression`, - `declare function removeProperties(n: T, opts: ?{}): void;`, - `declare function removePropertiesDeep(n: T, opts: ?{}): T;`, - - // retrievers/ - // eslint-disable-next-line max-len - `declare function getBindingIdentifiers(node: ${NODE_PREFIX}, duplicates: boolean, outerOnly?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`, - // eslint-disable-next-line max-len - `declare function getOuterBindingIdentifiers(node: Node, duplicates: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`, - - // traverse/ - `declare type TraversalAncestors = Array<{ - node: BabelNode, - key: string, - index?: number, - }>; - declare type TraversalHandler = (BabelNode, TraversalAncestors, T) => void; - declare type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - };`.replace(/(^|\n) {2}/g, "$1"), - // eslint-disable-next-line - `declare function traverse(n: BabelNode, TraversalHandler | TraversalHandlers, state?: T): void;`, - `declare function traverseFast(n: Node, h: TraversalHandler, state?: T): void;`, - - // utils/ - // cleanJSXElementLiteralChild is not exported - // inherit is not exported - `declare function shallowEqual(actual: Object, expected: Object): boolean`, - - // validators/ - // eslint-disable-next-line max-len - `declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean`, - `declare function is(type: string, n: BabelNode, opts: Object): boolean;`, - `declare function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`, - `declare function isBlockScoped(node: BabelNode): boolean`, - `declare function isImmutable(node: BabelNode): boolean`, - `declare function isLet(node: BabelNode): boolean`, - `declare function isNode(node: ?Object): boolean`, - `declare function isNodesEquivalent(a: any, b: any): boolean`, - `declare function isPlaceholderType(placeholderType: string, targetType: string): boolean`, - `declare function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`, - `declare function isScope(node: BabelNode, parent: BabelNode): boolean`, - `declare function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean`, - `declare function isType(nodetype: ?string, targetType: string): boolean`, - `declare function isValidES3Identifier(name: string): boolean`, - `declare function isValidES3Identifier(name: string): boolean`, - `declare function isValidIdentifier(name: string): boolean`, - `declare function isVar(node: BabelNode): boolean`, - // eslint-disable-next-line max-len - `declare function matchesPattern(node: ?BabelNode, match: string | Array, allowPartial?: boolean): boolean`, - `declare function validate(n: BabelNode, key: string, value: mixed): void;` -); - -for (const type in t.FLIPPED_ALIAS_KEYS) { - const types = t.FLIPPED_ALIAS_KEYS[type]; - code += `type ${NODE_PREFIX}${type} = ${types - .map(type => `${NODE_PREFIX}${type}`) - .join(" | ")};\n`; -} - -code += `\ndeclare module "@babel/types" { - ${lines - .join("\n") - .replace(/\n/g, "\n ") - .trim()} -}\n`; - -// - -process.stdout.write(code); diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js b/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js deleted file mode 100644 index 26bdb8dccb..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateAsserts.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -function addAssertHelper(type) { - return `export function assert${type}(node: Object, opts?: Object = {}): void { - assert("${type}", node, opts) } - `; -} - -module.exports = function generateAsserts() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import is from "../../validators/is"; - -function assert(type: string, node: Object, opts?: Object): void { - if (!is(type, node, opts)) { - throw new Error( - \`Expected type "\${type}" with option \${JSON.stringify((opts: any))}, \` + - \`but instead got "\${node.type}".\`, - ); - } -}\n\n`; - - Object.keys(definitions.VISITOR_KEYS).forEach(type => { - output += addAssertHelper(type); - }); - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += addAssertHelper(type); - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - output += `export function assert${type}(node: Object, opts: Object): void { - console.trace("The node type ${type} has been renamed to ${newType}"); - assert("${type}", node, opts); -}\n`; - }); - - return output; -}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js b/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js deleted file mode 100644 index 08a5b6fc61..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateBuilders.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); -const formatBuilderName = require("../utils/formatBuilderName"); -const lowerFirst = require("../utils/lowerFirst"); - -module.exports = function generateBuilders() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import builder from "../builder";\n\n`; - - Object.keys(definitions.BUILDER_KEYS).forEach(type => { - output += `export function ${type}(...args: Array): Object { return builder("${type}", ...args); } -export { ${type} as ${formatBuilderName(type)} };\n`; - - // This is needed for backwards compatibility. - // It should be removed in the next major version. - // JSXIdentifier -> jSXIdentifier - if (/^[A-Z]{2}/.test(type)) { - output += `export { ${type} as ${lowerFirst(type)} }\n`; - } - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - output += `export function ${type}(...args: Array): Object { - console.trace("The node type ${type} has been renamed to ${newType}"); - return ${type}("${type}", ...args); -} -export { ${type} as ${formatBuilderName(type)} };\n`; - - // This is needed for backwards compatibility. - // It should be removed in the next major version. - // JSXIdentifier -> jSXIdentifier - if (/^[A-Z]{2}/.test(type)) { - output += `export { ${type} as ${lowerFirst(type)} }\n`; - } - }); - - return output; -}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js b/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js deleted file mode 100644 index 1e4d2cabae..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateConstants.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -module.exports = function generateConstants() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import { FLIPPED_ALIAS_KEYS } from "../../definitions";\n\n`; - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += `export const ${type.toUpperCase()}_TYPES = FLIPPED_ALIAS_KEYS["${type}"];\n`; - }); - - return output; -}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js b/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js deleted file mode 100644 index 1455f99e5b..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/generateValidators.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -const definitions = require("../../lib/definitions"); - -const has = Function.call.bind(Object.prototype.hasOwnProperty); - -function joinComparisons(leftArr, right) { - return ( - leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}` - ); -} - -function addIsHelper(type, aliasKeys, deprecated) { - const targetType = JSON.stringify(type); - let aliasSource = ""; - if (aliasKeys) { - aliasSource = " || " + joinComparisons(aliasKeys, "nodeType"); - } - - let placeholderSource = ""; - const placeholderTypes = []; - if ( - definitions.PLACEHOLDERS.includes(type) && - has(definitions.FLIPPED_ALIAS_KEYS, type) - ) { - placeholderTypes.push(type); - } - if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) { - placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]); - } - if (placeholderTypes.length > 0) { - placeholderSource = - ' || nodeType === "Placeholder" && (' + - joinComparisons(placeholderTypes, "node.expectedNode") + - ")"; - } - - return `export function is${type}(node: ?Object, opts?: Object): boolean { - ${deprecated || ""} - if (!node) return false; - - const nodeType = node.type; - if (nodeType === ${targetType}${aliasSource}${placeholderSource}) { - if (typeof opts === "undefined") { - return true; - } else { - return shallowEqual(node, opts); - } - } - - return false; - } - `; -} - -module.exports = function generateValidators() { - let output = `// @flow -/* - * This file is auto-generated! Do not modify it directly. - * To re-generate run 'make build' - */ -import shallowEqual from "../../utils/shallowEqual";\n\n`; - - Object.keys(definitions.VISITOR_KEYS).forEach(type => { - output += addIsHelper(type); - }); - - Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => { - output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]); - }); - - Object.keys(definitions.DEPRECATED_KEYS).forEach(type => { - const newType = definitions.DEPRECATED_KEYS[type]; - const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`; - output += addIsHelper(type, null, deprecated); - }); - - return output; -}; diff --git a/packages/common/node_modules/@babel/types/scripts/generators/typescript.js b/packages/common/node_modules/@babel/types/scripts/generators/typescript.js deleted file mode 100644 index 298e22e9ee..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/generators/typescript.js +++ /dev/null @@ -1,362 +0,0 @@ -"use strict"; - -const t = require("../../"); -const stringifyValidator = require("../utils/stringifyValidator"); -const toFunctionName = require("../utils/toFunctionName"); - -let code = `// NOTE: This file is autogenerated. Do not modify. -// See packages/babel-types/scripts/generators/typescript.js for script used. - -interface BaseComment { - value: string; - start: number; - end: number; - loc: SourceLocation; - type: "CommentBlock" | "CommentLine"; -} - -export interface CommentBlock extends BaseComment { - type: "CommentBlock"; -} - -export interface CommentLine extends BaseComment { - type: "CommentLine"; -} - -export type Comment = CommentBlock | CommentLine; - -export interface SourceLocation { - start: { - line: number; - column: number; - }; - - end: { - line: number; - column: number; - }; -} - -interface BaseNode { - leadingComments: ReadonlyArray | null; - innerComments: ReadonlyArray | null; - trailingComments: ReadonlyArray | null; - start: number | null; - end: number | null; - loc: SourceLocation | null; - type: Node["type"]; -} - -export type Node = ${t.TYPES.sort().join(" | ")};\n\n`; - -// - -const lines = []; - -for (const type in t.NODE_FIELDS) { - const fields = t.NODE_FIELDS[type]; - const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type); - const builderNames = t.BUILDER_KEYS[type]; - - const struct = ['type: "' + type + '";']; - const args = []; - - fieldNames.forEach(fieldName => { - const field = fields[fieldName]; - // Future / annoying TODO: - // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either: - // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key, - // - declare an alias type for valid keys, detect the case and reuse it here, - // - declare a disjoint union with, for example, ObjectPropertyBase, - // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty - // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)" - let typeAnnotation = stringifyValidator(field.validate, ""); - - if (isNullable(field) && !hasDefault(field)) { - typeAnnotation += " | null"; - } - - if (builderNames.includes(fieldName)) { - if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) { - args.push( - `${t.toBindingIdentifierName(fieldName)}${ - isNullable(field) ? "?:" : ":" - } ${typeAnnotation}` - ); - } else { - args.push( - `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${ - isNullable(field) ? " | undefined" : "" - }` - ); - } - } - - const alphaNumeric = /^\w+$/; - - if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) { - struct.push(`${fieldName}: ${typeAnnotation};`); - } else { - struct.push(`"${fieldName}": ${typeAnnotation};`); - } - }); - - code += `export interface ${type} extends BaseNode { - ${struct.join("\n ").trim()} -}\n\n`; - - // super and import are reserved words in JavaScript - if (type !== "Super" && type !== "Import") { - lines.push( - `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};` - ); - } else { - const functionName = toFunctionName(type); - lines.push( - `declare function _${functionName}(${args.join(", ")}): ${type};`, - `export { _${functionName} as ${functionName}}` - ); - } -} - -for (const typeName of t.TYPES) { - const result = - t.NODE_FIELDS[typeName] || t.FLIPPED_ALIAS_KEYS[typeName] - ? `node is ${typeName}` - : "boolean"; - - lines.push( - `export function is${typeName}(node: object | null | undefined, opts?: object | null): ${result};`, - // TypeScript 3.7: https://github.com/microsoft/TypeScript/pull/32695 will allow assert declarations - // eslint-disable-next-line max-len - `// export function assert${typeName}(node: object | null | undefined, opts?: object | null): asserts ${ - result === "boolean" ? "node" : result - };` - ); -} - -lines.push( - // assert/ - // Commented out as this declaration requires TypeScript 3.7 (what do?) - `// export function assertNode(obj: any): asserts obj is Node`, - - // builders/ - // eslint-disable-next-line max-len - `export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation`, - `export function createUnionTypeAnnotation(types: [T]): T`, - // this probably misbehaves if there are 0 elements, and it's not a UnionTypeAnnotation if there's only 1 - // it is possible to require "2 or more" for this overload ([T, T, ...T[]]) but it requires typescript 3.0 - `export function createUnionTypeAnnotation(types: ReadonlyArray): UnionTypeAnnotation`, - // this smells like "internal API" - // eslint-disable-next-line max-len - `export function buildChildren(node: { children: ReadonlyArray }): JSXElement['children']`, - - // clone/ - `export function clone(n: T): T;`, - `export function cloneDeep(n: T): T;`, - `export function cloneDeepWithoutLoc(n: T): T;`, - `export function cloneNode(n: T, deep?: boolean, withoutLoc?: boolean): T;`, - `export function cloneWithoutLoc(n: T): T;`, - - // comments/ - `export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`, - // eslint-disable-next-line max-len - `export function addComment(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`, - // eslint-disable-next-line max-len - `export function addComments(node: T, type: CommentTypeShorthand, comments: ReadonlyArray): T`, - `export function inheritInnerComments(node: Node, parent: Node): void`, - `export function inheritLeadingComments(node: Node, parent: Node): void`, - `export function inheritsComments(node: T, parent: Node): void`, - `export function inheritTrailingComments(node: Node, parent: Node): void`, - `export function removeComments(node: T): T`, - - // converters/ - // eslint-disable-next-line max-len - `export function ensureBlock(node: Extract): BlockStatement`, - // too complex? - // eslint-disable-next-line max-len - `export function ensureBlock = 'body'>(node: Extract>, key: K): BlockStatement`, - // gatherSequenceExpressions is not exported - `export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string`, - `export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement`, - // it is possible for `node` to be an arbitrary object if `key` is always provided, - // but that doesn't look like intended API - // eslint-disable-next-line max-len - `export function toComputedKey>(node: T, key?: Expression | Identifier): Expression`, - `export function toExpression(node: Function): FunctionExpression`, - `export function toExpression(node: Class): ClassExpression`, - `export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression`, - `export function toIdentifier(name: { toString(): string } | null | undefined): string`, - `export function toKeyAlias(node: Method | Property, key?: Node): string`, - // NOTE: this actually uses Scope from @babel/traverse, but we can't add a dependency on its types, - // as they live in @types. Declare the structural subset that is required. - // eslint-disable-next-line max-len - `export function toSequenceExpression(nodes: ReadonlyArray, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined`, - `export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement`, - `export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement`, - `export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined`, - `export function toStatement(node: Class, ignore?: boolean): ClassDeclaration`, - `export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined`, - `export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration`, - // eslint-disable-next-line max-len - `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined`, - // eslint-disable-next-line max-len - `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement`, - // eslint-disable-next-line max-len - `export function valueToNode(value: undefined): Identifier`, // (should this not be a UnaryExpression to avoid shadowing?) - `export function valueToNode(value: boolean): BooleanLiteral`, - `export function valueToNode(value: null): NullLiteral`, - `export function valueToNode(value: string): StringLiteral`, - // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression - `export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression`, - `export function valueToNode(value: RegExp): RegExpLiteral`, - // eslint-disable-next-line max-len - `export function valueToNode(value: ReadonlyArray): ArrayExpression`, - // this throws with objects that are not PlainObject according to lodash, - // or if there are non-valueToNode-able values - `export function valueToNode(value: object): ObjectExpression`, - // eslint-disable-next-line max-len - `export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression`, - - // modifications/ - // eslint-disable-next-line max-len - `export function removeTypeDuplicates(types: ReadonlyArray): FlowType[]`, - // eslint-disable-next-line max-len - `export function appendToMemberExpression>(member: T, append: MemberExpression['property'], computed?: boolean): T`, - // eslint-disable-next-line max-len - `export function inherits(child: T, parent: Node | null | undefined): T`, - // eslint-disable-next-line max-len - `export function prependToMemberExpression>(member: T, prepend: MemberExpression['object']): T`, - `export function removeProperties( - n: Node, - opts?: { preserveComments: boolean } | null -): void;`, - `export function removePropertiesDeep( - n: T, - opts?: { preserveComments: boolean } | null -): T;`, - - // retrievers/ - // eslint-disable-next-line max-len - `export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record>`, - // eslint-disable-next-line max-len - `export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record`, - // eslint-disable-next-line max-len - `export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record>`, - // eslint-disable-next-line max-len - `export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record>`, - `export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record`, - // eslint-disable-next-line max-len - `export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record>`, - - // traverse/ - `export type TraversalAncestors = ReadonlyArray<{ - node: Node, - key: string, - index?: number, - }>; - export type TraversalHandler = ( - this: undefined, node: Node, parent: TraversalAncestors, type: T - ) => void; - export type TraversalHandlers = { - enter?: TraversalHandler, - exit?: TraversalHandler, - };`.replace(/(^|\n) {2}/g, "$1"), - // eslint-disable-next-line - `export function traverse(n: Node, h: TraversalHandler | TraversalHandlers, state?: T): void;`, - `export function traverseFast(n: Node, h: TraversalHandler, state?: T): void;`, - - // utils/ - // cleanJSXElementLiteralChild is not exported - // inherit is not exported - `export function shallowEqual(actual: object, expected: T): actual is T`, - - // validators/ - // eslint-disable-next-line max-len - `export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression`, - // eslint-disable-next-line max-len - `export function is(type: T, n: Node | null | undefined, required?: undefined): n is Extract`, - // eslint-disable-next-line max-len - `export function is>(type: T, n: Node | null | undefined, required: Partial

): n is P`, - // eslint-disable-next-line max-len - `export function is

(type: string, n: Node | null | undefined, required: Partial

): n is P`, - `export function is(type: string, n: Node | null | undefined, required?: Partial): n is Node`, - `export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean`, - // eslint-disable-next-line max-len - `export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration`, - `export function isImmutable(node: Node): node is Immutable`, - `export function isLet(node: Node): node is VariableDeclaration`, - `export function isNode(node: object | null | undefined): node is Node`, - `export function isNodesEquivalent>(a: T, b: any): b is T`, - `export function isNodesEquivalent(a: any, b: any): boolean`, - `export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean`, - `export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean`, - `export function isScope(node: Node, parent: Node): node is Scopable`, - `export function isSpecifierDefault(specifier: ModuleSpecifier): boolean`, - `export function isType(nodetype: string, targetType: T): nodetype is T`, - `export function isType(nodetype: string | null | undefined, targetType: string): boolean`, - `export function isValidES3Identifier(name: string): boolean`, - `export function isValidIdentifier(name: string): boolean`, - `export function isVar(node: Node): node is VariableDeclaration`, - // the MemberExpression implication is incidental, but it follows from the implementation - // eslint-disable-next-line max-len - `export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray, allowPartial?: boolean): node is MemberExpression`, - // TypeScript 3.7: ": asserts n is T" - // eslint-disable-next-line max-len - `export function validate(n: Node | null | undefined, key: K, value: T[K]): void`, - `export function validate(n: Node, key: string, value: any): void;` -); - -for (const type in t.DEPRECATED_KEYS) { - code += `/** - * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\` - */ -export type ${type} = ${t.DEPRECATED_KEYS[type]};\n -`; -} - -for (const type in t.FLIPPED_ALIAS_KEYS) { - const types = t.FLIPPED_ALIAS_KEYS[type]; - code += `export type ${type} = ${types - .map(type => `${type}`) - .join(" | ")};\n`; -} -code += "\n"; - -code += "export interface Aliases {\n"; -for (const type in t.FLIPPED_ALIAS_KEYS) { - code += ` ${type}: ${type};\n`; -} -code += "}\n\n"; - -code += lines.join("\n") + "\n"; - -// - -process.stdout.write(code); - -// - -function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) { - const index = fieldNames.indexOf(fieldName); - return fieldNames.slice(index).every(_ => isNullable(fields[_])); -} - -function hasDefault(field) { - return field.default != null; -} - -function isNullable(field) { - return field.optional || hasDefault(field); -} - -function sortFieldNames(fields, type) { - return fields.sort((fieldA, fieldB) => { - const indexA = t.BUILDER_KEYS[type].indexOf(fieldA); - const indexB = t.BUILDER_KEYS[type].indexOf(fieldB); - if (indexA === indexB) return fieldA < fieldB ? -1 : 1; - if (indexA === -1) return 1; - if (indexB === -1) return -1; - return indexA - indexB; - }); -} diff --git a/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js deleted file mode 100644 index 621c468219..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/formatBuilderName.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; - -const toLowerCase = Function.call.bind("".toLowerCase); - -module.exports = function formatBuilderName(type) { - // FunctionExpression -> functionExpression - // JSXIdentifier -> jsxIdentifier - // V8IntrinsicIdentifier -> v8IntrinsicIdentifier - return type.replace(/^([A-Z](?=[a-z0-9])|[A-Z]+(?=[A-Z]))/, toLowerCase); -}; diff --git a/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js b/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js deleted file mode 100644 index 9e7b0cee51..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/lowerFirst.js +++ /dev/null @@ -1,4 +0,0 @@ -"use strict"; -module.exports = function lowerFirst(string) { - return string[0].toLowerCase() + string.slice(1); -}; diff --git a/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js deleted file mode 100644 index 2ea1e80357..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/stringifyValidator.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = function stringifyValidator(validator, nodePrefix) { - if (validator === undefined) { - return "any"; - } - - if (validator.each) { - return `Array<${stringifyValidator(validator.each, nodePrefix)}>`; - } - - if (validator.chainOf) { - return stringifyValidator(validator.chainOf[1], nodePrefix); - } - - if (validator.oneOf) { - return validator.oneOf.map(JSON.stringify).join(" | "); - } - - if (validator.oneOfNodeTypes) { - return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | "); - } - - if (validator.oneOfNodeOrValueTypes) { - return validator.oneOfNodeOrValueTypes - .map(_ => { - return isValueType(_) ? _ : nodePrefix + _; - }) - .join(" | "); - } - - if (validator.type) { - return validator.type; - } - - if (validator.shapeOf) { - return ( - "{ " + - Object.keys(validator.shapeOf) - .map(shapeKey => { - const propertyDefinition = validator.shapeOf[shapeKey]; - if (propertyDefinition.validate) { - const isOptional = - propertyDefinition.optional || propertyDefinition.default != null; - return ( - shapeKey + - (isOptional ? "?: " : ": ") + - stringifyValidator(propertyDefinition.validate) - ); - } - return null; - }) - .filter(Boolean) - .join(", ") + - " }" - ); - } - - return ["any"]; -}; - -/** - * Heuristic to decide whether or not the given type is a value type (eg. "null") - * or a Node type (eg. "Expression"). - */ -function isValueType(type) { - return type.charAt(0).toLowerCase() === type.charAt(0); -} diff --git a/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js b/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js deleted file mode 100644 index 627c9a7d8f..0000000000 --- a/packages/common/node_modules/@babel/types/scripts/utils/toFunctionName.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = function toFunctionName(typeName) { - const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx"); - return _.slice(0, 1).toLowerCase() + _.slice(1); -}; diff --git a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts deleted file mode 100644 index 220183481a..0000000000 --- a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { Options, TransformResult } from './types'; -export default class ScriptTransformer { - static EVAL_RESULT_VARIABLE: 'Object.'; - private _cache; - private _config; - private _transformCache; - private _transformConfigCache; - constructor(config: Config.ProjectConfig); - private _getCacheKey; - private _getFileCachePath; - private _getTransformPath; - private _getTransformer; - private _instrumentFile; - private _getRealPath; - preloadTransformer(filepath: Config.Path): void; - transformSource(filepath: Config.Path, content: string, instrument: boolean): { - code: string; - mapCoverage: boolean; - sourceMapPath: string | null; - }; - private _transformAndBuildScript; - transform(filename: Config.Path, options: Options, fileSource?: string): TransformResult; - transformJson(filename: Config.Path, options: Options, fileSource: string): string; - requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => void): ModuleType; - requireAndTranspileModule(moduleName: string, callback?: (module: ModuleType) => Promise): Promise; - /** - * @deprecated use `this.shouldTransform` instead - */ - private _shouldTransform; - shouldTransform(filename: Config.Path): boolean; -} -//# sourceMappingURL=ScriptTransformer.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map deleted file mode 100644 index d74a82fe35..0000000000 --- a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ScriptTransformer.d.ts","sourceRoot":"","sources":["../src/ScriptTransformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAanC,OAAO,EACL,OAAO,EAGP,eAAe,EAChB,MAAM,SAAS,CAAC;AAoCjB,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAClD,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,qBAAqB,CAA4B;gBAE7C,MAAM,EAAE,MAAM,CAAC,aAAa;IAqBxC,OAAO,CAAC,YAAY;IAgCpB,OAAO,CAAC,iBAAiB;IAyBzB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,eAAe;IA4BvB,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,YAAY;IAUpB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,IAAI;IAI/C,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO;;;;;IAwF3E,OAAO,CAAC,wBAAwB;IA+DhC,SAAS,CACP,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe;IA2BlB,aAAa,CACX,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM;IAkBT,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,GACtC,UAAU;IACb,yBAAyB,CAAC,UAAU,GAAG,OAAO,EAC5C,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,GAC/C,OAAO,CAAC,UAAU,CAAC;IAsDtB;;OAEG;IAEH,OAAO,CAAC,gBAAgB;IAIxB,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,GAAG,OAAO;CAQhD"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js b/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js deleted file mode 100644 index 0dbc1d7b66..0000000000 --- a/packages/common/node_modules/@jest/transform/build/ScriptTransformer.js +++ /dev/null @@ -1,863 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -function _crypto() { - const data = _interopRequireDefault(require('crypto')); - - _crypto = function _crypto() { - return data; - }; - - return data; -} - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _vm() { - const data = _interopRequireDefault(require('vm')); - - _vm = function _vm() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _gracefulFs() { - const data = _interopRequireDefault(require('graceful-fs')); - - _gracefulFs = function _gracefulFs() { - return data; - }; - - return data; -} - -function _core() { - const data = require('@babel/core'); - - _core = function _core() { - return data; - }; - - return data; -} - -function _babelPluginIstanbul() { - const data = _interopRequireDefault(require('babel-plugin-istanbul')); - - _babelPluginIstanbul = function _babelPluginIstanbul() { - return data; - }; - - return data; -} - -function _convertSourceMap() { - const data = _interopRequireDefault(require('convert-source-map')); - - _convertSourceMap = function _convertSourceMap() { - return data; - }; - - return data; -} - -function _jestHasteMap() { - const data = _interopRequireDefault(require('jest-haste-map')); - - _jestHasteMap = function _jestHasteMap() { - return data; - }; - - return data; -} - -function _fastJsonStableStringify() { - const data = _interopRequireDefault(require('fast-json-stable-stringify')); - - _fastJsonStableStringify = function _fastJsonStableStringify() { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function _slash() { - return data; - }; - - return data; -} - -function _writeFileAtomic() { - const data = _interopRequireDefault(require('write-file-atomic')); - - _writeFileAtomic = function _writeFileAtomic() { - return data; - }; - - return data; -} - -function _realpathNative() { - const data = require('realpath-native'); - - _realpathNative = function _realpathNative() { - return data; - }; - - return data; -} - -function _pirates() { - const data = require('pirates'); - - _pirates = function _pirates() { - return data; - }; - - return data; -} - -var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); - -var _enhanceUnexpectedTokenMessage = _interopRequireDefault( - require('./enhanceUnexpectedTokenMessage') -); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value); - } - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err); - } - _next(undefined); - }); - }; -} - -// Use `require` to avoid TS rootDir -const _require = require('../package.json'), - VERSION = _require.version; // This data structure is used to avoid recalculating some data every time that -// we need to transform a file. Since ScriptTransformer is instantiated for each -// file we need to keep this object in the local scope of this module. - -const projectCaches = new WeakMap(); // To reset the cache for specific changesets (rather than package version). - -const CACHE_VERSION = '1'; - -function waitForPromiseWithCleanup(_x, _x2) { - return _waitForPromiseWithCleanup.apply(this, arguments); -} - -function _waitForPromiseWithCleanup() { - _waitForPromiseWithCleanup = _asyncToGenerator(function*(promise, cleanup) { - try { - yield promise; - } finally { - cleanup(); - } - }); - return _waitForPromiseWithCleanup.apply(this, arguments); -} - -class ScriptTransformer { - constructor(config) { - _defineProperty(this, '_cache', void 0); - - _defineProperty(this, '_config', void 0); - - _defineProperty(this, '_transformCache', void 0); - - _defineProperty(this, '_transformConfigCache', void 0); - - this._config = config; - this._transformCache = new Map(); - this._transformConfigCache = new Map(); - let projectCache = projectCaches.get(config); - - if (!projectCache) { - projectCache = { - configString: (0, _fastJsonStableStringify().default)(this._config), - ignorePatternsRegExp: calcIgnorePatternRegExp(this._config), - transformRegExp: calcTransformRegExp(this._config), - transformedFiles: new Map() - }; - projectCaches.set(config, projectCache); - } - - this._cache = projectCache; - } - - _getCacheKey(fileData, filename, instrument) { - const configString = this._cache.configString; - - const transformer = this._getTransformer(filename); - - if (transformer && typeof transformer.getCacheKey === 'function') { - return _crypto() - .default.createHash('md5') - .update( - transformer.getCacheKey(fileData, filename, configString, { - config: this._config, - instrument, - rootDir: this._config.rootDir - }) - ) - .update(CACHE_VERSION) - .digest('hex'); - } else { - return _crypto() - .default.createHash('md5') - .update(fileData) - .update(configString) - .update(instrument ? 'instrument' : '') - .update(filename) - .update(CACHE_VERSION) - .digest('hex'); - } - } - - _getFileCachePath(filename, content, instrument) { - const baseCacheDir = _jestHasteMap().default.getCacheFilePath( - this._config.cacheDirectory, - 'jest-transform-cache-' + this._config.name, - VERSION - ); - - const cacheKey = this._getCacheKey(content, filename, instrument); // Create sub folders based on the cacheKey to avoid creating one - // directory with many files. - - const cacheDir = _path().default.join( - baseCacheDir, - cacheKey[0] + cacheKey[1] - ); - - const cacheFilenamePrefix = _path() - .default.basename(filename, _path().default.extname(filename)) - .replace(/\W/g, ''); - - const cachePath = (0, _slash().default)( - _path().default.join(cacheDir, cacheFilenamePrefix + '_' + cacheKey) - ); - (0, _jestUtil().createDirectory)(cacheDir); - return cachePath; - } - - _getTransformPath(filename) { - const transformRegExp = this._cache.transformRegExp; - - if (!transformRegExp) { - return undefined; - } - - for (let i = 0; i < transformRegExp.length; i++) { - if (transformRegExp[i][0].test(filename)) { - const transformPath = transformRegExp[i][1]; - - this._transformConfigCache.set(transformPath, transformRegExp[i][2]); - - return transformPath; - } - } - - return undefined; - } - - _getTransformer(filename) { - let transform = null; - - if (!this._config.transform || !this._config.transform.length) { - return null; - } - - const transformPath = this._getTransformPath(filename); - - if (transformPath) { - const transformer = this._transformCache.get(transformPath); - - if (transformer != null) { - return transformer; - } - - transform = require(transformPath); - - const transformerConfig = this._transformConfigCache.get(transformPath); - - if (typeof transform.createTransformer === 'function') { - transform = transform.createTransformer(transformerConfig); - } - - if (typeof transform.process !== 'function') { - throw new TypeError( - 'Jest: a transform must export a `process` function.' - ); - } - - this._transformCache.set(transformPath, transform); - } - - return transform; - } - - _instrumentFile(filename, content) { - const result = (0, _core().transformSync)(content, { - auxiliaryCommentBefore: ' istanbul ignore next ', - babelrc: false, - caller: { - name: '@jest/transform', - supportsStaticESM: false - }, - configFile: false, - filename, - plugins: [ - [ - _babelPluginIstanbul().default, - { - compact: false, - // files outside `cwd` will not be instrumented - cwd: this._config.rootDir, - exclude: [], - useInlineSourceMaps: false - } - ] - ] - }); - - if (result) { - const code = result.code; - - if (code) { - return code; - } - } - - return content; - } - - _getRealPath(filepath) { - try { - return (0, _realpathNative().sync)(filepath) || filepath; - } catch (err) { - return filepath; - } - } // We don't want to expose transformers to the outside - this function is just - // to warm up `this._transformCache` - - preloadTransformer(filepath) { - this._getTransformer(filepath); - } - - transformSource(filepath, content, instrument) { - const filename = this._getRealPath(filepath); - - const transform = this._getTransformer(filename); - - const cacheFilePath = this._getFileCachePath(filename, content, instrument); - - let sourceMapPath = cacheFilePath + '.map'; // Ignore cache if `config.cache` is set (--no-cache) - - let code = this._config.cache ? readCodeCacheFile(cacheFilePath) : null; - const shouldCallTransform = transform && this.shouldTransform(filename); // That means that the transform has a custom instrumentation - // logic and will handle it based on `config.collectCoverage` option - - const transformWillInstrument = - shouldCallTransform && transform && transform.canInstrument; // If we handle the coverage instrumentation, we should try to map code - // coverage against original source with any provided source map - - const mapCoverage = instrument && !transformWillInstrument; - - if (code) { - // This is broken: we return the code, and a path for the source map - // directly from the cache. But, nothing ensures the source map actually - // matches that source code. They could have gotten out-of-sync in case - // two separate processes write concurrently to the same cache files. - return { - code, - mapCoverage, - sourceMapPath - }; - } - - let transformed = { - code: content, - map: null - }; - - if (transform && shouldCallTransform) { - const processed = transform.process(content, filename, this._config, { - instrument - }); - - if (typeof processed === 'string') { - transformed.code = processed; - } else if (processed != null && typeof processed.code === 'string') { - transformed = processed; - } else { - throw new TypeError( - "Jest: a transform's `process` function must return a string, " + - 'or an object with `code` key containing this string.' - ); - } - } - - if (!transformed.map) { - //Could be a potential freeze here. - //See: https://github.com/facebook/jest/pull/5177#discussion_r158883570 - const inlineSourceMap = _convertSourceMap().default.fromSource( - transformed.code - ); - - if (inlineSourceMap) { - transformed.map = inlineSourceMap.toJSON(); - } - } - - if (!transformWillInstrument && instrument) { - code = this._instrumentFile(filename, transformed.code); - } else { - code = transformed.code; - } - - if (transformed.map) { - const sourceMapContent = - typeof transformed.map === 'string' - ? transformed.map - : JSON.stringify(transformed.map); - writeCacheFile(sourceMapPath, sourceMapContent); - } else { - sourceMapPath = null; - } - - writeCodeCacheFile(cacheFilePath, code); - return { - code, - mapCoverage, - sourceMapPath - }; - } - - _transformAndBuildScript(filename, options, instrument, fileSource) { - const isInternalModule = !!(options && options.isInternalModule); - const isCoreModule = !!(options && options.isCoreModule); - const content = stripShebang( - fileSource || _gracefulFs().default.readFileSync(filename, 'utf8') - ); - let wrappedCode; - let sourceMapPath = null; - let mapCoverage = false; - const willTransform = - !isInternalModule && - !isCoreModule && - (this.shouldTransform(filename) || instrument); - - try { - const extraGlobals = (options && options.extraGlobals) || []; - - if (willTransform) { - const transformedSource = this.transformSource( - filename, - content, - instrument - ); - wrappedCode = wrap(transformedSource.code, ...extraGlobals); - sourceMapPath = transformedSource.sourceMapPath; - mapCoverage = transformedSource.mapCoverage; - } else { - wrappedCode = wrap(content, ...extraGlobals); - } - - return { - mapCoverage, - script: new (_vm()).default.Script(wrappedCode, { - displayErrors: true, - filename: isCoreModule ? 'jest-nodejs-core-' + filename : filename - }), - sourceMapPath - }; - } catch (e) { - if (e.codeFrame) { - e.stack = e.message + '\n' + e.codeFrame; - } - - if ( - e instanceof SyntaxError && - e.message.includes('Unexpected token') && - !e.message.includes(' expected') - ) { - throw (0, _enhanceUnexpectedTokenMessage.default)(e); - } - - throw e; - } - } - - transform(filename, options, fileSource) { - let scriptCacheKey = undefined; - let instrument = false; - - if (!options.isCoreModule) { - instrument = (0, _shouldInstrument.default)( - filename, - options, - this._config - ); - scriptCacheKey = getScriptCacheKey(filename, instrument); - - const result = this._cache.transformedFiles.get(scriptCacheKey); - - if (result) { - return result; - } - } - - const result = this._transformAndBuildScript( - filename, - options, - instrument, - fileSource - ); - - if (scriptCacheKey) { - this._cache.transformedFiles.set(scriptCacheKey, result); - } - - return result; - } - - transformJson(filename, options, fileSource) { - const isInternalModule = options.isInternalModule; - const isCoreModule = options.isCoreModule; - const willTransform = - !isInternalModule && !isCoreModule && this.shouldTransform(filename); - - if (willTransform) { - const _this$transformSource = this.transformSource( - filename, - fileSource, - false - ), - transformedJsonSource = _this$transformSource.code; - - return transformedJsonSource; - } - - return fileSource; - } - - requireAndTranspileModule(moduleName, callback) { - // Load the transformer to avoid a cycle where we need to load a - // transformer in order to transform it in the require hooks - this.preloadTransformer(moduleName); - let transforming = false; - const revertHook = (0, _pirates().addHook)( - (code, filename) => { - try { - transforming = true; - return this.transformSource(filename, code, false).code || code; - } finally { - transforming = false; - } - }, - { - exts: [_path().default.extname(moduleName)], - ignoreNodeModules: false, - matcher: filename => { - if (transforming) { - // Don't transform any dependency required by the transformer itself - return false; - } - - return this.shouldTransform(filename); - } - } - ); - - const module = require(moduleName); - - if (!callback) { - revertHook(); - return module; - } - - try { - const cbResult = callback(module); - - if ((0, _jestUtil().isPromise)(cbResult)) { - return waitForPromiseWithCleanup(cbResult, revertHook).then( - () => module - ); - } - } finally { - revertHook(); - } - - return module; - } - /** - * @deprecated use `this.shouldTransform` instead - */ - // @ts-ignore: Unused and private - remove in Jest 25 - - _shouldTransform(filename) { - return this.shouldTransform(filename); - } - - shouldTransform(filename) { - const ignoreRegexp = this._cache.ignorePatternsRegExp; - const isIgnored = ignoreRegexp ? ignoreRegexp.test(filename) : false; - return ( - !!this._config.transform && !!this._config.transform.length && !isIgnored - ); - } -} - -exports.default = ScriptTransformer; - -_defineProperty(ScriptTransformer, 'EVAL_RESULT_VARIABLE', void 0); - -const removeFile = path => { - try { - _gracefulFs().default.unlinkSync(path); - } catch (e) {} -}; - -const stripShebang = content => { - // If the file data starts with a shebang remove it. Leaves the empty line - // to keep stack trace line numbers correct. - if (content.startsWith('#!')) { - return content.replace(/^#!.*/, ''); - } else { - return content; - } -}; -/** - * This is like `writeCacheFile` but with an additional sanity checksum. We - * cannot use the same technique for source maps because we expose source map - * cache file paths directly to callsites, with the expectation they can read - * it right away. This is not a great system, because source map cache file - * could get corrupted, out-of-sync, etc. - */ - -function writeCodeCacheFile(cachePath, code) { - const checksum = _crypto() - .default.createHash('md5') - .update(code) - .digest('hex'); - - writeCacheFile(cachePath, checksum + '\n' + code); -} -/** - * Read counterpart of `writeCodeCacheFile`. We verify that the content of the - * file matches the checksum, in case some kind of corruption happened. This - * could happen if an older version of `jest-runtime` writes non-atomically to - * the same cache, for example. - */ - -function readCodeCacheFile(cachePath) { - const content = readCacheFile(cachePath); - - if (content == null) { - return null; - } - - const code = content.substr(33); - - const checksum = _crypto() - .default.createHash('md5') - .update(code) - .digest('hex'); - - if (checksum === content.substr(0, 32)) { - return code; - } - - return null; -} -/** - * Writing to the cache atomically relies on 'rename' being atomic on most - * file systems. Doing atomic write reduces the risk of corruption by avoiding - * two processes to write to the same file at the same time. It also reduces - * the risk of reading a file that's being overwritten at the same time. - */ - -const writeCacheFile = (cachePath, fileData) => { - try { - _writeFileAtomic().default.sync(cachePath, fileData, { - encoding: 'utf8' - }); - } catch (e) { - if (cacheWriteErrorSafeToIgnore(e, cachePath)) { - return; - } - - e.message = - 'jest: failed to cache transform results in: ' + - cachePath + - '\nFailure message: ' + - e.message; - removeFile(cachePath); - throw e; - } -}; -/** - * On Windows, renames are not atomic, leading to EPERM exceptions when two - * processes attempt to rename to the same target file at the same time. - * If the target file exists we can be reasonably sure another process has - * legitimately won a cache write race and ignore the error. - */ - -const cacheWriteErrorSafeToIgnore = (e, cachePath) => - process.platform === 'win32' && - e.code === 'EPERM' && - _gracefulFs().default.existsSync(cachePath); - -const readCacheFile = cachePath => { - if (!_gracefulFs().default.existsSync(cachePath)) { - return null; - } - - let fileData; - - try { - fileData = _gracefulFs().default.readFileSync(cachePath, 'utf8'); - } catch (e) { - e.message = - 'jest: failed to read cache file: ' + - cachePath + - '\nFailure message: ' + - e.message; - removeFile(cachePath); - throw e; - } - - if (fileData == null) { - // We must have somehow created the file but failed to write to it, - // let's delete it and retry. - removeFile(cachePath); - } - - return fileData; -}; - -const getScriptCacheKey = (filename, instrument) => { - const mtime = _gracefulFs().default.statSync(filename).mtime; - - return filename + '_' + mtime.getTime() + (instrument ? '_instrumented' : ''); -}; - -const calcIgnorePatternRegExp = config => { - if ( - !config.transformIgnorePatterns || - config.transformIgnorePatterns.length === 0 - ) { - return undefined; - } - - return new RegExp(config.transformIgnorePatterns.join('|')); -}; - -const calcTransformRegExp = config => { - if (!config.transform.length) { - return undefined; - } - - const transformRegexp = []; - - for (let i = 0; i < config.transform.length; i++) { - transformRegexp.push([ - new RegExp(config.transform[i][0]), - config.transform[i][1], - config.transform[i][2] - ]); - } - - return transformRegexp; -}; - -const wrap = (content, ...extras) => { - const globals = new Set([ - 'module', - 'exports', - 'require', - '__dirname', - '__filename', - 'global', - 'jest', - ...extras - ]); - return ( - '({"' + - ScriptTransformer.EVAL_RESULT_VARIABLE + - `":function(${Array.from(globals).join(',')}){` + - content + - '\n}});' - ); -}; // TODO: Can this be added to the static property? - -ScriptTransformer.EVAL_RESULT_VARIABLE = 'Object.'; diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts deleted file mode 100644 index 0a5157cab1..0000000000 --- a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export default function enhanceUnexpectedTokenMessage(e: Error): Error; -//# sourceMappingURL=enhanceUnexpectedTokenMessage.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map deleted file mode 100644 index 28bd6de164..0000000000 --- a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enhanceUnexpectedTokenMessage.d.ts","sourceRoot":"","sources":["../src/enhanceUnexpectedTokenMessage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CAAC,CAAC,EAAE,KAAK,SA2B7D"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js b/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js deleted file mode 100644 index a05b93a1f2..0000000000 --- a/packages/common/node_modules/@jest/transform/build/enhanceUnexpectedTokenMessage.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = enhanceUnexpectedTokenMessage; - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function _chalk() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const DOT = ' \u2022 '; - -function enhanceUnexpectedTokenMessage(e) { - e.stack = - `${_chalk().default.bold.red('Jest encountered an unexpected token')} - -This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript. - -By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules". - -Here's what you can do: -${DOT}To have some of your "node_modules" files transformed, you can specify a custom ${_chalk().default.bold( - '"transformIgnorePatterns"' - )} in your config. -${DOT}If you need a custom transformation specify a ${_chalk().default.bold( - '"transform"' - )} option in your config. -${DOT}If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the ${_chalk().default.bold( - '"moduleNameMapper"' - )} config option. - -You'll find more details and examples of these config options in the docs: -${_chalk().default.cyan('https://jestjs.io/docs/en/configuration.html')} - -${_chalk().default.bold.red('Details:')} - -` + e.stack; - return e; -} diff --git a/packages/common/node_modules/@jest/transform/build/index.d.ts b/packages/common/node_modules/@jest/transform/build/index.d.ts deleted file mode 100644 index 901c979c45..0000000000 --- a/packages/common/node_modules/@jest/transform/build/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { default as ScriptTransformer } from './ScriptTransformer'; -export { default as shouldInstrument } from './shouldInstrument'; -export { Transformer, ShouldInstrumentOptions, Options as TransformationOptions, } from './types'; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/index.d.ts.map b/packages/common/node_modules/@jest/transform/build/index.d.ts.map deleted file mode 100644 index 55a52aecae..0000000000 --- a/packages/common/node_modules/@jest/transform/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,OAAO,IAAI,qBAAqB,GACjC,MAAM,SAAS,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/index.js b/packages/common/node_modules/@jest/transform/build/index.js deleted file mode 100644 index 481fab49c7..0000000000 --- a/packages/common/node_modules/@jest/transform/build/index.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'ScriptTransformer', { - enumerable: true, - get: function get() { - return _ScriptTransformer.default; - } -}); -Object.defineProperty(exports, 'shouldInstrument', { - enumerable: true, - get: function get() { - return _shouldInstrument.default; - } -}); -Object.defineProperty(exports, 'Transformer', { - enumerable: true, - get: function get() { - return _types.Transformer; - } -}); -Object.defineProperty(exports, 'ShouldInstrumentOptions', { - enumerable: true, - get: function get() { - return _types.ShouldInstrumentOptions; - } -}); -Object.defineProperty(exports, 'TransformationOptions', { - enumerable: true, - get: function get() { - return _types.Options; - } -}); - -var _ScriptTransformer = _interopRequireDefault(require('./ScriptTransformer')); - -var _shouldInstrument = _interopRequireDefault(require('./shouldInstrument')); - -var _types = require('./types'); - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts deleted file mode 100644 index 4790f5b7b9..0000000000 --- a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Config } from '@jest/types'; -import { ShouldInstrumentOptions } from './types'; -export default function shouldInstrument(filename: Config.Path, options: ShouldInstrumentOptions, config: Config.ProjectConfig): boolean; -//# sourceMappingURL=shouldInstrument.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map b/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map deleted file mode 100644 index 4a45f93081..0000000000 --- a/packages/common/node_modules/@jest/transform/build/shouldInstrument.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"shouldInstrument.d.ts","sourceRoot":"","sources":["../src/shouldInstrument.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAInC,OAAO,EAAC,uBAAuB,EAAC,MAAM,SAAS,CAAC;AAMhD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,CAAC,aAAa,GAC3B,OAAO,CA4ET"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/shouldInstrument.js b/packages/common/node_modules/@jest/transform/build/shouldInstrument.js deleted file mode 100644 index f6fa147f8c..0000000000 --- a/packages/common/node_modules/@jest/transform/build/shouldInstrument.js +++ /dev/null @@ -1,147 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = shouldInstrument; - -function _path() { - const data = _interopRequireDefault(require('path')); - - _path = function _path() { - return data; - }; - - return data; -} - -function _jestRegexUtil() { - const data = require('jest-regex-util'); - - _jestRegexUtil = function _jestRegexUtil() { - return data; - }; - - return data; -} - -function _jestUtil() { - const data = require('jest-util'); - - _jestUtil = function _jestUtil() { - return data; - }; - - return data; -} - -function _micromatch() { - const data = _interopRequireDefault(require('micromatch')); - - _micromatch = function _micromatch() { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const MOCKS_PATTERN = new RegExp( - (0, _jestRegexUtil().escapePathForRegex)( - _path().default.sep + '__mocks__' + _path().default.sep - ) -); - -function shouldInstrument(filename, options, config) { - if (!options.collectCoverage) { - return false; - } - - if ( - config.forceCoverageMatch.length && - _micromatch().default.any(filename, config.forceCoverageMatch) - ) { - return true; - } - - if ( - !config.testPathIgnorePatterns.some(pattern => !!filename.match(pattern)) - ) { - if (config.testRegex.some(regex => new RegExp(regex).test(filename))) { - return false; - } - - if ( - _micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)(filename), - config.testMatch - ) - ) { - return false; - } - } - - if ( - // This configuration field contains an object in the form of: - // {'path/to/file.js': true} - options.collectCoverageOnlyFrom && - !options.collectCoverageOnlyFrom[filename] - ) { - return false; - } - - if ( - // still cover if `only` is specified - !options.collectCoverageOnlyFrom && - options.collectCoverageFrom && - !_micromatch().default.some( - (0, _jestUtil().replacePathSepForGlob)( - _path().default.relative(config.rootDir, filename) - ), - options.collectCoverageFrom - ) - ) { - return false; - } - - if ( - config.coveragePathIgnorePatterns.some(pattern => !!filename.match(pattern)) - ) { - return false; - } - - if (config.globalSetup === filename) { - return false; - } - - if (config.globalTeardown === filename) { - return false; - } - - if (config.setupFiles.includes(filename)) { - return false; - } - - if (config.setupFilesAfterEnv.includes(filename)) { - return false; - } - - if (MOCKS_PATTERN.test(filename)) { - return false; - } - - if (options.changedFiles && !options.changedFiles.has(filename)) { - return false; - } - - return true; -} diff --git a/packages/common/node_modules/@jest/transform/build/types.d.ts b/packages/common/node_modules/@jest/transform/build/types.d.ts deleted file mode 100644 index 2fb6bddb44..0000000000 --- a/packages/common/node_modules/@jest/transform/build/types.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Script } from 'vm'; -import { RawSourceMap } from 'source-map'; -import { Config } from '@jest/types'; -export declare type ShouldInstrumentOptions = Pick & { - changedFiles: Set | undefined; -}; -export declare type Options = ShouldInstrumentOptions & Pick & { - isCoreModule?: boolean; - isInternalModule?: boolean; -}; -declare type Omit = Pick>; -interface FixedRawSourceMap extends Omit { - version: number; -} -export declare type TransformedSource = { - code: string; - map?: FixedRawSourceMap | string | null; -}; -export declare type TransformResult = { - script: Script; - mapCoverage: boolean; - sourceMapPath: string | null; -}; -export declare type TransformOptions = { - instrument: boolean; -}; -export declare type CacheKeyOptions = { - config: Config.ProjectConfig; - instrument: boolean; - rootDir: string; -}; -export interface Transformer { - canInstrument?: boolean; - createTransformer?: (options?: any) => Transformer; - getCacheKey: (fileData: string, filePath: Config.Path, configStr: string, options: CacheKeyOptions) => string; - process: (sourceText: string, sourcePath: Config.Path, config: Config.ProjectConfig, options?: TransformOptions) => string | TransformedSource; -} -export {}; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/types.d.ts.map b/packages/common/node_modules/@jest/transform/build/types.d.ts.map deleted file mode 100644 index 62ec12b241..0000000000 --- a/packages/common/node_modules/@jest/transform/build/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAEnC,oBAAY,uBAAuB,GAAG,IAAI,CACxC,MAAM,CAAC,YAAY,EACnB,iBAAiB,GAAG,qBAAqB,GAAG,yBAAyB,CACtE,GAAG;IACF,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,oBAAY,OAAO,GAAG,uBAAuB,GAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC,GAAG;IAC1C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAGJ,aAAK,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAI/D,UAAU,iBAAkB,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAAC;CACzC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,WAAW,CAAC;IAEnD,WAAW,EAAE,CACX,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,CAAC,IAAI,EACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,eAAe,KACrB,MAAM,CAAC;IAEZ,OAAO,EAAE,CACP,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,CAAC,IAAI,EACvB,MAAM,EAAE,MAAM,CAAC,aAAa,EAC5B,OAAO,CAAC,EAAE,gBAAgB,KACvB,MAAM,GAAG,iBAAiB,CAAC;CACjC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/transform/build/types.js b/packages/common/node_modules/@jest/transform/build/types.js deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/transform/build/types.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/packages/common/node_modules/@jest/transform/package.json b/packages/common/node_modules/@jest/transform/package.json deleted file mode 100644 index a356f905b7..0000000000 --- a/packages/common/node_modules/@jest/transform/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@jest/transform", - "version": "24.9.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/jest-transform" - }, - "license": "MIT", - "main": "build/index.js", - "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^24.9.0", - "babel-plugin-istanbul": "^5.1.0", - "chalk": "^2.0.1", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.9.0", - "jest-regex-util": "^24.9.0", - "jest-util": "^24.9.0", - "micromatch": "^3.1.10", - "pirates": "^4.0.1", - "realpath-native": "^1.1.0", - "slash": "^2.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "2.4.1" - }, - "devDependencies": { - "@types/babel__core": "^7.1.0", - "@types/convert-source-map": "^1.5.1", - "@types/fast-json-stable-stringify": "^2.0.0", - "@types/graceful-fs": "^4.1.2", - "@types/micromatch": "^3.1.0", - "@types/write-file-atomic": "^2.1.1" - }, - "engines": { - "node": ">= 6" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1" -} diff --git a/packages/common/node_modules/@jest/types/LICENSE b/packages/common/node_modules/@jest/types/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/@jest/types/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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. diff --git a/packages/common/node_modules/@jest/types/build/Circus.d.ts b/packages/common/node_modules/@jest/types/build/Circus.d.ts deleted file mode 100644 index 5a80960936..0000000000 --- a/packages/common/node_modules/@jest/types/build/Circus.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import * as Global from './Global'; -declare type Process = NodeJS.Process; -export declare type DoneFn = Global.DoneFn; -export declare type BlockFn = Global.BlockFn; -export declare type BlockName = Global.BlockName; -export declare type BlockMode = void | 'skip' | 'only' | 'todo'; -export declare type TestMode = BlockMode; -export declare type TestName = Global.TestName; -export declare type TestFn = Global.TestFn; -export declare type HookFn = (done?: DoneFn) => Promise | null | undefined; -export declare type AsyncFn = TestFn | HookFn; -export declare type SharedHookType = 'afterAll' | 'beforeAll'; -export declare type HookType = SharedHookType | 'afterEach' | 'beforeEach'; -export declare type TestContext = Record; -export declare type Exception = any; -export declare type FormattedError = string; -export declare type Hook = { - asyncError: Error; - fn: HookFn; - type: HookType; - parent: DescribeBlock; - timeout: number | undefined | null; -}; -export declare type EventHandler = (event: Event, state: State) => void; -export declare type Event = { - name: 'include_test_location_in_result'; -} | { - asyncError: Error; - mode: BlockMode; - name: 'start_describe_definition'; - blockName: BlockName; -} | { - mode: BlockMode; - name: 'finish_describe_definition'; - blockName: BlockName; -} | { - asyncError: Error; - name: 'add_hook'; - hookType: HookType; - fn: HookFn; - timeout: number | undefined; -} | { - asyncError: Error; - name: 'add_test'; - testName: TestName; - fn?: TestFn; - mode?: TestMode; - timeout: number | undefined; -} | { - name: 'hook_start'; - hook: Hook; -} | { - name: 'hook_success'; - describeBlock?: DescribeBlock; - test?: TestEntry; - hook: Hook; -} | { - name: 'hook_failure'; - error: string | Exception; - describeBlock?: DescribeBlock; - test?: TestEntry; - hook: Hook; -} | { - name: 'test_fn_start'; - test: TestEntry; -} | { - name: 'test_fn_success'; - test: TestEntry; -} | { - name: 'test_fn_failure'; - error: Exception; - test: TestEntry; -} | { - name: 'test_retry'; - test: TestEntry; -} | { - name: 'test_start'; - test: TestEntry; -} | { - name: 'test_skip'; - test: TestEntry; -} | { - name: 'test_todo'; - test: TestEntry; -} | { - name: 'test_done'; - test: TestEntry; -} | { - name: 'run_describe_start'; - describeBlock: DescribeBlock; -} | { - name: 'run_describe_finish'; - describeBlock: DescribeBlock; -} | { - name: 'run_start'; -} | { - name: 'run_finish'; -} | { - name: 'error'; - error: Exception; -} | { - name: 'setup'; - testNamePattern?: string; - parentProcess: Process; -} | { - name: 'teardown'; -}; -export declare type TestStatus = 'skip' | 'done' | 'todo'; -export declare type TestResult = { - duration?: number | null; - errors: Array; - invocations: number; - status: TestStatus; - location?: { - column: number; - line: number; - } | null; - testPath: Array; -}; -export declare type RunResult = { - unhandledErrors: Array; - testResults: TestResults; -}; -export declare type TestResults = Array; -export declare type GlobalErrorHandlers = { - uncaughtException: Array<(exception: Exception) => void>; - unhandledRejection: Array<(exception: Exception, promise: Promise) => void>; -}; -export declare type State = { - currentDescribeBlock: DescribeBlock; - currentlyRunningTest?: TestEntry | null; - expand?: boolean; - hasFocusedTests: boolean; - originalGlobalErrorHandlers?: GlobalErrorHandlers; - parentProcess: Process | null; - rootDescribeBlock: DescribeBlock; - testNamePattern?: RegExp | null; - testTimeout: number; - unhandledErrors: Array; - includeTestLocationInResult: boolean; -}; -export declare type DescribeBlock = { - children: Array; - hooks: Array; - mode: BlockMode; - name: BlockName; - parent?: DescribeBlock; - tests: Array; -}; -export declare type TestError = Exception | Array<[Exception | undefined, Exception]>; -export declare type TestEntry = { - asyncError: Exception; - errors: TestError; - fn?: TestFn; - invocations: number; - mode: TestMode; - name: TestName; - parent: DescribeBlock; - startedAt?: number | null; - duration?: number | null; - status?: TestStatus | null; - timeout?: number; -}; -export {}; -//# sourceMappingURL=Circus.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Circus.d.ts.map b/packages/common/node_modules/@jest/types/build/Circus.d.ts.map deleted file mode 100644 index cf27dac910..0000000000 --- a/packages/common/node_modules/@jest/types/build/Circus.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Circus.d.ts","sourceRoot":"","sources":["../src/Circus.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,aAAK,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AAE9B,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACrC,oBAAY,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AACzC,oBAAY,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AACxD,oBAAY,QAAQ,GAAG,SAAS,CAAC;AACjC,oBAAY,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACvC,oBAAY,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACnC,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AACtC,oBAAY,cAAc,GAAG,UAAU,GAAG,WAAW,CAAC;AACtD,oBAAY,QAAQ,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,CAAC;AACnE,oBAAY,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC9C,oBAAY,SAAS,GAAG,GAAG,CAAC;AAC5B,oBAAY,cAAc,GAAG,MAAM,CAAC;AACpC,oBAAY,IAAI,GAAG;IACjB,UAAU,EAAE,KAAK,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,oBAAY,YAAY,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAEhE,oBAAY,KAAK,GACb;IACE,IAAI,EAAE,iCAAiC,CAAC;CACzC,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,2BAA2B,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,4BAA4B,CAAC;IACnC,SAAS,EAAE,SAAS,CAAC;CACtB,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,IAAI,CAAC;CACZ,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAGE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IAKE,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,qBAAqB,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,WAAW,CAAC;CACnB,GACD;IACE,IAAI,EAAE,YAAY,CAAC;CACpB,GACD;IAGE,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;CAClB,GACD;IAEE,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB,GACD;IAGE,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEN,oBAAY,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAClD,oBAAY,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,GAAG,IAAI,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,oBAAY,SAAS,GAAG;IACtB,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACvC,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,oBAAY,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC;AAE5C,oBAAY,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,KAAK,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC,CAAC;IACzD,kBAAkB,EAAE,KAAK,CACvB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CACtD,CAAC;CACH,CAAC;AAEF,oBAAY,KAAK,GAAG;IAClB,oBAAoB,EAAE,aAAa,CAAC;IACpC,oBAAoB,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IAIzB,2BAA2B,CAAC,EAAE,mBAAmB,CAAC;IAClD,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,iBAAiB,EAAE,aAAa,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAClC,2BAA2B,EAAE,OAAO,CAAC;CACtC,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CACzB,CAAC;AAEF,oBAAY,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC,SAAS,GAAG,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAE9E,oBAAY,SAAS,GAAG;IACtB,UAAU,EAAE,SAAS,CAAC;IACtB,MAAM,EAAE,SAAS,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Circus.js b/packages/common/node_modules/@jest/types/build/Circus.js deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/types/build/Circus.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/Config.d.ts b/packages/common/node_modules/@jest/types/build/Config.d.ts deleted file mode 100644 index 35ac465264..0000000000 --- a/packages/common/node_modules/@jest/types/build/Config.d.ts +++ /dev/null @@ -1,439 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { Arguments } from 'yargs'; -import { ReportOptions } from 'istanbul-reports'; -export declare type Path = string; -export declare type Glob = string; -export declare type HasteConfig = { - computeSha1?: boolean; - defaultPlatform?: string | null | undefined; - hasteImplModulePath?: string; - platforms?: Array; - providesModuleNodeModules: Array; - throwOnModuleCollision?: boolean; -}; -export declare type ReporterConfig = [string, Record]; -export declare type TransformerConfig = [string, Record]; -export declare type ConfigGlobals = Record; -export declare type DefaultOptions = { - automock: boolean; - bail: number; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - changedFilesWithAncestor: boolean; - clearMocks: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array | null | undefined; - coverageDirectory: string | null | undefined; - coveragePathIgnorePatterns: Array; - coverageReporters: Array; - coverageThreshold: { - global: { - [key: string]: number; - }; - } | null | undefined; - dependencyExtractor: string | null | undefined; - errorOnDeprecated: boolean; - expand: boolean; - filter: Path | null | undefined; - forceCoverageMatch: Array; - globals: ConfigGlobals; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - haste: HasteConfig; - maxWorkers: number | string; - maxConcurrency: number; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleNameMapper: { - [key: string]: string; - }; - modulePathIgnorePatterns: Array; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - preset: string | null | undefined; - prettierPath: string | null | undefined; - projects: Array | null | undefined; - resetMocks: boolean; - resetModules: boolean; - resolver: Path | null | undefined; - restoreMocks: boolean; - rootDir: Path | null | undefined; - roots: Array | null | undefined; - runner: string; - runTestsByPath: boolean; - setupFiles: Array; - setupFilesAfterEnv: Array; - skipFilter: boolean; - snapshotSerializers: Array; - testEnvironment: string; - testEnvironmentOptions: Record; - testFailureExitCode: string | number; - testLocationInResults: boolean; - testMatch: Array; - testPathIgnorePatterns: Array; - testRegex: Array; - testResultsProcessor: string | null | undefined; - testRunner: string | null | undefined; - testSequencer: string; - testURL: string; - timers: 'real' | 'fake'; - transform: { - [regex: string]: Path | TransformerConfig; - } | null | undefined; - transformIgnorePatterns: Array; - watchPathIgnorePatterns: Array; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchman: boolean; -}; -export declare type DisplayName = string | { - name: string; - color: DisplayNameColor; -}; -export declare type InitialOptions = { - automock?: boolean; - bail?: boolean | number; - browser?: boolean; - cache?: boolean; - cacheDirectory?: Path; - clearMocks?: boolean; - changedFilesWithAncestor?: boolean; - changedSince?: string; - collectCoverage?: boolean; - collectCoverageFrom?: Array; - collectCoverageOnlyFrom?: { - [key: string]: boolean; - }; - coverageDirectory?: string; - coveragePathIgnorePatterns?: Array; - coverageReporters?: Array; - coverageThreshold?: { - global: { - [key: string]: number; - }; - }; - dependencyExtractor?: string; - detectLeaks?: boolean; - detectOpenHandles?: boolean; - displayName?: DisplayName; - expand?: boolean; - extraGlobals?: Array; - filter?: Path; - findRelatedTests?: boolean; - forceCoverageMatch?: Array; - forceExit?: boolean; - json?: boolean; - globals?: ConfigGlobals; - globalSetup?: string | null | undefined; - globalTeardown?: string | null | undefined; - haste?: HasteConfig; - reporters?: Array; - logHeapUsage?: boolean; - lastCommit?: boolean; - listTests?: boolean; - mapCoverage?: boolean; - maxConcurrency?: number; - maxWorkers: number | string; - moduleDirectories?: Array; - moduleFileExtensions?: Array; - moduleLoader?: Path; - moduleNameMapper?: { - [key: string]: string; - }; - modulePathIgnorePatterns?: Array; - modulePaths?: Array; - name?: string; - noStackTrace?: boolean; - notify?: boolean; - notifyMode?: string; - onlyChanged?: boolean; - outputFile?: Path; - passWithNoTests?: boolean; - preprocessorIgnorePatterns?: Array; - preset?: string | null | undefined; - prettierPath?: string | null | undefined; - projects?: Array; - replname?: string | null | undefined; - resetMocks?: boolean; - resetModules?: boolean; - resolver?: Path | null | undefined; - restoreMocks?: boolean; - rootDir: Path; - roots?: Array; - runner?: string; - runTestsByPath?: boolean; - scriptPreprocessor?: string; - setupFiles?: Array; - setupTestFrameworkScriptFile?: Path; - setupFilesAfterEnv?: Array; - silent?: boolean; - skipFilter?: boolean; - skipNodeResolution?: boolean; - snapshotResolver?: Path; - snapshotSerializers?: Array; - errorOnDeprecated?: boolean; - testEnvironment?: string; - testEnvironmentOptions?: Record; - testFailureExitCode?: string | number; - testLocationInResults?: boolean; - testMatch?: Array; - testNamePattern?: string; - testPathDirs?: Array; - testPathIgnorePatterns?: Array; - testRegex?: string | Array; - testResultsProcessor?: string | null | undefined; - testRunner?: string; - testSequencer?: string; - testURL?: string; - testTimeout?: number; - timers?: 'real' | 'fake'; - transform?: { - [regex: string]: Path | TransformerConfig; - }; - transformIgnorePatterns?: Array; - watchPathIgnorePatterns?: Array; - unmockedModulePathPatterns?: Array; - updateSnapshot?: boolean; - useStderr?: boolean; - verbose?: boolean | null | undefined; - watch?: boolean; - watchAll?: boolean; - watchman?: boolean; - watchPlugins?: Array]>; -}; -export declare type SnapshotUpdateState = 'all' | 'new' | 'none'; -declare type NotifyMode = 'always' | 'failure' | 'success' | 'change' | 'success-change' | 'failure-change'; -/** - * Hard coding this until - * https://github.com/chalk/chalk/pull/336 - * gets merged - */ -declare type DisplayNameColor = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray' | 'grey' | 'blackBright' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright' | 'bgBlack' | 'bgRed' | 'bgGreen' | 'bgYellow' | 'bgBlue' | 'bgMagenta' | 'bgCyan' | 'bgWhite' | 'bgBlackBright' | 'bgRedBright' | 'bgGreenBright' | 'bgYellowBright' | 'bgBlueBright' | 'bgMagentaBright' | 'bgCyanBright' | 'bgWhiteBright'; -declare type CoverageThreshold = { - [path: string]: { - [key: string]: number; - }; - global: { - [key: string]: number; - }; -}; -export declare type GlobalConfig = { - bail: number; - changedSince: string; - changedFilesWithAncestor: boolean; - collectCoverage: boolean; - collectCoverageFrom: Array; - collectCoverageOnlyFrom: { - [key: string]: boolean; - } | null | undefined; - coverageDirectory: string; - coveragePathIgnorePatterns?: Array; - coverageReporters: Array; - coverageThreshold: CoverageThreshold; - detectLeaks: boolean; - detectOpenHandles: boolean; - enabledTestsMap: { - [key: string]: { - [key: string]: boolean; - }; - } | null | undefined; - expand: boolean; - extraGlobals: Array; - filter: Path | null | undefined; - findRelatedTests: boolean; - forceExit: boolean; - json: boolean; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - lastCommit: boolean; - logHeapUsage: boolean; - listTests: boolean; - maxConcurrency: number; - maxWorkers: number; - noStackTrace: boolean; - nonFlagArgs: Array; - noSCM: boolean | null | undefined; - notify: boolean; - notifyMode: NotifyMode; - outputFile: Path | null | undefined; - onlyChanged: boolean; - onlyFailures: boolean; - passWithNoTests: boolean; - projects: Array; - replname: string | null | undefined; - reporters: Array; - runTestsByPath: boolean; - rootDir: Path; - silent: boolean; - skipFilter: boolean; - errorOnDeprecated: boolean; - testFailureExitCode: number; - testNamePattern: string; - testPathPattern: string; - testResultsProcessor: string | null | undefined; - testSequencer: string; - testTimeout: number; - updateSnapshot: SnapshotUpdateState; - useStderr: boolean; - verbose: boolean | null | undefined; - watch: boolean; - watchAll: boolean; - watchman: boolean; - watchPlugins: Array<{ - path: string; - config: Record; - }> | null | undefined; -}; -export declare type ProjectConfig = { - automock: boolean; - browser: boolean; - cache: boolean; - cacheDirectory: Path; - clearMocks: boolean; - coveragePathIgnorePatterns: Array; - cwd: Path; - dependencyExtractor?: string; - detectLeaks: boolean; - detectOpenHandles: boolean; - displayName?: DisplayName; - errorOnDeprecated: boolean; - extraGlobals: Array; - filter: Path | null | undefined; - forceCoverageMatch: Array; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - globals: ConfigGlobals; - haste: HasteConfig; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleLoader: Path; - moduleNameMapper: Array<[string, string]>; - modulePathIgnorePatterns: Array; - modulePaths: Array; - name: string; - prettierPath: string; - resetMocks: boolean; - resetModules: boolean; - resolver: Path | null | undefined; - restoreMocks: boolean; - rootDir: Path; - roots: Array; - runner: string; - setupFiles: Array; - setupFilesAfterEnv: Array; - skipFilter: boolean; - skipNodeResolution: boolean; - snapshotResolver: Path | null | undefined; - snapshotSerializers: Array; - testEnvironment: string; - testEnvironmentOptions: Record; - testMatch: Array; - testLocationInResults: boolean; - testPathIgnorePatterns: Array; - testRegex: Array; - testRunner: string; - testURL: string; - timers: 'real' | 'fake'; - transform: Array<[string, Path, Record]>; - transformIgnorePatterns: Array; - watchPathIgnorePatterns: Array; - unmockedModulePathPatterns: Array | null | undefined; -}; -export declare type Argv = Arguments; - color: boolean; - colors: boolean; - config: string; - coverage: boolean; - coverageDirectory: string; - coveragePathIgnorePatterns: Array; - coverageReporters: Array; - coverageThreshold: string; - debug: boolean; - env: string; - expand: boolean; - findRelatedTests: boolean; - forceExit: boolean; - globals: string; - globalSetup: string | null | undefined; - globalTeardown: string | null | undefined; - haste: string; - init: boolean; - json: boolean; - lastCommit: boolean; - logHeapUsage: boolean; - maxWorkers: number | string; - moduleDirectories: Array; - moduleFileExtensions: Array; - moduleNameMapper: string; - modulePathIgnorePatterns: Array; - modulePaths: Array; - noStackTrace: boolean; - notify: boolean; - notifyMode: string; - onlyChanged: boolean; - outputFile: string; - preset: string | null | undefined; - projects: Array; - prettierPath: string | null | undefined; - resetMocks: boolean; - resetModules: boolean; - resolver: string | null | undefined; - restoreMocks: boolean; - rootDir: string; - roots: Array; - runInBand: boolean; - setupFiles: Array; - setupFilesAfterEnv: Array; - showConfig: boolean; - silent: boolean; - snapshotSerializers: Array; - testEnvironment: string; - testFailureExitCode: string | null | undefined; - testMatch: Array; - testNamePattern: string; - testPathIgnorePatterns: Array; - testPathPattern: Array; - testRegex: string | Array; - testResultsProcessor: string | null | undefined; - testRunner: string; - testSequencer: string; - testURL: string; - testTimeout: number | null | undefined; - timers: string; - transform: string; - transformIgnorePatterns: Array; - unmockedModulePathPatterns: Array | null | undefined; - updateSnapshot: boolean; - useStderr: boolean; - verbose: boolean | null | undefined; - version: boolean; - watch: boolean; - watchAll: boolean; - watchman: boolean; - watchPathIgnorePatterns: Array; -}>>; -export {}; -//# sourceMappingURL=Config.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Config.d.ts.map b/packages/common/node_modules/@jest/types/build/Config.d.ts.map deleted file mode 100644 index 6b8a1aa452..0000000000 --- a/packages/common/node_modules/@jest/types/build/Config.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE/C,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B,oBAAY,IAAI,GAAG,MAAM,CAAC;AAE1B,oBAAY,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,oBAAY,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAC/D,oBAAY,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,oBAAY,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEhD,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACtD,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,EACb;QACE,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,GACD,IAAI,GACJ,SAAS,CAAC;IACd,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,WAAW,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE;QAChB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG,aAAa,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3D,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAAC;IACrC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EACL;QACE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAC;KAC3C,GACD,IAAI,GACJ,SAAS,CAAC;IACd,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oBAAY,WAAW,GACnB,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEN,oBAAY,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,uBAAuB,CAAC,EAAE;QACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE;QAClB,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;SACvB,CAAC;KACH,CAAC;IACF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,gBAAgB,CAAC,EAAE;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,wBAAwB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0BAA0B,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,4BAA4B,CAAC,EAAE,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,mBAAmB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7C,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,sBAAsB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE;QACV,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,iBAAiB,CAAC;KAC3C,CAAC;IACF,uBAAuB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,uBAAuB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF,oBAAY,mBAAmB,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzD,aAAK,UAAU,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,gBAAgB,GAChB,gBAAgB,CAAC;AAErB;;;;GAIG;AACH,aAAK,gBAAgB,GACjB,OAAO,GACP,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,aAAa,GACb,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,aAAa,GACb,SAAS,GACT,OAAO,GACP,SAAS,GACT,UAAU,GACV,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,SAAS,GACT,eAAe,GACf,aAAa,GACb,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,eAAe,CAAC;AAEpB,aAAK,iBAAiB,GAAG;IACvB,CAAC,IAAI,EAAE,MAAM,GAAG;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,OAAO,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,uBAAuB,EACnB;QACE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,GACD,IAAI,GACJ,SAAS,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,iBAAiB,EAAE,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;IAC9C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EACX;QACE,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;KACH,GACD,IAAI,GACJ,SAAS,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,KAAK,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC,CAAC;IAC1C,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,IAAI,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,mBAAmB,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EACR,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC7B,CAAC,GACF,IAAI,GACJ,SAAS,CAAC;CACf,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,GAAG,EAAE,IAAI,CAAC;IACV,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,YAAY,EAAE,KAAK,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,OAAO,EAAE,aAAa,CAAC;IACvB,KAAK,EAAE,WAAW,CAAC;IACnB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,IAAI,CAAC;IACnB,gBAAgB,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1D,uBAAuB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACrC,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAC9D,CAAC;AAEF,oBAAY,IAAI,GAAG,SAAS,CAC1B,OAAO,CAAC;IACN,GAAG,EAAE,OAAO,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,0BAA0B,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC,CACH,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Config.js b/packages/common/node_modules/@jest/types/build/Config.js deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/types/build/Config.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/Global.d.ts b/packages/common/node_modules/@jest/types/build/Global.d.ts deleted file mode 100644 index a9954e8114..0000000000 --- a/packages/common/node_modules/@jest/types/build/Global.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -/// -import { CoverageMapData } from 'istanbul-lib-coverage'; -export declare type DoneFn = (reason?: string | Error) => void; -export declare type TestName = string; -export declare type TestFn = (done?: DoneFn) => Promise | void | undefined; -export declare type BlockFn = () => void; -export declare type BlockName = string; -export declare type Col = unknown; -export declare type Row = Array; -export declare type Table = Array; -export declare type ArrayTable = Table | Row; -export declare type TemplateTable = TemplateStringsArray; -export declare type TemplateData = Array; -export declare type EachTable = ArrayTable | TemplateTable; -export declare type EachTestFn = (...args: Array) => Promise | void | undefined; -declare type Jasmine = { - _DEFAULT_TIMEOUT_INTERVAL?: number; - addMatchers: Function; -}; -declare type Each = (table: EachTable, ...taggedTemplateData: Array) => (title: string, test: EachTestFn, timeout?: number) => void; -export interface ItBase { - (testName: TestName, fn: TestFn, timeout?: number): void; - each: Each; -} -export interface It extends ItBase { - only: ItBase; - skip: ItBase; - todo: (testName: TestName, ...rest: Array) => void; -} -export interface ItConcurrentBase { - (testName: string, testFn: () => Promise, timeout?: number): void; -} -export interface ItConcurrentExtended extends ItConcurrentBase { - only: ItConcurrentBase; - skip: ItConcurrentBase; -} -export interface ItConcurrent extends It { - concurrent: ItConcurrentExtended; -} -export interface DescribeBase { - (blockName: BlockName, blockFn: BlockFn): void; - each: Each; -} -export interface Describe extends DescribeBase { - only: DescribeBase; - skip: DescribeBase; -} -export interface Global extends NodeJS.Global { - it: ItConcurrent; - test: ItConcurrent; - fit: ItBase & { - concurrent?: ItConcurrentBase; - }; - xit: ItBase; - xtest: ItBase; - describe: Describe; - xdescribe: DescribeBase; - fdescribe: DescribeBase; - __coverage__: CoverageMapData; - jasmine: Jasmine; - fail: () => void; - pending: () => void; - spyOn: () => void; - spyOnProperty: () => void; - [extras: string]: any; -} -export {}; -//# sourceMappingURL=Global.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Global.d.ts.map b/packages/common/node_modules/@jest/types/build/Global.d.ts.map deleted file mode 100644 index f190be72fe..0000000000 --- a/packages/common/node_modules/@jest/types/build/Global.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Global.d.ts","sourceRoot":"","sources":["../src/Global.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAEtD,oBAAY,MAAM,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;AACvD,oBAAY,QAAQ,GAAG,MAAM,CAAC;AAC9B,oBAAY,MAAM,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AACxE,oBAAY,OAAO,GAAG,MAAM,IAAI,CAAC;AACjC,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B,oBAAY,GAAG,GAAG,OAAO,CAAC;AAC1B,oBAAY,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7B,oBAAY,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,oBAAY,UAAU,GAAG,KAAK,GAAG,GAAG,CAAC;AACrC,oBAAY,aAAa,GAAG,oBAAoB,CAAC;AACjD,oBAAY,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAC1C,oBAAY,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AACnD,oBAAY,UAAU,GAAG,CACvB,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAChB,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;AAGrC,aAAK,OAAO,GAAG;IAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,QAAQ,CAAA;CAAC,CAAC;AAE3E,aAAK,IAAI,GAAG,CACV,KAAK,EAAE,SAAS,EAChB,GAAG,kBAAkB,EAAE,KAAK,CAAC,OAAO,CAAC,KAClC,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AAEjE,MAAM,WAAW,MAAM;IACrB,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzD,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,EAAG,SAAQ,MAAM;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;CACzD;AAED,MAAM,WAAW,gBAAgB;IAC/B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxE;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,IAAI,EAAE,gBAAgB,CAAC;IACvB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,YAAa,SAAQ,EAAE;IACtC,UAAU,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/C,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,QAAS,SAAQ,YAAY;IAC5C,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAGD,MAAM,WAAW,MAAO,SAAQ,MAAM,CAAC,MAAM;IAC3C,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE,YAAY,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAC,CAAC;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC;CACvB"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/Global.js b/packages/common/node_modules/@jest/types/build/Global.js deleted file mode 100644 index ad9a93a7c1..0000000000 --- a/packages/common/node_modules/@jest/types/build/Global.js +++ /dev/null @@ -1 +0,0 @@ -'use strict'; diff --git a/packages/common/node_modules/@jest/types/build/index.d.ts b/packages/common/node_modules/@jest/types/build/index.d.ts deleted file mode 100644 index 4d07f84466..0000000000 --- a/packages/common/node_modules/@jest/types/build/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import * as Circus from './Circus'; -import * as Config from './Config'; -import * as Global from './Global'; -export { Circus, Config, Global }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/index.d.ts.map b/packages/common/node_modules/@jest/types/build/index.d.ts.map deleted file mode 100644 index 3b69eaf53d..0000000000 --- a/packages/common/node_modules/@jest/types/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/@jest/types/build/index.js b/packages/common/node_modules/@jest/types/build/index.js deleted file mode 100644 index c638c29000..0000000000 --- a/packages/common/node_modules/@jest/types/build/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.Global = exports.Config = exports.Circus = void 0; - -var Circus = _interopRequireWildcard(require('./Circus')); - -exports.Circus = Circus; - -var Config = _interopRequireWildcard(require('./Config')); - -exports.Config = Config; - -var Global = _interopRequireWildcard(require('./Global')); - -exports.Global = Global; - -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; - } -} diff --git a/packages/common/node_modules/@jest/types/package.json b/packages/common/node_modules/@jest/types/package.json deleted file mode 100644 index defa60c76d..0000000000 --- a/packages/common/node_modules/@jest/types/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@jest/types", - "version": "24.9.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/jest-types" - }, - "engines": { - "node": ">= 6" - }, - "license": "MIT", - "main": "build/index.js", - "types": "build/index.d.ts", - "dependencies": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1" -} diff --git a/packages/common/node_modules/@types/yargs/LICENSE b/packages/common/node_modules/@types/yargs/LICENSE deleted file mode 100644 index 4b1ad51b2f..0000000000 --- a/packages/common/node_modules/@types/yargs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - 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 diff --git a/packages/common/node_modules/@types/yargs/README.md b/packages/common/node_modules/@types/yargs/README.md deleted file mode 100644 index cde1b0122f..0000000000 --- a/packages/common/node_modules/@types/yargs/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/yargs` - -# Summary -This package contains type definitions for yargs (https://github.com/chevex/yargs). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs - -Additional Details - * Last updated: Wed, 31 Jul 2019 17:12:04 GMT - * Dependencies: @types/yargs-parser - * Global values: none - -# Credits -These definitions were written by Martin Poelstra , Mizunashi Mana , Jeffery Grajkowski , Jeff Kenney , Jimi (Dimitris) Charalampidis , Steffen Viken Valvåg , and Emily Marigold Klassen . diff --git a/packages/common/node_modules/@types/yargs/index.d.ts b/packages/common/node_modules/@types/yargs/index.d.ts deleted file mode 100644 index 8a696951e9..0000000000 --- a/packages/common/node_modules/@types/yargs/index.d.ts +++ /dev/null @@ -1,761 +0,0 @@ -// Type definitions for yargs 13.0 -// Project: https://github.com/chevex/yargs, https://yargs.js.org -// Definitions by: Martin Poelstra -// Mizunashi Mana -// Jeffery Grajkowski -// Jeff Kenney -// Jimi (Dimitris) Charalampidis -// Steffen Viken Valvåg -// Emily Marigold Klassen -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 - -// The following TSLint rules have been disabled: -// unified-signatures: Because there is useful information in the argument names of the overloaded signatures - -// Convention: -// Use 'union types' when: -// - parameter types have similar signature type (i.e. 'string | ReadonlyArray') -// - parameter names have the same semantic meaning (i.e. ['command', 'commands'] , ['key', 'keys']) -// An example for not using 'union types' is the declaration of 'env' where `prefix` and `enable` parameters -// have different semantics. On the other hand, in the declaration of 'usage', a `command: string` parameter -// has the same semantic meaning with declaring an overload method by using `commands: ReadonlyArray`, -// thus it's preferred to use `command: string | ReadonlyArray` -// Use parameterless declaration instead of declaring all parameters optional, -// when all parameters are optional and more than one - -import { DetailedArguments, Configuration } from 'yargs-parser'; - -declare namespace yargs { - // The type parameter T is the expected shape of the parsed options. - // Arguments is those options plus _ and $0, and an indexer falling - // back to unknown for unknown options. - // - // For the return type / argv property, we create a mapped type over - // Arguments to simplify the inferred type signature in client code. - interface Argv { - (): { [key in keyof Arguments]: Arguments[key] }; - (args: ReadonlyArray, cwd?: string): Argv; - - /** - * Set key names as equivalent such that updates to a key will propagate to aliases and vice-versa. - * - * Optionally `.alias()` can take an object that maps keys to aliases. - * Each key of this object should be the canonical version of the option, and each value should be a string or an array of strings. - */ - // Aliases for previously declared options can inherit the types of those options. - alias(shortName: K1, longName: K2 | ReadonlyArray): Argv; - alias(shortName: K2, longName: K1 | ReadonlyArray): Argv; - alias(shortName: string | ReadonlyArray, longName: string | ReadonlyArray): Argv; - alias(aliases: { [shortName: string]: string | ReadonlyArray }): Argv; - - /** - * Get the arguments as a plain old object. - * - * Arguments without a corresponding flag show up in the `argv._` array. - * - * The script name or node command is available at `argv.$0` similarly to how `$0` works in bash or perl. - * - * If `yargs` is executed in an environment that embeds node and there's no script name (e.g. Electron or nw.js), - * it will ignore the first parameter since it expects it to be the script name. In order to override - * this behavior, use `.parse(process.argv.slice(1))` instead of .argv and the first parameter won't be ignored. - */ - argv: { [key in keyof Arguments]: Arguments[key] }; - - /** - * Tell the parser to interpret `key` as an array. - * If `.array('foo')` is set, `--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`. - * Also, if you use the option multiple times all the values will be flattened in one array so `--foo foo --foo bar` will be parsed as `['foo', 'bar']` - * - * When the option is used with a positional, use `--` to tell `yargs` to stop adding values to the array. - */ - array(key: K | ReadonlyArray): Argv & { [key in K]: ToArray }>; - array(key: K | ReadonlyArray): Argv | undefined }>; - - /** - * Interpret `key` as a boolean. If a non-flag option follows `key` in `process.argv`, that string won't get set as the value of `key`. - * - * `key` will default to `false`, unless a `default(key, undefined)` is explicitly set. - * - * If `key` is an array, interpret all the elements as booleans. - */ - boolean(key: K | ReadonlyArray): Argv & { [key in K]: boolean | undefined }>; - boolean(key: K | ReadonlyArray): Argv; - - /** - * Check that certain conditions are met in the provided arguments. - * @param func Called with two arguments, the parsed `argv` hash and an array of options and their aliases. - * If `func` throws or returns a non-truthy value, show the thrown error, usage information, and exit. - * @param global Indicates whether `check()` should be enabled both at the top-level and for each sub-command. - */ - check(func: (argv: Arguments, aliases: { [alias: string]: string }) => any, global?: boolean): Argv; - - /** - * Limit valid values for key to a predefined set of choices, given as an array or as an individual value. - * If this method is called multiple times, all enumerated values will be merged together. - * Choices are generally strings or numbers, and value matching is case-sensitive. - * - * Optionally `.choices()` can take an object that maps multiple keys to their choices. - * - * Choices can also be specified as choices in the object given to `option()`. - */ - choices>(key: K, values: C): Argv & { [key in K]: C[number] | undefined }>; - choices>(key: K, values: C): Argv; - choices }>(choices: C): Argv & { [key in keyof C]: C[key][number] | undefined }>; - - /** - * Provide a synchronous function to coerce or transform the value(s) given on the command line for `key`. - * - * The coercion function should accept one argument, representing the parsed value from the command line, and should return a new value or throw an error. - * The returned value will be used as the value for `key` (or one of its aliases) in `argv`. - * - * If the function throws, the error will be treated as a validation failure, delegating to either a custom `.fail()` handler or printing the error message in the console. - * - * Coercion will be applied to a value after all other modifications, such as `.normalize()`. - * - * Optionally `.coerce()` can take an object that maps several keys to their respective coercion function. - * - * You can also map the same function to several keys at one time. Just pass an array of keys as the first argument to `.coerce()`. - * - * If you are using dot-notion or arrays, .e.g., `user.email` and `user.password`, coercion will be applied to the final object that has been parsed - */ - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv & { [key in K]: V | undefined }>; - coerce(key: K | ReadonlyArray, func: (arg: any) => V): Argv; - coerce any }>(opts: O): Argv & { [key in keyof O]: ReturnType | undefined }>; - - /** - * Define the commands exposed by your application. - * @param command Should be a string representing the command or an array of strings representing the command and its aliases. - * @param description Use to provide a description for each command your application accepts (the values stored in `argv._`). - * Set `description` to false to create a hidden command. Hidden commands don't show up in the help output and aren't available for completion. - * @param [builder] Object to give hints about the options that your command accepts. - * Can also be a function. This function is executed with a yargs instance, and can be used to provide advanced command specific help. - * @param [handler] Function, which will be executed with the parsed `argv` object. - */ - command(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - command(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; - command(command: string | ReadonlyArray, description: string, module: CommandModule): Argv; - command(command: string | ReadonlyArray, showInHelp: false, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - command(command: string | ReadonlyArray, showInHelp: false, builder?: O, handler?: (args: Arguments>) => void): Argv; - command(command: string | ReadonlyArray, showInHelp: false, module: CommandModule): Argv; - command(module: CommandModule): Argv; - - // Advanced API - /** Apply command modules from a directory relative to the module calling this method. */ - commandDir(dir: string, opts?: RequireDirectoryOptions): Argv; - - /** - * Enable bash/zsh-completion shortcuts for commands and options. - * - * If invoked without parameters, `.completion()` will make completion the command to output the completion script. - * - * @param [cmd] When present in `argv._`, will result in the `.bashrc` or `.zshrc` completion script being outputted. - * To enable bash/zsh completions, concat the generated script to your `.bashrc` or `.bash_profile` (or `.zshrc` for zsh). - * @param [description] Provide a description in your usage instructions for the command that generates the completion scripts. - * @param [func] Rather than relying on yargs' default completion functionality, which shiver me timbers is pretty awesome, you can provide your own completion method. - */ - completion(): Argv; - completion(cmd: string, func?: AsyncCompletionFunction): Argv; - completion(cmd: string, func?: SyncCompletionFunction): Argv; - completion(cmd: string, func?: PromiseCompletionFunction): Argv; - completion(cmd: string, description?: string | false, func?: AsyncCompletionFunction): Argv; - completion(cmd: string, description?: string | false, func?: SyncCompletionFunction): Argv; - completion(cmd: string, description?: string | false, func?: PromiseCompletionFunction): Argv; - - /** - * Tells the parser that if the option specified by `key` is passed in, it should be interpreted as a path to a JSON config file. - * The file is loaded and parsed, and its properties are set as arguments. - * Because the file is loaded using Node's require(), the filename MUST end in `.json` to be interpreted correctly. - * - * If invoked without parameters, `.config()` will make --config the option to pass the JSON config file. - * - * @param [description] Provided to customize the config (`key`) option in the usage string. - * @param [explicitConfigurationObject] An explicit configuration `object` - */ - config(): Argv; - config(key: string | ReadonlyArray, description?: string, parseFn?: (configPath: string) => object): Argv; - config(key: string | ReadonlyArray, parseFn: (configPath: string) => object): Argv; - config(explicitConfigurationObject: object): Argv; - - /** - * Given the key `x` is set, the key `y` must not be set. `y` can either be a single string or an array of argument names that `x` conflicts with. - * - * Optionally `.conflicts()` can accept an object specifying multiple conflicting keys. - */ - conflicts(key: string, value: string | ReadonlyArray): Argv; - conflicts(conflicts: { [key: string]: string | ReadonlyArray }): Argv; - - /** - * Interpret `key` as a boolean flag, but set its parsed value to the number of flag occurrences rather than `true` or `false`. Default value is thus `0`. - */ - count(key: K | ReadonlyArray): Argv & { [key in K]: number }>; - count(key: K | ReadonlyArray): Argv; - - /** - * Set `argv[key]` to `value` if no option was specified in `process.argv`. - * - * Optionally `.default()` can take an object that maps keys to default values. - * - * The default value can be a `function` which returns a value. The name of the function will be used in the usage string. - * - * Optionally, `description` can also be provided and will take precedence over displaying the value in the usage instructions. - */ - default(key: K, value: V, description?: string): Argv & { [key in K]: V }>; - default(key: K, value: V, description?: string): Argv; - default(defaults: D, description?: string): Argv & D>; - - /** - * @deprecated since version 6.6.0 - * Use '.demandCommand()' or '.demandOption()' instead - */ - demand(key: K | ReadonlyArray, msg?: string | true): Argv>; - demand(key: K | ReadonlyArray, msg?: string | true): Argv; - demand(key: string | ReadonlyArray, required?: boolean): Argv; - demand(positionals: number, msg: string): Argv; - demand(positionals: number, required?: boolean): Argv; - demand(positionals: number, max: number, msg?: string): Argv; - - /** - * @param key If is a string, show the usage information and exit if key wasn't specified in `process.argv`. - * If is an array, demand each element. - * @param msg If string is given, it will be printed when the argument is missing, instead of the standard error message. - * @param demand Controls whether the option is demanded; this is useful when using .options() to specify command line parameters. - */ - demandOption(key: K | ReadonlyArray, msg?: string | true): Argv>; - demandOption(key: K | ReadonlyArray, msg?: string | true): Argv; - demandOption(key: string | ReadonlyArray, demand?: boolean): Argv; - - /** - * Demand in context of commands. - * You can demand a minimum and a maximum number a user can have within your program, as well as provide corresponding error messages if either of the demands is not met. - */ - demandCommand(): Argv; - demandCommand(min: number, minMsg?: string): Argv; - demandCommand(min: number, max?: number, minMsg?: string, maxMsg?: string): Argv; - - /** - * Describe a `key` for the generated usage information. - * - * Optionally `.describe()` can take an object that maps keys to descriptions. - */ - describe(key: string | ReadonlyArray, description: string): Argv; - describe(descriptions: { [key: string]: string }): Argv; - - /** Should yargs attempt to detect the os' locale? Defaults to `true`. */ - detectLocale(detect: boolean): Argv; - - /** - * Tell yargs to parse environment variables matching the given prefix and apply them to argv as though they were command line arguments. - * - * Use the "__" separator in the environment variable to indicate nested options. (e.g. prefix_nested__foo => nested.foo) - * - * If this method is called with no argument or with an empty string or with true, then all env vars will be applied to argv. - * - * Program arguments are defined in this order of precedence: - * 1. Command line args - * 2. Env vars - * 3. Config file/objects - * 4. Configured defaults - * - * Env var parsing is disabled by default, but you can also explicitly disable it by calling `.env(false)`, e.g. if you need to undo previous configuration. - */ - env(): Argv; - env(prefix: string): Argv; - env(enable: boolean): Argv; - - /** A message to print at the end of the usage instructions */ - epilog(msg: string): Argv; - /** A message to print at the end of the usage instructions */ - epilogue(msg: string): Argv; - - /** - * Give some example invocations of your program. - * Inside `cmd`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl. - * Examples will be printed out as part of the help message. - */ - example(command: string, description: string): Argv; - - /** Manually indicate that the program should exit, and provide context about why we wanted to exit. Follows the behavior set by `.exitProcess().` */ - exit(code: number, err: Error): void; - - /** - * By default, yargs exits the process when the user passes a help flag, the user uses the `.version` functionality, validation fails, or the command handler fails. - * Calling `.exitProcess(false)` disables this behavior, enabling further actions after yargs have been validated. - */ - exitProcess(enabled: boolean): Argv; - - /** - * Method to execute when a failure occurs, rather than printing the failure message. - * @param func Is called with the failure message that would have been printed, the Error instance originally thrown and yargs state when the failure occurred. - */ - fail(func: (msg: string, err: Error) => any): Argv; - - /** - * Allows to programmatically get completion choices for any line. - * @param args An array of the words in the command line to complete. - * @param done The callback to be called with the resulting completions. - */ - getCompletion(args: ReadonlyArray, done: (completions: ReadonlyArray) => void): Argv; - - /** - * Indicate that an option (or group of options) should not be reset when a command is executed - * - * Options default to being global. - */ - global(key: string | ReadonlyArray): Argv; - - /** Given a key, or an array of keys, places options under an alternative heading when displaying usage instructions */ - group(key: string | ReadonlyArray, groupName: string): Argv; - - /** Hides a key from the generated usage information. Unless a `--show-hidden` option is also passed with `--help` (see `showHidden()`). */ - hide(key: string): Argv; - - /** - * Configure an (e.g. `--help`) and implicit command that displays the usage string and exits the process. - * By default yargs enables help on the `--help` option. - * - * Note that any multi-char aliases (e.g. `help`) used for the help option will also be used for the implicit command. - * If there are no multi-char aliases (e.g. `h`), then all single-char aliases will be used for the command. - * - * If invoked without parameters, `.help()` will use `--help` as the option and help as the implicit command to trigger help output. - * - * @param [description] Customizes the description of the help option in the usage string. - * @param [enableExplicit] If `false` is provided, it will disable --help. - */ - help(): Argv; - help(enableExplicit: boolean): Argv; - help(option: string, enableExplicit: boolean): Argv; - help(option: string, description?: string, enableExplicit?: boolean): Argv; - - /** - * Given the key `x` is set, it is required that the key `y` is set. - * y` can either be the name of an argument to imply, a number indicating the position of an argument or an array of multiple implications to associate with `x`. - * - * Optionally `.implies()` can accept an object specifying multiple implications. - */ - implies(key: string, value: string | ReadonlyArray): Argv; - implies(implies: { [key: string]: string | ReadonlyArray }): Argv; - - /** - * Return the locale that yargs is currently using. - * - * By default, yargs will auto-detect the operating system's locale so that yargs-generated help content will display in the user's language. - */ - locale(): string; - /** - * Override the auto-detected locale from the user's operating system with a static locale. - * Note that the OS locale can be modified by setting/exporting the `LC_ALL` environment variable. - */ - locale(loc: string): Argv; - - /** - * Define global middleware functions to be called first, in list order, for all cli command. - * @param callbacks Can be a function or a list of functions. Each callback gets passed a reference to argv. - * @param [applyBeforeValidation] Set to `true` to apply middleware before validation. This will execute the middleware prior to validation checks, but after parsing. - */ - middleware(callbacks: MiddlewareFunction | ReadonlyArray>, applyBeforeValidation?: boolean): Argv; - - /** - * The number of arguments that should be consumed after a key. This can be a useful hint to prevent parsing ambiguity. - * - * Optionally `.nargs()` can take an object of `key`/`narg` pairs. - */ - nargs(key: string, count: number): Argv; - nargs(nargs: { [key: string]: number }): Argv; - - /** The key provided represents a path and should have `path.normalize()` applied. */ - normalize(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; - normalize(key: K | ReadonlyArray): Argv; - - /** - * Tell the parser to always interpret key as a number. - * - * If `key` is an array, all elements will be parsed as numbers. - * - * If the option is given on the command line without a value, `argv` will be populated with `undefined`. - * - * If the value given on the command line cannot be parsed as a number, `argv` will be populated with `NaN`. - * - * Note that decimals, hexadecimals, and scientific notation are all accepted. - */ - number(key: K | ReadonlyArray): Argv & { [key in K]: ToNumber }>; - number(key: K | ReadonlyArray): Argv; - - /** - * This method can be used to make yargs aware of options that could exist. - * You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option. - */ - option(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; - option(key: K, options: O): Argv }>; - option(options: O): Argv & InferredOptionTypes>; - - /** - * This method can be used to make yargs aware of options that could exist. - * You can also pass an opt object which can hold further customization, like `.alias()`, `.demandOption()` etc. for that option. - */ - options(key: K, options: O): Argv & { [key in K]: InferredOptionType }>; - options(key: K, options: O): Argv }>; - options(options: O): Argv & InferredOptionTypes>; - - /** - * Parse `args` instead of `process.argv`. Returns the `argv` object. `args` may either be a pre-processed argv array, or a raw argument string. - * - * Note: Providing a callback to parse() disables the `exitProcess` setting until after the callback is invoked. - * @param [context] Provides a useful mechanism for passing state information to commands - */ - parse(): { [key in keyof Arguments]: Arguments[key] }; - parse(arg: string | ReadonlyArray, context?: object, parseCallback?: ParseCallback): { [key in keyof Arguments]: Arguments[key] }; - - /** - * If the arguments have not been parsed, this property is `false`. - * - * If the arguments have been parsed, this contain detailed parsed arguments. - */ - parsed: DetailedArguments | false; - - /** Allows to configure advanced yargs features. */ - parserConfiguration(configuration: Partial): Argv; - - /** - * Similar to `config()`, indicates that yargs should interpret the object from the specified key in package.json as a configuration object. - * @param [cwd] If provided, the package.json will be read from this location - */ - pkgConf(key: string | ReadonlyArray, cwd?: string): Argv; - - /** - * Allows you to configure a command's positional arguments with an API similar to `.option()`. - * `.positional()` should be called in a command's builder function, and is not available on the top-level yargs instance. If so, it will throw an error. - */ - positional(key: K, opt: O): Argv & { [key in K]: InferredOptionType }>; - positional(key: K, opt: O): Argv }>; - - /** Should yargs provide suggestions regarding similar commands if no matching command is found? */ - recommendCommands(): Argv; - - /** - * @deprecated since version 6.6.0 - * Use '.demandCommand()' or '.demandOption()' instead - */ - require(key: K | ReadonlyArray, msg?: string | true): Argv>; - require(key: string, msg: string): Argv; - require(key: string, required: boolean): Argv; - require(keys: ReadonlyArray, msg: string): Argv; - require(keys: ReadonlyArray, required: boolean): Argv; - require(positionals: number, required: boolean): Argv; - require(positionals: number, msg: string): Argv; - - /** - * @deprecated since version 6.6.0 - * Use '.demandCommand()' or '.demandOption()' instead - */ - required(key: K | ReadonlyArray, msg?: string | true): Argv>; - required(key: string, msg: string): Argv; - required(key: string, required: boolean): Argv; - required(keys: ReadonlyArray, msg: string): Argv; - required(keys: ReadonlyArray, required: boolean): Argv; - required(positionals: number, required: boolean): Argv; - required(positionals: number, msg: string): Argv; - - requiresArg(key: string | ReadonlyArray): Argv; - - /** - * @deprecated since version 6.6.0 - * Use '.global()' instead - */ - reset(): Argv; - - /** Set the name of your script ($0). Default is the base filename executed by node (`process.argv[1]`) */ - scriptName($0: string): Argv; - - /** - * Generate a bash completion script. - * Users of your application can install this script in their `.bashrc`, and yargs will provide completion shortcuts for commands and options. - */ - showCompletionScript(): Argv; - - /** - * Configure the `--show-hidden` option that displays the hidden keys (see `hide()`). - * @param option If `boolean`, it enables/disables this option altogether. i.e. hidden keys will be permanently hidden if first argument is `false`. - * If `string` it changes the key name ("--show-hidden"). - * @param description Changes the default description ("Show hidden options") - */ - showHidden(option?: string | boolean): Argv; - showHidden(option: string, description?: string): Argv; - - /** - * Print the usage data using the console function consoleLevel for printing. - * @param [consoleLevel='error'] - */ - showHelp(consoleLevel?: string): Argv; - - /** - * By default, yargs outputs a usage string if any error is detected. - * Use the `.showHelpOnFail()` method to customize this behavior. - * @param enable If `false`, the usage string is not output. - * @param [message] Message that is output after the error message. - */ - showHelpOnFail(enable: boolean, message?: string): Argv; - - /** Specifies either a single option key (string), or an array of options. If any of the options is present, yargs validation is skipped. */ - skipValidation(key: string | ReadonlyArray): Argv; - - /** - * Any command-line argument given that is not demanded, or does not have a corresponding description, will be reported as an error. - * - * Unrecognized commands will also be reported as errors. - */ - strict(): Argv; - strict(enabled: boolean): Argv; - - /** - * Tell the parser logic not to interpret `key` as a number or boolean. This can be useful if you need to preserve leading zeros in an input. - * - * If `key` is an array, interpret all the elements as strings. - * - * `.string('_')` will result in non-hyphenated arguments being interpreted as strings, regardless of whether they resemble numbers. - */ - string(key: K | ReadonlyArray): Argv & { [key in K]: ToString }>; - string(key: K | ReadonlyArray): Argv; - - // Intended to be used with '.wrap()' - terminalWidth(): number; - - updateLocale(obj: { [key: string]: string }): Argv; - - /** - * Override the default strings used by yargs with the key/value pairs provided in obj - * - * If you explicitly specify a locale(), you should do so before calling `updateStrings()`. - */ - updateStrings(obj: { [key: string]: string }): Argv; - - /** - * Set a usage message to show which commands to use. - * Inside `message`, the string `$0` will get interpolated to the current script name or node command for the present script similar to how `$0` works in bash or perl. - * - * If the optional `description`/`builder`/`handler` are provided, `.usage()` acts an an alias for `.command()`. - * This allows you to use `.usage()` to configure the default command that will be run as an entry-point to your application - * and allows you to provide configuration for the positional arguments accepted by your program: - */ - usage(message: string): Argv; - usage(command: string | ReadonlyArray, description: string, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: (args: Argv) => Argv, handler?: (args: Arguments) => void): Argv; - usage(command: string | ReadonlyArray, description: string, builder?: O, handler?: (args: Arguments>) => void): Argv; - usage(command: string | ReadonlyArray, showInHelp: boolean, builder?: O, handler?: (args: Arguments>) => void): Argv; - - /** - * Add an option (e.g. `--version`) that displays the version number (given by the version parameter) and exits the process. - * By default yargs enables version for the `--version` option. - * - * If no arguments are passed to version (`.version()`), yargs will parse the package.json of your module and use its version value. - * - * If the boolean argument `false` is provided, it will disable `--version`. - */ - version(): Argv; - version(version: string): Argv; - version(enable: boolean): Argv; - version(optionKey: string, version: string): Argv; - version(optionKey: string, description: string, version: string): Argv; - - /** - * Format usage output to wrap at columns many columns. - * - * By default wrap will be set to `Math.min(80, windowWidth)`. Use `.wrap(null)` to specify no column limit (no right-align). - * Use `.wrap(yargs.terminalWidth())` to maximize the width of yargs' usage instructions. - */ - wrap(columns: number | null): Argv; - } - - type Arguments = T & { - /** Non-option arguments */ - _: string[]; - /** The script name or node command */ - $0: string; - /** All remaining options */ - [argName: string]: unknown; - }; - - interface RequireDirectoryOptions { - /** Look for command modules in all subdirectories and apply them as a flattened (non-hierarchical) list. */ - recurse?: boolean; - /** The types of files to look for when requiring command modules. */ - extensions?: ReadonlyArray; - /** - * A synchronous function called for each command module encountered. - * Accepts `commandObject`, `pathToFile`, and `filename` as arguments. - * Returns `commandObject` to include the command; any falsy value to exclude/skip it. - */ - visit?: (commandObject: any, pathToFile?: string, filename?: string) => any; - /** Whitelist certain modules */ - include?: RegExp | ((pathToFile: string) => boolean); - /** Blacklist certain modules. */ - exclude?: RegExp | ((pathToFile: string) => boolean); - } - - interface Options { - /** string or array of strings, alias(es) for the canonical option key, see `alias()` */ - alias?: string | ReadonlyArray; - /** boolean, interpret option as an array, see `array()` */ - array?: boolean; - /** boolean, interpret option as a boolean flag, see `boolean()` */ - boolean?: boolean; - /** value or array of values, limit valid option arguments to a predefined set, see `choices()` */ - choices?: Choices; - /** function, coerce or transform parsed command line values into another value, see `coerce()` */ - coerce?: (arg: any) => any; - /** boolean, interpret option as a path to a JSON config file, see `config()` */ - config?: boolean; - /** function, provide a custom config parsing function, see `config()` */ - configParser?: (configPath: string) => object; - /** string or object, require certain keys not to be set, see `conflicts()` */ - conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** boolean, interpret option as a count of boolean flags, see `count()` */ - count?: boolean; - /** value, set a default value for the option, see `default()` */ - default?: any; - /** string, use this description for the default value in help content, see `default()` */ - defaultDescription?: string; - /** - * @deprecated since version 6.6.0 - * Use 'demandOption' instead - */ - demand?: boolean | string; - /** boolean or string, demand the option be given, with optional error message, see `demandOption()` */ - demandOption?: boolean | string; - /** string, the option description for help content, see `describe()` */ - desc?: string; - /** string, the option description for help content, see `describe()` */ - describe?: string; - /** string, the option description for help content, see `describe()` */ - description?: string; - /** boolean, indicate that this key should not be reset when a command is invoked, see `global()` */ - global?: boolean; - /** string, when displaying usage instructions place the option under an alternative group heading, see `group()` */ - group?: string; - /** don't display option in help output. */ - hidden?: boolean; - /** string or object, require certain keys to be set, see `implies()` */ - implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** number, specify how many arguments should be consumed for the option, see `nargs()` */ - nargs?: number; - /** boolean, apply path.normalize() to the option, see `normalize()` */ - normalize?: boolean; - /** boolean, interpret option as a number, `number()` */ - number?: boolean; - /** - * @deprecated since version 6.6.0 - * Use 'demandOption' instead - */ - require?: boolean | string; - /** - * @deprecated since version 6.6.0 - * Use 'demandOption' instead - */ - required?: boolean | string; - /** boolean, require the option be specified with a value, see `requiresArg()` */ - requiresArg?: boolean; - /** boolean, skips validation if the option is present, see `skipValidation()` */ - skipValidation?: boolean; - /** boolean, interpret option as a string, see `string()` */ - string?: boolean; - type?: "array" | "count" | PositionalOptionsType; - } - - interface PositionalOptions { - /** string or array of strings, see `alias()` */ - alias?: string | ReadonlyArray; - /** value or array of values, limit valid option arguments to a predefined set, see `choices()` */ - choices?: Choices; - /** function, coerce or transform parsed command line values into another value, see `coerce()` */ - coerce?: (arg: any) => any; - /** string or object, require certain keys not to be set, see `conflicts()` */ - conflicts?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** value, set a default value for the option, see `default()` */ - default?: any; - /** string, the option description for help content, see `describe()` */ - desc?: string; - /** string, the option description for help content, see `describe()` */ - describe?: string; - /** string, the option description for help content, see `describe()` */ - description?: string; - /** string or object, require certain keys to be set, see `implies()` */ - implies?: string | ReadonlyArray | { [key: string]: string | ReadonlyArray }; - /** boolean, apply path.normalize() to the option, see normalize() */ - normalize?: boolean; - type?: PositionalOptionsType; - } - - /** Remove keys K in T */ - type Omit = { [key in Exclude]: T[key] }; - - /** Remove undefined as a possible value for keys K in T */ - type Defined = Omit & { [key in K]: Exclude }; - - /** Convert T to T[] and T | undefined to T[] | undefined */ - type ToArray = Array> | Extract; - - /** Gives string[] if T is an array type, otherwise string. Preserves | undefined. */ - type ToString = (Exclude extends any[] ? string[] : string) | Extract; - - /** Gives number[] if T is an array type, otherwise number. Preserves | undefined. */ - type ToNumber = (Exclude extends any[] ? number[] : number) | Extract; - - type InferredOptionType = - O extends { default: infer D } ? D : - O extends { type: "count" } ? number : - O extends { count: true } ? number : - O extends { required: string | true } ? RequiredOptionType : - O extends { require: string | true } ? RequiredOptionType : - O extends { demand: string | true } ? RequiredOptionType : - O extends { demandOption: string | true } ? RequiredOptionType : - RequiredOptionType | undefined; - - type RequiredOptionType = - O extends { type: "array", string: true } ? string[] : - O extends { type: "array", number: true } ? number[] : - O extends { type: "array", normalize: true } ? string[] : - O extends { type: "string", array: true } ? string[] : - O extends { type: "number", array: true } ? number[] : - O extends { string: true, array: true } ? string[] : - O extends { number: true, array: true } ? number[] : - O extends { normalize: true, array: true } ? string[] : - O extends { type: "array" } ? Array : - O extends { type: "boolean" } ? boolean : - O extends { type: "number" } ? number : - O extends { type: "string" } ? string : - O extends { array: true } ? Array : - O extends { boolean: true } ? boolean : - O extends { number: true } ? number : - O extends { string: true } ? string : - O extends { normalize: true } ? string : - O extends { choices: ReadonlyArray } ? C : - O extends { coerce: (arg: any) => infer T } ? T : - unknown; - - type InferredOptionTypes = { [key in keyof O]: InferredOptionType }; - - interface CommandModule { - /** array of strings (or a single string) representing aliases of `exports.command`, positional args defined in an alias are ignored */ - aliases?: ReadonlyArray | string; - /** object declaring the options the command accepts, or a function accepting and returning a yargs instance */ - builder?: CommandBuilder; - /** string (or array of strings) that executes this command when given on the command line, first string may contain positional args */ - command?: ReadonlyArray | string; - /** string used as the description for the command in help text, use `false` for a hidden command */ - describe?: string | false; - /** a function which will be passed the parsed argv. */ - handler: (args: Arguments) => void; - } - - type ParseCallback = (err: Error | undefined, argv: Arguments, output: string) => void; - type CommandBuilder = { [key: string]: Options } | ((args: Argv) => Argv); - type SyncCompletionFunction = (current: string, argv: any) => string[]; - type AsyncCompletionFunction = (current: string, argv: any, done: (completion: ReadonlyArray) => void) => void; - type PromiseCompletionFunction = (current: string, argv: any) => Promise; - type MiddlewareFunction = (args: Arguments) => void; - type Choices = ReadonlyArray; - type PositionalOptionsType = "boolean" | "number" | "string"; -} - -declare var yargs: yargs.Argv; -export = yargs; diff --git a/packages/common/node_modules/@types/yargs/package.json b/packages/common/node_modules/@types/yargs/package.json deleted file mode 100644 index 798e593ac8..0000000000 --- a/packages/common/node_modules/@types/yargs/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@types/yargs", - "version": "13.0.2", - "description": "TypeScript definitions for yargs", - "license": "MIT", - "contributors": [ - { - "name": "Martin Poelstra", - "url": "https://github.com/poelstra", - "githubUsername": "poelstra" - }, - { - "name": "Mizunashi Mana", - "url": "https://github.com/mizunashi-mana", - "githubUsername": "mizunashi-mana" - }, - { - "name": "Jeffery Grajkowski", - "url": "https://github.com/pushplay", - "githubUsername": "pushplay" - }, - { - "name": "Jeff Kenney", - "url": "https://github.com/jeffkenney", - "githubUsername": "jeffkenney" - }, - { - "name": "Jimi (Dimitris) Charalampidis", - "url": "https://github.com/JimiC", - "githubUsername": "JimiC" - }, - { - "name": "Steffen Viken Valvåg", - "url": "https://github.com/steffenvv", - "githubUsername": "steffenvv" - }, - { - "name": "Emily Marigold Klassen", - "url": "https://github.com/forivall", - "githubUsername": "forivall" - } - ], - "main": "", - "types": "index", - "repository": { - "type": "git", - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/yargs" - }, - "scripts": {}, - "dependencies": { - "@types/yargs-parser": "*" - }, - "typesPublisherContentHash": "5a8204a9fcea5ff2f6fd239ea4db72637ab00c6e3c82ff1855070c7ecc25394e", - "typeScriptVersion": "3.0" -} \ No newline at end of file diff --git a/packages/common/node_modules/@types/yargs/yargs.d.ts b/packages/common/node_modules/@types/yargs/yargs.d.ts deleted file mode 100644 index f022ae4b9f..0000000000 --- a/packages/common/node_modules/@types/yargs/yargs.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Argv } from '.'; - -export = Yargs; - -declare function Yargs( - processArgs?: ReadonlyArray, - cwd?: string, - parentRequire?: NodeRequireFunction, -): Argv; diff --git a/packages/common/node_modules/ansi-styles/index.js b/packages/common/node_modules/ansi-styles/index.js deleted file mode 100644 index 90a871c4d7..0000000000 --- a/packages/common/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; -const colorConvert = require('color-convert'); - -const wrapAnsi16 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => function () { - const code = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => function () { - const rgb = fn.apply(colorConvert, arguments); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39], - - // Bright color - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Fix humans - styles.color.grey = styles.color.gray; - - for (const groupName of Object.keys(styles)) { - const group = styles[groupName]; - - for (const styleName of Object.keys(group)) { - const style = group[styleName]; - - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - } - - const ansi2ansi = n => n; - const rgb2rgb = (r, g, b) => [r, g, b]; - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = { - ansi: wrapAnsi16(ansi2ansi, 0) - }; - styles.color.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 0) - }; - styles.color.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 0) - }; - - styles.bgColor.ansi = { - ansi: wrapAnsi16(ansi2ansi, 10) - }; - styles.bgColor.ansi256 = { - ansi256: wrapAnsi256(ansi2ansi, 10) - }; - styles.bgColor.ansi16m = { - rgb: wrapAnsi16m(rgb2rgb, 10) - }; - - for (let key of Object.keys(colorConvert)) { - if (typeof colorConvert[key] !== 'object') { - continue; - } - - const suite = colorConvert[key]; - - if (key === 'ansi16') { - key = 'ansi'; - } - - if ('ansi16' in suite) { - styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0); - styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10); - } - - if ('ansi256' in suite) { - styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0); - styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10); - } - - if ('rgb' in suite) { - styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0); - styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10); - } - } - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/packages/common/node_modules/ansi-styles/license b/packages/common/node_modules/ansi-styles/license deleted file mode 100644 index e7af2f7710..0000000000 --- a/packages/common/node_modules/ansi-styles/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (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. diff --git a/packages/common/node_modules/ansi-styles/package.json b/packages/common/node_modules/ansi-styles/package.json deleted file mode 100644 index 65edb48c39..0000000000 --- a/packages/common/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "ansi-styles", - "version": "3.2.1", - "description": "ANSI escape codes for styling strings in the terminal", - "license": "MIT", - "repository": "chalk/ansi-styles", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && ava", - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" - }, - "files": [ - "index.js" - ], - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "color-convert": "^1.9.0" - }, - "devDependencies": { - "ava": "*", - "babel-polyfill": "^6.23.0", - "svg-term-cli": "^2.1.1", - "xo": "*" - }, - "ava": { - "require": "babel-polyfill" - } -} diff --git a/packages/common/node_modules/ansi-styles/readme.md b/packages/common/node_modules/ansi-styles/readme.md deleted file mode 100644 index 3158e2df59..0000000000 --- a/packages/common/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,147 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - - -## Install - -``` -$ npm install ansi-styles -``` - - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `gray` ("bright black") -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - - -## License - -MIT diff --git a/packages/common/node_modules/anymatch/LICENSE b/packages/common/node_modules/anymatch/LICENSE deleted file mode 100644 index bc424705fb..0000000000 --- a/packages/common/node_modules/anymatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2014 Elan Shanker - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/common/node_modules/anymatch/README.md b/packages/common/node_modules/anymatch/README.md deleted file mode 100644 index f674f407cf..0000000000 --- a/packages/common/node_modules/anymatch/README.md +++ /dev/null @@ -1,99 +0,0 @@ -anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master) -====== -Javascript module to match a string against a regular expression, glob, string, -or function that takes the string as an argument and returns a truthy or falsy -value. The matcher can also be an array of any or all of these. Useful for -allowing a very flexible user-defined config to define things like file paths. - -__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__ - -[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/) -[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/) - -Usage ------ -```sh -npm install anymatch --save -``` - -#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex]) -* __matchers__: (_Array|String|RegExp|Function_) -String to be directly matched, string with glob patterns, regular expression -test, function that takes the testString as an argument and returns a truthy -value if it should be matched, or an array of any number and mix of these types. -* __testString__: (_String|Array_) The string to test against the matchers. If -passed as an array, the first element of the array will be used as the -`testString` for non-function matchers, while the entire array will be applied -as the arguments for function matchers. -* __returnIndex__: (_Boolean [optional]_) If true, return the array index of -the first matcher that that testString matched, or -1 if no match, instead of a -boolean result. -* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a -subset out of the array of provided matchers to test against. Can be useful -with bound matcher functions (see below). When used with `returnIndex = true` -preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e. -includes array members up to, but not including endIndex). - -```js -var anymatch = require('anymatch'); - -var matchers = [ - 'path/to/file.js', - 'path/anyjs/**/*.js', - /foo\.js$/, - function (string) { - return string.indexOf('bar') !== -1 && string.length > 10 - } -]; - -anymatch(matchers, 'path/to/file.js'); // true -anymatch(matchers, 'path/anyjs/baz.js'); // true -anymatch(matchers, 'path/to/foo.js'); // true -anymatch(matchers, 'path/to/bar.js'); // true -anymatch(matchers, 'bar.js'); // false - -// returnIndex = true -anymatch(matchers, 'foo.js', true); // 2 -anymatch(matchers, 'path/anyjs/foo.js', true); // 1 - -// skip matchers -anymatch(matchers, 'path/to/file.js', false, 1); // false -anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2 -anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1 - -// using globs to match directories and their children -anymatch('node_modules', 'node_modules'); // true -anymatch('node_modules', 'node_modules/somelib/index.js'); // false -anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true -anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false -anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true -``` - -#### anymatch (matchers) -You can also pass in only your matcher(s) to get a curried function that has -already been bound to the provided matching criteria. This can be used as an -`Array.prototype.filter` callback. - -```js -var matcher = anymatch(matchers); - -matcher('path/to/file.js'); // true -matcher('path/anyjs/baz.js', true); // 1 -matcher('path/anyjs/baz.js', true, 2); // -1 - -['foo.js', 'bar.js'].filter(matcher); // ['foo.js'] -``` - -Change Log ----------- -[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases) - -NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information). - -NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch) -for glob pattern matching. Issues with glob pattern matching should be -reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues). - -License -------- -[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE) diff --git a/packages/common/node_modules/anymatch/index.js b/packages/common/node_modules/anymatch/index.js deleted file mode 100644 index e411618506..0000000000 --- a/packages/common/node_modules/anymatch/index.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -var micromatch = require('micromatch'); -var normalize = require('normalize-path'); -var path = require('path'); // required for tests. -var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); }; - -var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { - criteria = arrify(criteria); - value = arrify(value); - if (arguments.length === 1) { - return anymatch.bind(null, criteria.map(function(criterion) { - return typeof criterion === 'string' && criterion[0] !== '!' ? - micromatch.matcher(criterion) : criterion; - })); - } - startIndex = startIndex || 0; - var string = value[0]; - var altString, altValue; - var matched = false; - var matchIndex = -1; - function testCriteria(criterion, index) { - var result; - switch (Object.prototype.toString.call(criterion)) { - case '[object String]': - result = string === criterion || altString && altString === criterion; - result = result || micromatch.isMatch(string, criterion); - break; - case '[object RegExp]': - result = criterion.test(string) || altString && criterion.test(altString); - break; - case '[object Function]': - result = criterion.apply(null, value); - result = result || altValue && criterion.apply(null, altValue); - break; - default: - result = false; - } - if (result) { - matchIndex = index + startIndex; - } - return result; - } - var crit = criteria; - var negGlobs = crit.reduce(function(arr, criterion, index) { - if (typeof criterion === 'string' && criterion[0] === '!') { - if (crit === criteria) { - // make a copy before modifying - crit = crit.slice(); - } - crit[index] = null; - arr.push(criterion.substr(1)); - } - return arr; - }, []); - if (!negGlobs.length || !micromatch.any(string, negGlobs)) { - if (path.sep === '\\' && typeof string === 'string') { - altString = normalize(string); - altString = altString === string ? null : altString; - if (altString) altValue = [altString].concat(value.slice(1)); - } - matched = crit.slice(startIndex, endIndex).some(testCriteria); - } - return returnIndex === true ? matchIndex : matched; -}; - -module.exports = anymatch; diff --git a/packages/common/node_modules/anymatch/package.json b/packages/common/node_modules/anymatch/package.json deleted file mode 100644 index fdbafd76a6..0000000000 --- a/packages/common/node_modules/anymatch/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "anymatch", - "version": "2.0.0", - "description": "Matches strings against configurable strings, globs, regular expressions, and/or functions", - "files": [ - "index.js" - ], - "author": { - "name": "Elan Shanker", - "url": "http://github.com/es128" - }, - "license": "ISC", - "homepage": "https://github.com/micromatch/anymatch", - "repository": { - "type": "git", - "url": "https://github.com/micromatch/anymatch" - }, - "bugs": { - "url": "https://github.com/micromatch/anymatch/issues" - }, - "keywords": [ - "match", - "any", - "string", - "file", - "fs", - "list", - "glob", - "regex", - "regexp", - "regular", - "expression", - "function" - ], - "scripts": { - "test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls" - }, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "devDependencies": { - "coveralls": "^2.7.0", - "istanbul": "^0.4.5", - "mocha": "^3.0.0" - } -} diff --git a/packages/common/node_modules/babel-jest/LICENSE b/packages/common/node_modules/babel-jest/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/babel-jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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. diff --git a/packages/common/node_modules/babel-jest/README.md b/packages/common/node_modules/babel-jest/README.md deleted file mode 100644 index 237e5b6d53..0000000000 --- a/packages/common/node_modules/babel-jest/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# babel-jest - -[Babel](https://github.com/babel/babel) [jest](https://github.com/facebook/jest) plugin - -## Usage - -If you are already using `jest-cli`, add `babel-jest` and it will automatically compile JavaScript code using Babel. - -```bash -yarn add --dev babel-jest @babel/core -``` - -If you would like to write your own preprocessor, uninstall and delete babel-jest and set the [config.transform](https://jestjs.io/docs/configuration#transform-object-string-string) option to your preprocessor. - -## Setup - -_Note: this step is only required if you are using `babel-jest` with additional code preprocessors._ - -To explicitly define `babel-jest` as a transformer for your JavaScript code, map _.js_ files to the `babel-jest` module. Typescript files are also supported. - -```json -"transform": { - "^.+\\.[t|j]sx?$": "babel-jest" -}, -``` diff --git a/packages/common/node_modules/babel-jest/build/index.d.ts b/packages/common/node_modules/babel-jest/build/index.d.ts deleted file mode 100644 index 501601ea9e..0000000000 --- a/packages/common/node_modules/babel-jest/build/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import type { Transformer } from '@jest/transform'; -import { TransformOptions } from '@babel/core'; -interface BabelJestTransformer extends Transformer { - canInstrument: true; -} -declare const transformer: BabelJestTransformer & { - createTransformer: (options?: TransformOptions) => BabelJestTransformer; -}; -export = transformer; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/index.d.ts.map b/packages/common/node_modules/babel-jest/build/index.d.ts.map deleted file mode 100644 index 746793858c..0000000000 --- a/packages/common/node_modules/babel-jest/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAEV,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAIL,gBAAgB,EAEjB,MAAM,aAAa,CAAC;AAUrB,UAAU,oBAAqB,SAAQ,WAAW;IAChD,aAAa,EAAE,IAAI,CAAC;CACrB;AAiID,QAAA,MAAM,WAAW,EAAE,oBAAoB,GAAG;IACxC,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,KAAK,oBAAoB,CAAC;CAMzE,CAAC;AAEF,SAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/index.js b/packages/common/node_modules/babel-jest/build/index.js deleted file mode 100644 index b787296a6b..0000000000 --- a/packages/common/node_modules/babel-jest/build/index.js +++ /dev/null @@ -1,323 +0,0 @@ -'use strict'; - -function _crypto() { - const data = require('crypto'); - - _crypto = function () { - return data; - }; - - return data; -} - -function fs() { - const data = _interopRequireWildcard(require('fs')); - - fs = function () { - return data; - }; - - return data; -} - -function path() { - const data = _interopRequireWildcard(require('path')); - - path = function () { - return data; - }; - - return data; -} - -function _core() { - const data = require('@babel/core'); - - _core = function () { - return data; - }; - - return data; -} - -var _loadBabelConfig = require('./loadBabelConfig'); - -function _chalk() { - const data = _interopRequireDefault(require('chalk')); - - _chalk = function () { - return data; - }; - - return data; -} - -function _slash() { - const data = _interopRequireDefault(require('slash')); - - _slash = function () { - return data; - }; - - return data; -} - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : {default: obj}; -} - -function _getRequireWildcardCache() { - if (typeof WeakMap !== 'function') return null; - var cache = new WeakMap(); - _getRequireWildcardCache = function () { - return cache; - }; - return cache; -} - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } - if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) { - return {default: obj}; - } - var cache = _getRequireWildcardCache(); - if (cache && cache.has(obj)) { - return cache.get(obj); - } - var newObj = {}; - var hasPropertyDescriptor = - Object.defineProperty && Object.getOwnPropertyDescriptor; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor - ? Object.getOwnPropertyDescriptor(obj, key) - : null; - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - newObj.default = obj; - if (cache) { - cache.set(obj, newObj); - } - return newObj; -} - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - if (enumerableOnly) - symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - keys.push.apply(keys, symbols); - } - return keys; -} - -function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - } - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - return obj; -} - -const THIS_FILE = fs().readFileSync(__filename); - -const jestPresetPath = require.resolve('babel-preset-jest'); - -const babelIstanbulPlugin = require.resolve('babel-plugin-istanbul'); // Narrow down the types - -const createTransformer = (inputOptions = {}) => { - var _inputOptions$plugins, _inputOptions$presets; - - const options = _objectSpread({}, inputOptions, { - caller: _objectSpread( - { - name: 'babel-jest', - supportsDynamicImport: false, - supportsStaticESM: false - }, - inputOptions.caller - ), - compact: false, - plugins: - (_inputOptions$plugins = inputOptions.plugins) !== null && - _inputOptions$plugins !== void 0 - ? _inputOptions$plugins - : [], - presets: ((_inputOptions$presets = inputOptions.presets) !== null && - _inputOptions$presets !== void 0 - ? _inputOptions$presets - : [] - ).concat(jestPresetPath), - sourceMaps: 'both' - }); - - function loadBabelConfig(cwd, filename, transformOptions) { - var _transformOptions$sup, _transformOptions$sup2; - - // `cwd` first to allow incoming options to override it - const babelConfig = (0, _loadBabelConfig.loadPartialConfig)( - _objectSpread( - { - cwd - }, - options, - { - caller: _objectSpread({}, options.caller, { - supportsDynamicImport: - (_transformOptions$sup = - transformOptions === null || transformOptions === void 0 - ? void 0 - : transformOptions.supportsDynamicImport) !== null && - _transformOptions$sup !== void 0 - ? _transformOptions$sup - : options.caller.supportsDynamicImport, - supportsStaticESM: - (_transformOptions$sup2 = - transformOptions === null || transformOptions === void 0 - ? void 0 - : transformOptions.supportsStaticESM) !== null && - _transformOptions$sup2 !== void 0 - ? _transformOptions$sup2 - : options.caller.supportsStaticESM - }), - filename - } - ) - ); - - if (!babelConfig) { - throw new Error( - `babel-jest: Babel ignores ${_chalk().default.bold( - (0, _slash().default)(path().relative(cwd, filename)) - )} - make sure to include the file in Jest's ${_chalk().default.bold( - 'transformIgnorePatterns' - )} as well.` - ); - } - - return babelConfig; - } - - return { - canInstrument: true, - - getCacheKey(fileData, filename, configString, cacheKeyOptions) { - const {config, instrument, rootDir} = cacheKeyOptions; - const babelOptions = loadBabelConfig( - config.cwd, - filename, - cacheKeyOptions - ); - const configPath = [ - babelOptions.config || '', - babelOptions.babelrc || '' - ]; - return (0, _crypto().createHash)('md5') - .update(THIS_FILE) - .update('\0', 'utf8') - .update(JSON.stringify(babelOptions.options)) - .update('\0', 'utf8') - .update(fileData) - .update('\0', 'utf8') - .update(path().relative(rootDir, filename)) - .update('\0', 'utf8') - .update(configString) - .update('\0', 'utf8') - .update(configPath.join('')) - .update('\0', 'utf8') - .update(instrument ? 'instrument' : '') - .update('\0', 'utf8') - .update(process.env.NODE_ENV || '') - .update('\0', 'utf8') - .update(process.env.BABEL_ENV || '') - .digest('hex'); - }, - - process(src, filename, config, transformOptions) { - const babelOptions = _objectSpread( - {}, - loadBabelConfig(config.cwd, filename, transformOptions).options - ); - - if ( - transformOptions === null || transformOptions === void 0 - ? void 0 - : transformOptions.instrument - ) { - babelOptions.auxiliaryCommentBefore = ' istanbul ignore next '; // Copied from jest-runtime transform.js - - babelOptions.plugins = (babelOptions.plugins || []).concat([ - [ - babelIstanbulPlugin, - { - // files outside `cwd` will not be instrumented - cwd: config.rootDir, - exclude: [] - } - ] - ]); - } - - const transformResult = (0, _core().transformSync)(src, babelOptions); - - if (transformResult) { - const {code, map} = transformResult; - - if (typeof code === 'string') { - return { - code, - map - }; - } - } - - return src; - } - }; -}; - -const transformer = _objectSpread({}, createTransformer(), { - // Assigned here so only the exported transformer has `createTransformer`, - // instead of all created transformers by the function - createTransformer -}); - -module.exports = transformer; diff --git a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts b/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts deleted file mode 100644 index 0930453492..0000000000 --- a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { loadPartialConfig } from '@babel/core'; -//# sourceMappingURL=loadBabelConfig.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map b/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map deleted file mode 100644 index 8e109f41cc..0000000000 --- a/packages/common/node_modules/babel-jest/build/loadBabelConfig.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"loadBabelConfig.d.ts","sourceRoot":"","sources":["../src/loadBabelConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,aAAa,CAAC"} \ No newline at end of file diff --git a/packages/common/node_modules/babel-jest/build/loadBabelConfig.js b/packages/common/node_modules/babel-jest/build/loadBabelConfig.js deleted file mode 100644 index f91dea5dbb..0000000000 --- a/packages/common/node_modules/babel-jest/build/loadBabelConfig.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -Object.defineProperty(exports, 'loadPartialConfig', { - enumerable: true, - get: function () { - return _core().loadPartialConfig; - } -}); - -function _core() { - const data = require('@babel/core'); - - _core = function () { - return data; - }; - - return data; -} diff --git a/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts b/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts deleted file mode 100644 index 6bd60bc5a2..0000000000 --- a/packages/common/node_modules/babel-jest/build/ts3.4/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -import { Transformer } from '@jest/transform'; -import { TransformOptions } from '@babel/core'; -interface BabelJestTransformer extends Transformer { - canInstrument: true; -} -declare const transformer: BabelJestTransformer & { - createTransformer: (options?: TransformOptions) => BabelJestTransformer; -}; -export = transformer; -//# sourceMappingURL=index.d.ts.map diff --git a/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts b/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts deleted file mode 100644 index 11309e96b9..0000000000 --- a/packages/common/node_modules/babel-jest/build/ts3.4/loadBabelConfig.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -export { loadPartialConfig } from '@babel/core'; -//# sourceMappingURL=loadBabelConfig.d.ts.map diff --git a/packages/common/node_modules/babel-jest/package.json b/packages/common/node_modules/babel-jest/package.json deleted file mode 100644 index 9877edc40f..0000000000 --- a/packages/common/node_modules/babel-jest/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "babel-jest", - "description": "Jest plugin to use babel for transformation.", - "version": "25.3.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/babel-jest" - }, - "license": "MIT", - "main": "build/index.js", - "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, - "dependencies": { - "@jest/transform": "^25.3.0", - "@jest/types": "^25.3.0", - "@types/babel__core": "^7.1.7", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^25.3.0", - "chalk": "^3.0.0", - "slash": "^3.0.0" - }, - "devDependencies": { - "@babel/core": "^7.1.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "engines": { - "node": ">= 8.3" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" -} diff --git a/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md b/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md deleted file mode 100644 index ef7c03af94..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/CHANGELOG.md +++ /dev/null @@ -1,294 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -## [5.2.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.4...v5.2.0) (2019-07-18) - - -### Bug Fixes - -* Print explicit error if use with babel 6 is attempted ([#207](https://github.com/istanbuljs/babel-plugin-istanbul/issues/207)) ([a12cf16](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a12cf16)) - - -### Features - -* Support turning off node_modules default exclude via flag ([#172](https://github.com/istanbuljs/babel-plugin-istanbul/issues/172)) ([a314f06](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a314f06)) - - - -## [5.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.3...v5.1.4) (2019-04-25) - - - -## [5.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.2...v5.1.3) (2019-04-23) - - -### Bug Fixes - -* Revert [#192](https://github.com/istanbuljs/babel-plugin-istanbul/issues/192) ([201a933](https://github.com/istanbuljs/babel-plugin-istanbul/commit/201a933)) due to regression detailed at [#201](https://github.com/istanbuljs/babel-plugin-istanbul/issues/201) - - - -## [5.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.1...v5.1.2) (2019-04-10) - - -### Bug Fixes - -* Ensure correct scope references after traversal ([#192](https://github.com/istanbuljs/babel-plugin-istanbul/issues/192)) ([201a933](https://github.com/istanbuljs/babel-plugin-istanbul/commit/201a933)) - - - - -## [5.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.1.0...v5.1.1) (2019-01-11) - - -### Bug Fixes - -* respect changes of cwd in options ([#171](https://github.com/istanbuljs/babel-plugin-istanbul/issues/171)) ([adec723](https://github.com/istanbuljs/babel-plugin-istanbul/commit/adec723)) - - - - -# [5.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.0.1...v5.1.0) (2018-09-07) - - -### Features - -* Bump dependencies. ([b509649](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b509649)) - - - - -## [5.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v5.0.0...v5.0.1) (2018-07-24) - - - - -# [5.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.6...v5.0.0) (2018-06-27) - - -### Features - -* upgrade to babel 7 and newest istanbul libraries ([#158](https://github.com/istanbuljs/babel-plugin-istanbul/issues/158)) ([a9e1564](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a9e1564)) - - -### BREAKING CHANGES - -* Drop node 4 support, upgrade to babel 7, stop shipping @babel/plugin-syntax-object-rest-spread - - - - -## 4.1.6 (2018-03-09) - -* chore: explicit update of istanbul dependencies (#149) ([77b6eb7](https://github.com/istanbuljs/babel-plugin-istanbul/commit/77b6eb7)), closes [#149](https://github.com/istanbuljs/babel-plugin-istanbul/issues/149) -* chore(package): update coveralls to version 3.0.0 (#133) ([7045a03](https://github.com/istanbuljs/babel-plugin-istanbul/commit/7045a03)), closes [#133](https://github.com/istanbuljs/babel-plugin-istanbul/issues/133) -* chore(package): update mocha to version 4.0.0 (#134) ([38176ba](https://github.com/istanbuljs/babel-plugin-istanbul/commit/38176ba)), closes [#134](https://github.com/istanbuljs/babel-plugin-istanbul/issues/134) -* fix: babel-preset-es2015 => babel-preset-env (#138) ([18fe954](https://github.com/istanbuljs/babel-plugin-istanbul/commit/18fe954)), closes [#138](https://github.com/istanbuljs/babel-plugin-istanbul/issues/138) -* fix: include object-spread-syntax plugin (#141) ([428a952](https://github.com/istanbuljs/babel-plugin-istanbul/commit/428a952)), closes [#141](https://github.com/istanbuljs/babel-plugin-istanbul/issues/141) - - - - -## [4.1.5](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.2...v4.1.5) (2017-08-23) - - - - -## [4.1.4](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.3...v4.1.4) (2017-05-27) - - - - -## [4.1.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.3) (2017-04-29) - - - - -## [4.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.1...v4.1.2) (2017-03-27) - - - - -## [4.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.1.0...v4.1.1) (2017-03-22) - - -### Bug Fixes - -* explicit upgrade to patched version of istanbul-lib-instrument ([db8ecbe](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db8ecbe)) - - - - -# [4.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v4.0.0...v4.1.0) (2017-03-21) - - -### Features - -* add includeUntested option to expose coverage of all instrumented files ([#80](https://github.com/istanbuljs/babel-plugin-istanbul/issues/80)) ([b078bbd](https://github.com/istanbuljs/babel-plugin-istanbul/commit/b078bbd)) - - - - -# [4.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.2...v4.0.0) (2017-02-07) - - -### Bug Fixes - -* load configuration from process.env.NYC_CONFIG if present ([#93](https://github.com/istanbuljs/babel-plugin-istanbul/issues/93)) ([e902924](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e902924)) - - -### Features - -* drop Node 0.10 and 0.12 support, upgrade dependencies to reflect this ([#88](https://github.com/istanbuljs/babel-plugin-istanbul/issues/88)) ([594c03a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/594c03a)) -* we can now use the language feature Object.assign ([#92](https://github.com/istanbuljs/babel-plugin-istanbul/issues/92)) ([f77db2a](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f77db2a)) - - -### BREAKING CHANGES - -* I've updated dependencies and dropped Node 0.10 and Node 0.12 support. - - - - -## [3.1.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.1...v3.1.2) (2017-01-04) - - -### Bug Fixes - -* address regression related to export const foo = () => {} ([#79](https://github.com/istanbuljs/babel-plugin-istanbul/issues/79)) ([f870a8f](https://github.com/istanbuljs/babel-plugin-istanbul/commit/f870a8f)) - - - - -## [3.1.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.1.0...v3.1.1) (2017-01-02) - - - - -# [3.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v3.0.0...v3.1.0) (2016-12-27) - - -### Bug Fixes - -* upgrade a bunch of core dependencies ([#77](https://github.com/istanbuljs/babel-plugin-istanbul/issues/77)) ([e764330](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e764330)) - - -### Features - -* accept source map input for the visitor ([#75](https://github.com/istanbuljs/babel-plugin-istanbul/issues/75)) ([437e90b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/437e90b)) - - - - -# [3.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.3...v3.0.0) (2016-11-14) - - -### Chores - -* **package:** update test-exclude to version 3.0.0 ([#68](https://github.com/istanbuljs/babel-plugin-istanbul/issues/68)) ([0396385](https://github.com/istanbuljs/babel-plugin-istanbul/commit/0396385)) - - -### BREAKING CHANGES - -* package: test-exclude now adds `**/node_modules/**` as exclude rule by default. - - - - -## [2.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.2...v2.0.3) (2016-10-17) - - -### Bug Fixes - -* force istanbul-lib-instrument with variable hoisting fix ([#64](https://github.com/istanbuljs/babel-plugin-istanbul/issues/64)) ([209a0cf](https://github.com/istanbuljs/babel-plugin-istanbul/commit/209a0cf)) -* switch deprecated lodash.assign for object-assign ([#58](https://github.com/istanbuljs/babel-plugin-istanbul/issues/58)) ([6e051fc](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6e051fc)) - - - - -## [2.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.1...v2.0.2) (2016-09-08) - - -### Bug Fixes - -* take realpath of cwd, whether or not set in env ([#37](https://github.com/istanbuljs/babel-plugin-istanbul/issues/37)) ([6274d83](https://github.com/istanbuljs/babel-plugin-istanbul/commit/6274d83)) - - - - -## [2.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v2.0.0...v2.0.1) (2016-09-02) - - -### Bug Fixes - -* update istanbul-lib-instrument ([573e0d4](https://github.com/istanbuljs/babel-plugin-istanbul/commit/573e0d4)) - - - - -# [2.0.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.1.0...v2.0.0) (2016-08-14) - - -### Chores - -* upgrade to version of test-exclude with new exclude rules ([#35](https://github.com/istanbuljs/babel-plugin-istanbul/issues/35)) ([220ce2b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/220ce2b)) - - -### BREAKING CHANGES - -* see https://github.com/istanbuljs/test-exclude/blob/master/CHANGELOG.md#breaking-changes - - - - -# [1.1.0](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.3...v1.1.0) (2016-07-21) - - -### Bug Fixes - -* upgrade to istanbul-lib-instrument with faster babel-generator ([#18](https://github.com/istanbuljs/babel-plugin-istanbul/issues/18)) ([d33263c](https://github.com/istanbuljs/babel-plugin-istanbul/commit/d33263c)) - - -### Features - -* allow exclude/include options to be passed as Babel plugin config ([#16](https://github.com/istanbuljs/babel-plugin-istanbul/issues/16)) ([cf68421](https://github.com/istanbuljs/babel-plugin-istanbul/commit/cf68421)) - - - - -## [1.0.3](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.2...v1.0.3) (2016-07-09) - - -### Bug Fixes - -* keep using NYC_CWD if available ([#10](https://github.com/istanbuljs/babel-plugin-istanbul/issues/10)) ([db0352b](https://github.com/istanbuljs/babel-plugin-istanbul/commit/db0352b)) - - - - -## [1.0.2](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.1...v1.0.2) (2016-07-03) - - -### Bug Fixes - -* take realpath of process.cwd(), fixes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) ([#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8)) ([e8d3785](https://github.com/istanbuljs/babel-plugin-istanbul/commit/e8d3785)), closes [#7](https://github.com/istanbuljs/babel-plugin-istanbul/issues/7) [#8](https://github.com/istanbuljs/babel-plugin-istanbul/issues/8) - - - - -## [1.0.1](https://github.com/istanbuljs/babel-plugin-istanbul/compare/v1.0.0...v1.0.1) (2016-06-30) - - -### Bug Fixes - -* upgrade to version of istanbul-lib-instrument that fixes some out of bounds issues ([#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6)) ([a949065](https://github.com/istanbuljs/babel-plugin-istanbul/commit/a949065)), closes [#6](https://github.com/istanbuljs/babel-plugin-istanbul/issues/6) - - - -# 1.0.0 (2016-06-26) - - -### Features - -* port functionality from __coverage__, get ready for first release ([#2](https://github.com/istanbuljs/babel-plugin-istanbul/issues/2)) ([2a8ee44](https://github.com/istanbuljs/babel-plugin-istanbul/commit/2a8ee44)) diff --git a/packages/common/node_modules/babel-plugin-istanbul/LICENSE b/packages/common/node_modules/babel-plugin-istanbul/LICENSE deleted file mode 100644 index 22f21ab994..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2016, Istanbul Code Coverage -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of babel-plugin-istanbul nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/common/node_modules/babel-plugin-istanbul/README.md b/packages/common/node_modules/babel-plugin-istanbul/README.md deleted file mode 100644 index 4c19da3cae..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# babel-plugin-istanbul - -[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/babel-plugin-istanbul.svg)](https://greenkeeper.io/) -[![Build Status](https://travis-ci.org/istanbuljs/babel-plugin-istanbul.svg?branch=master)](https://travis-ci.org/istanbuljs/babel-plugin-istanbul) -[![Coverage Status](https://coveralls.io/repos/github/istanbuljs/babel-plugin-istanbul/badge.svg?branch=master)](https://coveralls.io/github/istanbuljs/babel-plugin-istanbul?branch=master) -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) -[![community slack](http://devtoolscommunity.herokuapp.com/badge.svg)](http://devtoolscommunity.herokuapp.com) - -_Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. - -A Babel plugin that instruments your code with Istanbul coverage. -It can instantly be used with [karma-coverage](https://github.com/karma-runner/karma-coverage) and mocha on Node.js (through [nyc](https://github.com/bcoe/nyc)). - -__Note:__ This plugin does not generate any report or save any data to any file; -it only adds instrumenting code to your JavaScript source code. -To integrate with testing tools, please see the [Integrations](#integrations) section. - -## Usage - -Install it: - -``` -npm install --save-dev babel-plugin-istanbul -``` - -Add it to `.babelrc` in test mode: - -```js -{ - "env": { - "test": { - "plugins": [ "istanbul" ] - } - } -} -``` - -Optionally, use [cross-env](https://www.npmjs.com/package/cross-env) to set -`NODE_ENV=test`: - -```json -{ - "scripts": { - "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js" - } -} -``` - -## Integrations - -### karma - -It _just works_ with Karma. First, make sure that the code is already transpiled by Babel (either using `karma-babel-preprocessor`, `karma-webpack`, or `karma-browserify`). Then, simply set up [karma-coverage](https://github.com/karma-runner/karma-coverage) according to the docs, but __don’t add the `coverage` preprocessor.__ This plugin has already instrumented your code, and Karma should pick it up automatically. - -It has been tested with [bemusic/bemuse](https://codecov.io/github/bemusic/bemuse) project, which contains ~2400 statements. - -### mocha on node.js (through nyc) - -Configure Mocha to transpile JavaScript code using Babel, then you can run your tests with [`nyc`](https://github.com/bcoe/nyc), which will collect all the coverage report. - -babel-plugin-istanbul respects the `include`/`exclude` configuration options from nyc, -but you also need to __configure NYC not to instrument your code__ by adding these settings in your `package.json`: - -```js - "nyc": { - "sourceMap": false, - "instrument": false - }, -``` - -## Ignoring files - -You don't want to cover your test files as this will skew your coverage results. You can configure this by providing plugin options matching nyc's [`exclude`/`include` rules](https://github.com/bcoe/nyc#excluding-files): - -```json -{ - "env": { - "test": { - "plugins": [ - ["istanbul", { - "exclude": [ - "**/*.spec.js" - ] - }] - ] - } - } -} -``` - -If you don't provide options in your Babel config, the plugin will look for `exclude`/`include` config under an `"nyc"` key in `package.json`. - -You can also use [istanbul's ignore hints](https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes) to specify specific lines of code to skip instrumenting. - -## Source Maps - -By default, this plugin will pick up inline source maps and attach them to the instrumented code such that code coverage can be remapped back to the original source, even for multi-step build processes. This can be memory intensive. Set `useInlineSourceMaps` to prevent this behavior. - -```json -{ - "env": { - "test": { - "plugins": [ - ["istanbul", { - "useInlineSourceMaps": false - }] - ] - } - } -} -``` - -If you're instrumenting code programatically, you can pass a source map explicitly. -```js -import babelPluginIstanbul from 'babel-plugin-istanbul'; - -function instrument(sourceCode, sourceMap, fileName) { - return babel.transform(sourceCode, { - filename, - plugins: [ - [babelPluginIstanbul, { - inputSourceMap: sourceMap - }] - ] - }) -} -``` - -## Credit where credit is due - -The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyanont](https://github.com/dtinth)'s original library [`babel-plugin-__coverage__`](https://github.com/dtinth/babel-plugin-__coverage__). diff --git a/packages/common/node_modules/babel-plugin-istanbul/lib/index.js b/packages/common/node_modules/babel-plugin-istanbul/lib/index.js deleted file mode 100644 index 5b4a58159e..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/lib/index.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _fs = require("fs"); - -var _path = require("path"); - -var _helperPluginUtils = require("@babel/helper-plugin-utils"); - -var _istanbulLibInstrument = require("istanbul-lib-instrument"); - -const testExclude = require('test-exclude'); - -const findUp = require('find-up'); - -function getRealpath(n) { - try { - return (0, _fs.realpathSync)(n) || n; - } catch (e) { - return n; - } -} - -function makeShouldSkip() { - let exclude; - return function shouldSkip(file, opts) { - if (!exclude || exclude.cwd !== opts.cwd) { - const cwd = getRealpath(process.env.NYC_CWD || process.cwd()); - const nycConfig = process.env.NYC_CONFIG ? JSON.parse(process.env.NYC_CONFIG) : {}; - let config = {}; - - if (Object.keys(opts).length > 0) { - // explicitly configuring options in babel - // takes precedence. - config = opts; - } else if (nycConfig.include || nycConfig.exclude) { - // nyc was configured in a parent process (keep these settings). - config = { - include: nycConfig.include, - exclude: nycConfig.exclude, - // Make sure this is true unless explicitly set to `false`. `undefined` is still `true`. - excludeNodeModules: nycConfig.excludeNodeModules !== false - }; - } else { - // fallback to loading config from key in package.json. - config = { - configKey: 'nyc', - configPath: (0, _path.dirname)(findUp.sync('package.json', { - cwd - })) - }; - } - - exclude = testExclude(Object.assign({ - cwd - }, config)); - } - - return !exclude.shouldInstrument(file); - }; -} - -var _default = (0, _helperPluginUtils.declare)(api => { - api.assertVersion(7); - const t = api.types; - const shouldSkip = makeShouldSkip(); - return { - visitor: { - Program: { - enter(path) { - this.__dv__ = null; - const realPath = getRealpath(this.file.opts.filename); - - if (shouldSkip(realPath, this.opts)) { - return; - } - - let { - inputSourceMap - } = this.opts; - - if (this.opts.useInlineSourceMaps !== false) { - if (!inputSourceMap && this.file.inputMap) { - inputSourceMap = this.file.inputMap.sourcemap; - } - } - - this.__dv__ = (0, _istanbulLibInstrument.programVisitor)(t, realPath, { - coverageVariable: '__coverage__', - inputSourceMap - }); - - this.__dv__.enter(path); - }, - - exit(path) { - if (!this.__dv__) { - return; - } - - const result = this.__dv__.exit(path); - - if (this.opts.onCover) { - this.opts.onCover(getRealpath(this.file.opts.filename), result.fileCoverage); - } - } - - } - } - }; -}); - -exports.default = _default; \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-istanbul/package.json b/packages/common/node_modules/babel-plugin-istanbul/package.json deleted file mode 100644 index 7aa5f01233..0000000000 --- a/packages/common/node_modules/babel-plugin-istanbul/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "babel-plugin-istanbul", - "version": "5.2.0", - "author": "Thai Pangsakulyanont @dtinth", - "license": "BSD-3-Clause", - "description": "A babel plugin that adds istanbul instrumentation to ES6 code", - "main": "lib/index.js", - "files": [ - "lib" - ], - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" - }, - "devDependencies": { - "@babel/cli": "^7.4.3", - "@babel/core": "^7.4.3", - "@babel/plugin-transform-modules-commonjs": "^7.4.3", - "@babel/register": "^7.4.0", - "chai": "^4.2.0", - "coveralls": "^3.0.3", - "cross-env": "^5.2.0", - "mocha": "^6.1.4", - "nyc": "^14.1.0", - "pmock": "^0.2.3", - "standard": "^12.0.1", - "standard-version": "^6.0.1" - }, - "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", - "release": "babel src --out-dir lib", - "pretest": "standard && npm run release", - "test": "cross-env NODE_ENV=test nyc --reporter=lcov --reporter=text mocha test/*.js", - "prepublish": "npm test && npm run release", - "version": "standard-version" - }, - "standard": { - "ignore": [ - "fixtures/has-inline-source-map.js" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/istanbuljs/babel-plugin-istanbul.git" - }, - "keywords": [ - "istanbul", - "babel", - "plugin", - "instrumentation" - ], - "nyc": { - "include": [ - "src/*.js", - "fixtures/should-cover.js" - ], - "require": [ - "@babel/register" - ], - "sourceMap": false, - "instrument": false - }, - "bugs": { - "url": "https://github.com/istanbuljs/babel-plugin-istanbul/issues" - }, - "homepage": "https://github.com/istanbuljs/babel-plugin-istanbul#readme", - "engines": { - "node": ">=6" - } -} diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE b/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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. diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/README.md b/packages/common/node_modules/babel-plugin-jest-hoist/README.md deleted file mode 100644 index 15c1b181d7..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-plugin-jest-hoist - -Babel plugin to hoist `jest.disableAutomock`, `jest.enableAutomock`, `jest.unmock`, `jest.mock`, calls above `import` statements. This plugin is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). - -## Installation - -```sh -$ yarn add --dev babel-plugin-jest-hoist -``` - -## Usage - -### Via `babel.config.js` (Recommended) - -```js -module.exports = { - plugins: ['jest-hoist'], -}; -``` - -### Via CLI - -```sh -$ babel --plugins jest-hoist script.js -``` - -### Via Node API - -```javascript -require('@babel/core').transform('code', { - plugins: ['jest-hoist'], -}); -``` diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts deleted file mode 100644 index d45f960901..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import type { Visitor } from '@babel/traverse'; -declare const _default: () => { - visitor: Visitor<{}>; -}; -export default _default; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map deleted file mode 100644 index bfd0567d5c..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAW,OAAO,EAAC,MAAM,iBAAiB,CAAC;;;;AAkJvD,wBA8BE"} \ No newline at end of file diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js b/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js deleted file mode 100644 index 3b7becbe9d..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/index.js +++ /dev/null @@ -1,194 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); -exports.default = void 0; - -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -// We allow `jest`, `expect`, `require`, all default Node.js globals and all -// ES2015 built-ins to be used inside of a `jest.mock` factory. -// We also allow variables prefixed with `mock` as an escape-hatch. -const WHITELISTED_IDENTIFIERS = new Set( - [ - 'Array', - 'ArrayBuffer', - 'Boolean', - 'BigInt', - 'DataView', - 'Date', - 'Error', - 'EvalError', - 'Float32Array', - 'Float64Array', - 'Function', - 'Generator', - 'GeneratorFunction', - 'Infinity', - 'Int16Array', - 'Int32Array', - 'Int8Array', - 'InternalError', - 'Intl', - 'JSON', - 'Map', - 'Math', - 'NaN', - 'Number', - 'Object', - 'Promise', - 'Proxy', - 'RangeError', - 'ReferenceError', - 'Reflect', - 'RegExp', - 'Set', - 'String', - 'Symbol', - 'SyntaxError', - 'TypeError', - 'URIError', - 'Uint16Array', - 'Uint32Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'WeakMap', - 'WeakSet', - 'arguments', - 'console', - 'expect', - 'isNaN', - 'jest', - 'parseFloat', - 'parseInt', - 'require', - 'undefined', - ...Object.getOwnPropertyNames(global) - ].sort() -); -const JEST_GLOBAL = { - name: 'jest' -}; // TODO: Should be Visitor<{ids: Set>}>, but `ReferencedIdentifier` doesn't exist - -const IDVisitor = { - ReferencedIdentifier(path) { - // @ts-ignore: passed as Visitor State - this.ids.add(path); - }, - - blacklist: ['TypeAnnotation', 'TSTypeAnnotation', 'TSTypeReference'] -}; -const FUNCTIONS = Object.create(null); - -FUNCTIONS.mock = args => { - if (args.length === 1) { - return args[0].isStringLiteral() || args[0].isLiteral(); - } else if (args.length === 2 || args.length === 3) { - const moduleFactory = args[1]; - - if (!moduleFactory.isFunction()) { - throw moduleFactory.buildCodeFrameError( - 'The second argument of `jest.mock` must be an inline function.\n', - TypeError - ); - } - - const ids = new Set(); - const parentScope = moduleFactory.parentPath.scope; // @ts-ignore: Same as above: ReferencedIdentifier doesn't exist - - moduleFactory.traverse(IDVisitor, { - ids - }); - - for (const id of ids) { - const {name} = id.node; - let found = false; - let scope = id.scope; - - while (scope !== parentScope) { - if (scope.bindings[name]) { - found = true; - break; - } - - scope = scope.parent; - } - - if (!found) { - const isAllowedIdentifier = - (scope.hasGlobal(name) && WHITELISTED_IDENTIFIERS.has(name)) || - /^mock/i.test(name) || // Allow istanbul's coverage variable to pass. - /^(?:__)?cov/.test(name); - - if (!isAllowedIdentifier) { - throw id.buildCodeFrameError( - 'The module factory of `jest.mock()` is not allowed to ' + - 'reference any out-of-scope variables.\n' + - 'Invalid variable access: ' + - name + - '\n' + - 'Whitelisted objects: ' + - Array.from(WHITELISTED_IDENTIFIERS).join(', ') + - '.\n' + - 'Note: This is a precaution to guard against uninitialized mock ' + - 'variables. If it is ensured that the mock is required lazily, ' + - 'variable names prefixed with `mock` (case insensitive) are permitted.\n', - ReferenceError - ); - } - } - } - - return true; - } - - return false; -}; - -FUNCTIONS.unmock = args => args.length === 1 && args[0].isStringLiteral(); - -FUNCTIONS.deepUnmock = args => args.length === 1 && args[0].isStringLiteral(); - -FUNCTIONS.disableAutomock = FUNCTIONS.enableAutomock = args => - args.length === 0; - -var _default = () => { - const shouldHoistExpression = expr => { - if (!expr.isCallExpression()) { - return false; - } - - const callee = expr.get('callee'); - const expressionArguments = expr.get('arguments'); // TODO: avoid type casts - the types can be arrays (is it possible to ignore that without casting?) - - const object = callee.get('object'); - const property = callee.get('property'); - return ( - property.isIdentifier() && - FUNCTIONS[property.node.name] && - (object.isIdentifier(JEST_GLOBAL) || - (callee.isMemberExpression() && shouldHoistExpression(object))) && - FUNCTIONS[property.node.name](expressionArguments) - ); - }; - - const visitor = { - ExpressionStatement(path) { - if (shouldHoistExpression(path.get('expression'))) { - // @ts-ignore: private, magical property - path.node._blockHoist = Infinity; - } - } - }; - return { - visitor - }; -}; - -exports.default = _default; diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts b/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts deleted file mode 100644 index 20186d225a..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/build/ts3.4/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ -import { Visitor } from '@babel/traverse'; -declare const _default: () => { - visitor: Visitor<{}>; -}; -export default _default; -//# sourceMappingURL=index.d.ts.map diff --git a/packages/common/node_modules/babel-plugin-jest-hoist/package.json b/packages/common/node_modules/babel-plugin-jest-hoist/package.json deleted file mode 100644 index 3b87278525..0000000000 --- a/packages/common/node_modules/babel-plugin-jest-hoist/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "babel-plugin-jest-hoist", - "version": "25.2.6", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/babel-plugin-jest-hoist" - }, - "engines": { - "node": ">= 8.3" - }, - "license": "MIT", - "main": "build/index.js", - "types": "build/index.d.ts", - "typesVersions": { - "<3.8": { - "build/*": [ - "build/ts3.4/*" - ] - } - }, - "dependencies": { - "@types/babel__traverse": "^7.0.6" - }, - "devDependencies": { - "@babel/types": "^7.3.3", - "@types/node": "*" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "43207b743df164e9e58bd483dd9167b9084da18b" -} diff --git a/packages/common/node_modules/babel-preset-jest/LICENSE b/packages/common/node_modules/babel-preset-jest/LICENSE deleted file mode 100644 index b96dcb0480..0000000000 --- a/packages/common/node_modules/babel-preset-jest/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Facebook, Inc. and its affiliates. - -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. diff --git a/packages/common/node_modules/babel-preset-jest/README.md b/packages/common/node_modules/babel-preset-jest/README.md deleted file mode 100644 index b0f085f6ab..0000000000 --- a/packages/common/node_modules/babel-preset-jest/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# babel-preset-jest - -> Babel preset for all Jest plugins. This preset is automatically included when using [babel-jest](https://github.com/facebook/jest/tree/master/packages/babel-jest). - -## Install - -```sh -$ npm install --save-dev babel-preset-jest -``` - -## Usage - -### Via `babel.config.js` (Recommended) - -```js -module.exports = { - presets: ['jest'], -}; -``` - -### Via CLI - -```sh -$ babel script.js --presets jest -``` - -### Via Node API - -```javascript -require('@babel/core').transform('code', { - presets: ['jest'], -}); -``` diff --git a/packages/common/node_modules/babel-preset-jest/index.js b/packages/common/node_modules/babel-preset-jest/index.js deleted file mode 100644 index 911bbf8d99..0000000000 --- a/packages/common/node_modules/babel-preset-jest/index.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const jestPreset = { - plugins: [require.resolve('babel-plugin-jest-hoist')], - presets: [require.resolve('babel-preset-current-node-syntax')], -}; - -// @babel/core requires us to export a function -module.exports = () => jestPreset; diff --git a/packages/common/node_modules/babel-preset-jest/package.json b/packages/common/node_modules/babel-preset-jest/package.json deleted file mode 100644 index 73ba5466be..0000000000 --- a/packages/common/node_modules/babel-preset-jest/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "babel-preset-jest", - "version": "25.3.0", - "repository": { - "type": "git", - "url": "https://github.com/facebook/jest.git", - "directory": "packages/babel-preset-jest" - }, - "license": "MIT", - "main": "index.js", - "dependencies": { - "babel-plugin-jest-hoist": "^25.2.6", - "babel-preset-current-node-syntax": "^0.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - }, - "engines": { - "node": ">= 8.3" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" -} diff --git a/packages/common/node_modules/braces/LICENSE b/packages/common/node_modules/braces/LICENSE deleted file mode 100644 index d32ab4426a..0000000000 --- a/packages/common/node_modules/braces/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2018, Jon Schlinkert. - -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. diff --git a/packages/common/node_modules/braces/README.md b/packages/common/node_modules/braces/README.md deleted file mode 100644 index f909bfba1a..0000000000 --- a/packages/common/node_modules/braces/README.md +++ /dev/null @@ -1,640 +0,0 @@ -# braces [![NPM version](https://img.shields.io/npm/v/braces.svg?style=flat)](https://www.npmjs.com/package/braces) [![NPM monthly downloads](https://img.shields.io/npm/dm/braces.svg?style=flat)](https://npmjs.org/package/braces) [![NPM total downloads](https://img.shields.io/npm/dt/braces.svg?style=flat)](https://npmjs.org/package/braces) [![Linux Build Status](https://img.shields.io/travis/micromatch/braces.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/braces) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/braces.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/braces) - -> Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed. - -Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save braces -``` - -## Why use braces? - -Brace patterns are great for matching ranges. Users (and implementors) shouldn't have to think about whether or not they will break their application (or yours) from accidentally defining an aggressive brace pattern. _Braces is the only library that offers a [solution to this problem](#performance)_. - -* **Safe(r)**: Braces isn't vulnerable to DoS attacks like [brace-expansion](https://github.com/juliangruber/brace-expansion), [minimatch](https://github.com/isaacs/minimatch) and [multimatch](https://github.com/sindresorhus/multimatch) (a different bug than the [other regex DoS bug](https://medium.com/node-security/minimatch-redos-vulnerability-590da24e6d3c#.jew0b6mpc)). -* **Accurate**: complete support for the [Bash 4.3 Brace Expansion](www.gnu.org/software/bash/) specification (passes all of the Bash braces tests) -* **[fast and performant](#benchmarks)**: Starts fast, runs fast and [scales well](#performance) as patterns increase in complexity. -* **Organized code base**: with parser and compiler that are eas(y|ier) to maintain and update when edge cases crop up. -* **Well-tested**: thousands of test assertions. Passes 100% of the [minimatch](https://github.com/isaacs/minimatch) and [brace-expansion](https://github.com/juliangruber/brace-expansion) unit tests as well (as of the writing of this). - -## Usage - -The main export is a function that takes one or more brace `patterns` and `options`. - -```js -var braces = require('braces'); -braces(pattern[, options]); -``` - -By default, braces returns an optimized regex-source string. To get an array of brace patterns, use `brace.expand()`. - -The following section explains the difference in more detail. _(If you're curious about "why" braces does this by default, see [brace matching pitfalls](#brace-matching-pitfalls)_. - -### Optimized vs. expanded braces - -**Optimized** - -By default, patterns are optimized for regex and matching: - -```js -console.log(braces('a/{x,y,z}/b')); -//=> ['a/(x|y|z)/b'] -``` - -**Expanded** - -To expand patterns the same way as Bash or [minimatch](https://github.com/isaacs/minimatch), use the [.expand](#expand) method: - -```js -console.log(braces.expand('a/{x,y,z}/b')); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] -``` - -Or use [options.expand](#optionsexpand): - -```js -console.log(braces('a/{x,y,z}/b', {expand: true})); -//=> ['a/x/b', 'a/y/b', 'a/z/b'] -``` - -## Features - -* [lists](#lists): Supports "lists": `a/{b,c}/d` => `['a/b/d', 'a/c/d']` -* [sequences](#sequences): Supports alphabetical or numerical "sequences" (ranges): `{1..3}` => `['1', '2', '3']` -* [steps](#steps): Supports "steps" or increments: `{2..10..2}` => `['2', '4', '6', '8', '10']` -* [escaping](#escaping) -* [options](#options) - -### Lists - -Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric lists: - -```js -console.log(braces('a/{foo,bar,baz}/*.js')); -//=> ['a/(foo|bar|baz)/*.js'] - -console.log(braces.expand('a/{foo,bar,baz}/*.js')); -//=> ['a/foo/*.js', 'a/bar/*.js', 'a/baz/*.js'] -``` - -### Sequences - -Uses [fill-range](https://github.com/jonschlinkert/fill-range) for expanding alphabetical or numeric ranges (bash "sequences"): - -```js -console.log(braces.expand('{1..3}')); // ['1', '2', '3'] -console.log(braces.expand('a{01..03}b')); // ['a01b', 'a02b', 'a03b'] -console.log(braces.expand('a{1..3}b')); // ['a1b', 'a2b', 'a3b'] -console.log(braces.expand('{a..c}')); // ['a', 'b', 'c'] -console.log(braces.expand('foo/{a..c}')); // ['foo/a', 'foo/b', 'foo/c'] - -// supports padded ranges -console.log(braces('a{01..03}b')); //=> [ 'a(0[1-3])b' ] -console.log(braces('a{001..300}b')); //=> [ 'a(0{2}[1-9]|0[1-9][0-9]|[12][0-9]{2}|300)b' ] -``` - -### Steps - -Steps, or increments, may be used with ranges: - -```js -console.log(braces.expand('{2..10..2}')); -//=> ['2', '4', '6', '8', '10'] - -console.log(braces('{2..10..2}')); -//=> ['(2|4|6|8|10)'] -``` - -When the [.optimize](#optimize) method is used, or [options.optimize](#optionsoptimize) is set to true, sequences are passed to [to-regex-range](https://github.com/jonschlinkert/to-regex-range) for expansion. - -### Nesting - -Brace patterns may be nested. The results of each expanded string are not sorted, and left to right order is preserved. - -**"Expanded" braces** - -```js -console.log(braces.expand('a{b,c,/{x,y}}/e')); -//=> ['ab/e', 'ac/e', 'a/x/e', 'a/y/e'] - -console.log(braces.expand('a/{x,{1..5},y}/c')); -//=> ['a/x/c', 'a/1/c', 'a/2/c', 'a/3/c', 'a/4/c', 'a/5/c', 'a/y/c'] -``` - -**"Optimized" braces** - -```js -console.log(braces('a{b,c,/{x,y}}/e')); -//=> ['a(b|c|/(x|y))/e'] - -console.log(braces('a/{x,{1..5},y}/c')); -//=> ['a/(x|([1-5])|y)/c'] -``` - -### Escaping - -**Escaping braces** - -A brace pattern will not be expanded or evaluted if _either the opening or closing brace is escaped_: - -```js -console.log(braces.expand('a\\{d,c,b}e')); -//=> ['a{d,c,b}e'] - -console.log(braces.expand('a{d,c,b\\}e')); -//=> ['a{d,c,b}e'] -``` - -**Escaping commas** - -Commas inside braces may also be escaped: - -```js -console.log(braces.expand('a{b\\,c}d')); -//=> ['a{b,c}d'] - -console.log(braces.expand('a{d\\,c,b}e')); -//=> ['ad,ce', 'abe'] -``` - -**Single items** - -Following bash conventions, a brace pattern is also not expanded when it contains a single character: - -```js -console.log(braces.expand('a{b}c')); -//=> ['a{b}c'] -``` - -## Options - -### options.maxLength - -**Type**: `Number` - -**Default**: `65,536` - -**Description**: Limit the length of the input string. Useful when the input string is generated or your application allows users to pass a string, et cetera. - -```js -console.log(braces('a/{b,c}/d', { maxLength: 3 })); //=> throws an error -``` - -### options.expand - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Generate an "expanded" brace pattern (this option is unncessary with the `.expand` method, which does the same thing). - -```js -console.log(braces('a/{b,c}/d', {expand: true})); -//=> [ 'a/b/d', 'a/c/d' ] -``` - -### options.optimize - -**Type**: `Boolean` - -**Default**: `true` - -**Description**: Enabled by default. - -```js -console.log(braces('a/{b,c}/d')); -//=> [ 'a/(b|c)/d' ] -``` - -### options.nodupes - -**Type**: `Boolean` - -**Default**: `true` - -**Description**: Duplicates are removed by default. To keep duplicates, pass `{nodupes: false}` on the options - -### options.rangeLimit - -**Type**: `Number` - -**Default**: `250` - -**Description**: When `braces.expand()` is used, or `options.expand` is true, brace patterns will automatically be [optimized](#optionsoptimize) when the difference between the range minimum and range maximum exceeds the `rangeLimit`. This is to prevent huge ranges from freezing your application. - -You can set this to any number, or change `options.rangeLimit` to `Inifinity` to disable this altogether. - -**Examples** - -```js -// pattern exceeds the "rangeLimit", so it's optimized automatically -console.log(braces.expand('{1..1000}')); -//=> ['([1-9]|[1-9][0-9]{1,2}|1000)'] - -// pattern does not exceed "rangeLimit", so it's NOT optimized -console.log(braces.expand('{1..100}')); -//=> ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100'] -``` - -### options.transform - -**Type**: `Function` - -**Default**: `undefined` - -**Description**: Customize range expansion. - -```js -var range = braces.expand('x{a..e}y', { - transform: function(str) { - return 'foo' + str; - } -}); - -console.log(range); -//=> [ 'xfooay', 'xfooby', 'xfoocy', 'xfoody', 'xfooey' ] -``` - -### options.quantifiers - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: In regular expressions, quanitifiers can be used to specify how many times a token can be repeated. For example, `a{1,3}` will match the letter `a` one to three times. - -Unfortunately, regex quantifiers happen to share the same syntax as [Bash lists](#lists) - -The `quantifiers` option tells braces to detect when [regex quantifiers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#quantifiers) are defined in the given pattern, and not to try to expand them as lists. - -**Examples** - -```js -var braces = require('braces'); -console.log(braces('a/b{1,3}/{x,y,z}')); -//=> [ 'a/b(1|3)/(x|y|z)' ] -console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true})); -//=> [ 'a/b{1,3}/(x|y|z)' ] -console.log(braces('a/b{1,3}/{x,y,z}', {quantifiers: true, expand: true})); -//=> [ 'a/b{1,3}/x', 'a/b{1,3}/y', 'a/b{1,3}/z' ] -``` - -### options.unescape - -**Type**: `Boolean` - -**Default**: `undefined` - -**Description**: Strip backslashes that were used for escaping from the result. - -## What is "brace expansion"? - -Brace expansion is a type of parameter expansion that was made popular by unix shells for generating lists of strings, as well as regex-like matching when used alongside wildcards (globs). - -In addition to "expansion", braces are also used for matching. In other words: - -* [brace expansion](#brace-expansion) is for generating new lists -* [brace matching](#brace-matching) is for filtering existing lists - -

-More about brace expansion (click to expand) - -There are two main types of brace expansion: - -1. **lists**: which are defined using comma-separated values inside curly braces: `{a,b,c}` -2. **sequences**: which are defined using a starting value and an ending value, separated by two dots: `a{1..3}b`. Optionally, a third argument may be passed to define a "step" or increment to use: `a{1..100..10}b`. These are also sometimes referred to as "ranges". - -Here are some example brace patterns to illustrate how they work: - -**Sets** - -``` -{a,b,c} => a b c -{a,b,c}{1,2} => a1 a2 b1 b2 c1 c2 -``` - -**Sequences** - -``` -{1..9} => 1 2 3 4 5 6 7 8 9 -{4..-4} => 4 3 2 1 0 -1 -2 -3 -4 -{1..20..3} => 1 4 7 10 13 16 19 -{a..j} => a b c d e f g h i j -{j..a} => j i h g f e d c b a -{a..z..3} => a d g j m p s v y -``` - -**Combination** - -Sets and sequences can be mixed together or used along with any other strings. - -``` -{a,b,c}{1..3} => a1 a2 a3 b1 b2 b3 c1 c2 c3 -foo/{a,b,c}/bar => foo/a/bar foo/b/bar foo/c/bar -``` - -The fact that braces can be "expanded" from relatively simple patterns makes them ideal for quickly generating test fixtures, file paths, and similar use cases. - -## Brace matching - -In addition to _expansion_, brace patterns are also useful for performing regular-expression-like matching. - -For example, the pattern `foo/{1..3}/bar` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -``` - -But not: - -``` -baz/1/qux -baz/2/qux -baz/3/qux -``` - -Braces can also be combined with [glob patterns](https://github.com/jonschlinkert/micromatch) to perform more advanced wildcard matching. For example, the pattern `*/{1..3}/*` would match any of following strings: - -``` -foo/1/bar -foo/2/bar -foo/3/bar -baz/1/qux -baz/2/qux -baz/3/qux -``` - -## Brace matching pitfalls - -Although brace patterns offer a user-friendly way of matching ranges or sets of strings, there are also some major disadvantages and potential risks you should be aware of. - -### tldr - -**"brace bombs"** - -* brace expansion can eat up a huge amount of processing resources -* as brace patterns increase _linearly in size_, the system resources required to expand the pattern increase exponentially -* users can accidentally (or intentially) exhaust your system's resources resulting in the equivalent of a DoS attack (bonus: no programming knowledge is required!) - -For a more detailed explanation with examples, see the [geometric complexity](#geometric-complexity) section. - -### The solution - -Jump to the [performance section](#performance) to see how Braces solves this problem in comparison to other libraries. - -### Geometric complexity - -At minimum, brace patterns with sets limited to two elements have quadradic or `O(n^2)` complexity. But the complexity of the algorithm increases exponentially as the number of sets, _and elements per set_, increases, which is `O(n^c)`. - -For example, the following sets demonstrate quadratic (`O(n^2)`) complexity: - -``` -{1,2}{3,4} => (2X2) => 13 14 23 24 -{1,2}{3,4}{5,6} => (2X2X2) => 135 136 145 146 235 236 245 246 -``` - -But add an element to a set, and we get a n-fold Cartesian product with `O(n^c)` complexity: - -``` -{1,2,3}{4,5,6}{7,8,9} => (3X3X3) => 147 148 149 157 158 159 167 168 169 247 248 - 249 257 258 259 267 268 269 347 348 349 357 - 358 359 367 368 369 -``` - -Now, imagine how this complexity grows given that each element is a n-tuple: - -``` -{1..100}{1..100} => (100X100) => 10,000 elements (38.4 kB) -{1..100}{1..100}{1..100} => (100X100X100) => 1,000,000 elements (5.76 MB) -``` - -Although these examples are clearly contrived, they demonstrate how brace patterns can quickly grow out of control. - -**More information** - -Interested in learning more about brace expansion? - -* [linuxjournal/bash-brace-expansion](http://www.linuxjournal.com/content/bash-brace-expansion) -* [rosettacode/Brace_expansion](https://rosettacode.org/wiki/Brace_expansion) -* [cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) - -
- -## Performance - -Braces is not only screaming fast, it's also more accurate the other brace expansion libraries. - -### Better algorithms - -Fortunately there is a solution to the ["brace bomb" problem](#brace-matching-pitfalls): _don't expand brace patterns into an array when they're used for matching_. - -Instead, convert the pattern into an optimized regular expression. This is easier said than done, and braces is the only library that does this currently. - -**The proof is in the numbers** - -Minimatch gets exponentially slower as patterns increase in complexity, braces does not. The following results were generated using `braces()` and `minimatch.braceExpand()`, respectively. - -| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | -| --- | --- | --- | -| `{1..9007199254740991}`[1] | `298 B` (5ms 459μs) | N/A (freezes) | -| `{1..1000000000000000}` | `41 B` (1ms 15μs) | N/A (freezes) | -| `{1..100000000000000}` | `40 B` (890μs) | N/A (freezes) | -| `{1..10000000000000}` | `39 B` (2ms 49μs) | N/A (freezes) | -| `{1..1000000000000}` | `38 B` (608μs) | N/A (freezes) | -| `{1..100000000000}` | `37 B` (397μs) | N/A (freezes) | -| `{1..10000000000}` | `35 B` (983μs) | N/A (freezes) | -| `{1..1000000000}` | `34 B` (798μs) | N/A (freezes) | -| `{1..100000000}` | `33 B` (733μs) | N/A (freezes) | -| `{1..10000000}` | `32 B` (5ms 632μs) | `78.89 MB` (16s 388ms 569μs) | -| `{1..1000000}` | `31 B` (1ms 381μs) | `6.89 MB` (1s 496ms 887μs) | -| `{1..100000}` | `30 B` (950μs) | `588.89 kB` (146ms 921μs) | -| `{1..10000}` | `29 B` (1ms 114μs) | `48.89 kB` (14ms 187μs) | -| `{1..1000}` | `28 B` (760μs) | `3.89 kB` (1ms 453μs) | -| `{1..100}` | `22 B` (345μs) | `291 B` (196μs) | -| `{1..10}` | `10 B` (533μs) | `20 B` (37μs) | -| `{1..3}` | `7 B` (190μs) | `5 B` (27μs) | - -### Faster algorithms - -When you need expansion, braces is still much faster. - -_(the following results were generated using `braces.expand()` and `minimatch.braceExpand()`, respectively)_ - -| **Pattern** | **braces** | **[minimatch](https://github.com/isaacs/minimatch)** | -| --- | --- | --- | -| `{1..10000000}` | `78.89 MB` (2s 698ms 642μs) | `78.89 MB` (18s 601ms 974μs) | -| `{1..1000000}` | `6.89 MB` (458ms 576μs) | `6.89 MB` (1s 491ms 621μs) | -| `{1..100000}` | `588.89 kB` (20ms 728μs) | `588.89 kB` (156ms 919μs) | -| `{1..10000}` | `48.89 kB` (2ms 202μs) | `48.89 kB` (13ms 641μs) | -| `{1..1000}` | `3.89 kB` (1ms 796μs) | `3.89 kB` (1ms 958μs) | -| `{1..100}` | `291 B` (424μs) | `291 B` (211μs) | -| `{1..10}` | `20 B` (487μs) | `20 B` (72μs) | -| `{1..3}` | `5 B` (166μs) | `5 B` (27μs) | - -If you'd like to run these comparisons yourself, see [test/support/generate.js](test/support/generate.js). - -## Benchmarks - -### Running benchmarks - -Install dev dependencies: - -```bash -npm i -d && npm benchmark -``` - -### Latest results - -```bash -Benchmarking: (8 of 8) - · combination-nested - · combination - · escaped - · list-basic - · list-multiple - · no-braces - · sequence-basic - · sequence-multiple - -# benchmark/fixtures/combination-nested.js (52 bytes) - brace-expansion x 4,756 ops/sec ±1.09% (86 runs sampled) - braces x 11,202,303 ops/sec ±1.06% (88 runs sampled) - minimatch x 4,816 ops/sec ±0.99% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/combination.js (51 bytes) - brace-expansion x 625 ops/sec ±0.87% (87 runs sampled) - braces x 11,031,884 ops/sec ±0.72% (90 runs sampled) - minimatch x 637 ops/sec ±0.84% (88 runs sampled) - - fastest is braces - -# benchmark/fixtures/escaped.js (44 bytes) - brace-expansion x 163,325 ops/sec ±1.05% (87 runs sampled) - braces x 10,655,071 ops/sec ±1.22% (88 runs sampled) - minimatch x 147,495 ops/sec ±0.96% (88 runs sampled) - - fastest is braces - -# benchmark/fixtures/list-basic.js (40 bytes) - brace-expansion x 99,726 ops/sec ±1.07% (83 runs sampled) - braces x 10,596,584 ops/sec ±0.98% (88 runs sampled) - minimatch x 100,069 ops/sec ±1.17% (86 runs sampled) - - fastest is braces - -# benchmark/fixtures/list-multiple.js (52 bytes) - brace-expansion x 34,348 ops/sec ±1.08% (88 runs sampled) - braces x 9,264,131 ops/sec ±1.12% (88 runs sampled) - minimatch x 34,893 ops/sec ±0.87% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/no-braces.js (48 bytes) - brace-expansion x 275,368 ops/sec ±1.18% (89 runs sampled) - braces x 9,134,677 ops/sec ±0.95% (88 runs sampled) - minimatch x 3,755,954 ops/sec ±1.13% (89 runs sampled) - - fastest is braces - -# benchmark/fixtures/sequence-basic.js (41 bytes) - brace-expansion x 5,492 ops/sec ±1.35% (87 runs sampled) - braces x 8,485,034 ops/sec ±1.28% (89 runs sampled) - minimatch x 5,341 ops/sec ±1.17% (87 runs sampled) - - fastest is braces - -# benchmark/fixtures/sequence-multiple.js (51 bytes) - brace-expansion x 116 ops/sec ±0.77% (77 runs sampled) - braces x 9,445,118 ops/sec ±1.32% (84 runs sampled) - minimatch x 109 ops/sec ±1.16% (76 runs sampled) - - fastest is braces -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [expand-brackets](https://www.npmjs.com/package/expand-brackets): Expand POSIX bracket expressions (character classes) in glob patterns. | [homepage](https://github.com/jonschlinkert/expand-brackets "Expand POSIX bracket expressions (character classes) in glob patterns.") -* [extglob](https://www.npmjs.com/package/extglob): Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob… [more](https://github.com/micromatch/extglob) | [homepage](https://github.com/micromatch/extglob "Extended glob support for JavaScript. Adds (almost) the expressive power of regular expressions to glob patterns.") -* [fill-range](https://www.npmjs.com/package/fill-range): Fill in a range of numbers or letters, optionally passing an increment or `step` to… [more](https://github.com/jonschlinkert/fill-range) | [homepage](https://github.com/jonschlinkert/fill-range "Fill in a range of numbers or letters, optionally passing an increment or `step` to use, or create a regex-compatible range with `options.toRegex`") -* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.") -* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch "Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 188 | [jonschlinkert](https://github.com/jonschlinkert) | -| 4 | [doowb](https://github.com/doowb) | -| 1 | [es128](https://github.com/es128) | -| 1 | [eush77](https://github.com/eush77) | -| 1 | [hemanth](https://github.com/hemanth) | - -### Author - -**Jon Schlinkert** - -* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert) -* [github/jonschlinkert](https://github.com/jonschlinkert) -* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) - -### License - -Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 17, 2018._ - -
-
-
    -
  1. this is the largest safe integer allowed in JavaScript. - -
  2. -
-
\ No newline at end of file diff --git a/packages/common/node_modules/braces/index.js b/packages/common/node_modules/braces/index.js deleted file mode 100644 index 048e1c2334..0000000000 --- a/packages/common/node_modules/braces/index.js +++ /dev/null @@ -1,318 +0,0 @@ -'use strict'; - -/** - * Module dependencies - */ - -var toRegex = require('to-regex'); -var unique = require('array-unique'); -var extend = require('extend-shallow'); - -/** - * Local dependencies - */ - -var compilers = require('./lib/compilers'); -var parsers = require('./lib/parsers'); -var Braces = require('./lib/braces'); -var utils = require('./lib/utils'); -var MAX_LENGTH = 1024 * 64; -var cache = {}; - -/** - * Convert the given `braces` pattern into a regex-compatible string. By default, only one string is generated for every input string. Set `options.expand` to true to return an array of patterns (similar to Bash or minimatch. Before using `options.expand`, it's recommended that you read the [performance notes](#performance)). - * - * ```js - * var braces = require('braces'); - * console.log(braces('{a,b,c}')); - * //=> ['(a|b|c)'] - * - * console.log(braces('{a,b,c}', {expand: true})); - * //=> ['a', 'b', 'c'] - * ``` - * @param {String} `str` - * @param {Object} `options` - * @return {String} - * @api public - */ - -function braces(pattern, options) { - var key = utils.createKey(String(pattern), options); - var arr = []; - - var disabled = options && options.cache === false; - if (!disabled && cache.hasOwnProperty(key)) { - return cache[key]; - } - - if (Array.isArray(pattern)) { - for (var i = 0; i < pattern.length; i++) { - arr.push.apply(arr, braces.create(pattern[i], options)); - } - } else { - arr = braces.create(pattern, options); - } - - if (options && options.nodupes === true) { - arr = unique(arr); - } - - if (!disabled) { - cache[key] = arr; - } - return arr; -} - -/** - * Expands a brace pattern into an array. This method is called by the main [braces](#braces) function when `options.expand` is true. Before using this method it's recommended that you read the [performance notes](#performance)) and advantages of using [.optimize](#optimize) instead. - * - * ```js - * var braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/b/d', 'a/c/d']; - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.expand = function(pattern, options) { - return braces.create(pattern, extend({}, options, {expand: true})); -}; - -/** - * Expands a brace pattern into a regex-compatible, optimized string. This method is called by the main [braces](#braces) function by default. - * - * ```js - * var braces = require('braces'); - * console.log(braces.expand('a/{b,c}/d')); - * //=> ['a/(b|c)/d'] - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.optimize = function(pattern, options) { - return braces.create(pattern, options); -}; - -/** - * Processes a brace pattern and returns either an expanded array (if `options.expand` is true), a highly optimized regex-compatible string. This method is called by the main [braces](#braces) function. - * - * ```js - * var braces = require('braces'); - * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}')) - * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)' - * ``` - * @param {String} `pattern` Brace pattern - * @param {Object} `options` - * @return {Array} Returns an array of expanded values. - * @api public - */ - -braces.create = function(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var maxLength = (options && options.maxLength) || MAX_LENGTH; - if (pattern.length >= maxLength) { - throw new Error('expected pattern to be less than ' + maxLength + ' characters'); - } - - function create() { - if (pattern === '' || pattern.length < 3) { - return [pattern]; - } - - if (utils.isEmptySets(pattern)) { - return []; - } - - if (utils.isQuotedString(pattern)) { - return [pattern.slice(1, -1)]; - } - - var proto = new Braces(options); - var result = !options || options.expand !== true - ? proto.optimize(pattern, options) - : proto.expand(pattern, options); - - // get the generated pattern(s) - var arr = result.output; - - // filter out empty strings if specified - if (options && options.noempty === true) { - arr = arr.filter(Boolean); - } - - // filter out duplicates if specified - if (options && options.nodupes === true) { - arr = unique(arr); - } - - Object.defineProperty(arr, 'result', { - enumerable: false, - value: result - }); - - return arr; - } - - return memoize('create', pattern, options, create); -}; - -/** - * Create a regular expression from the given string `pattern`. - * - * ```js - * var braces = require('braces'); - * - * console.log(braces.makeRe('id-{200..300}')); - * //=> /^(?:id-(20[0-9]|2[1-9][0-9]|300))$/ - * ``` - * @param {String} `pattern` The pattern to convert to regex. - * @param {Object} `options` - * @return {RegExp} - * @api public - */ - -braces.makeRe = function(pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('expected a string'); - } - - var maxLength = (options && options.maxLength) || MAX_LENGTH; - if (pattern.length >= maxLength) { - throw new Error('expected pattern to be less than ' + maxLength + ' characters'); - } - - function makeRe() { - var arr = braces(pattern, options); - var opts = extend({strictErrors: false}, options); - return toRegex(arr, opts); - } - - return memoize('makeRe', pattern, options, makeRe); -}; - -/** - * Parse the given `str` with the given `options`. - * - * ```js - * var braces = require('braces'); - * var ast = braces.parse('a/{b,c}/d'); - * console.log(ast); - * // { type: 'root', - * // errors: [], - * // input: 'a/{b,c}/d', - * // nodes: - * // [ { type: 'bos', val: '' }, - * // { type: 'text', val: 'a/' }, - * // { type: 'brace', - * // nodes: - * // [ { type: 'brace.open', val: '{' }, - * // { type: 'text', val: 'b,c' }, - * // { type: 'brace.close', val: '}' } ] }, - * // { type: 'text', val: '/d' }, - * // { type: 'eos', val: '' } ] } - * ``` - * @param {String} `pattern` Brace pattern to parse - * @param {Object} `options` - * @return {Object} Returns an AST - * @api public - */ - -braces.parse = function(pattern, options) { - var proto = new Braces(options); - return proto.parse(pattern, options); -}; - -/** - * Compile the given `ast` or string with the given `options`. - * - * ```js - * var braces = require('braces'); - * var ast = braces.parse('a/{b,c}/d'); - * console.log(braces.compile(ast)); - * // { options: { source: 'string' }, - * // state: {}, - * // compilers: - * // { eos: [Function], - * // noop: [Function], - * // bos: [Function], - * // brace: [Function], - * // 'brace.open': [Function], - * // text: [Function], - * // 'brace.close': [Function] }, - * // output: [ 'a/(b|c)/d' ], - * // ast: - * // { ... }, - * // parsingErrors: [] } - * ``` - * @param {Object|String} `ast` AST from [.parse](#parse). If a string is passed it will be parsed first. - * @param {Object} `options` - * @return {Object} Returns an object that has an `output` property with the compiled string. - * @api public - */ - -braces.compile = function(ast, options) { - var proto = new Braces(options); - return proto.compile(ast, options); -}; - -/** - * Clear the regex cache. - * - * ```js - * braces.clearCache(); - * ``` - * @api public - */ - -braces.clearCache = function() { - cache = braces.cache = {}; -}; - -/** - * Memoize a generated regex or function. A unique key is generated - * from the method name, pattern, and user-defined options. Set - * options.memoize to false to disable. - */ - -function memoize(type, pattern, options, fn) { - var key = utils.createKey(type + ':' + pattern, options); - var disabled = options && options.cache === false; - if (disabled) { - braces.clearCache(); - return fn(pattern, options); - } - - if (cache.hasOwnProperty(key)) { - return cache[key]; - } - - var res = fn(pattern, options); - cache[key] = res; - return res; -} - -/** - * Expose `Braces` constructor and methods - * @type {Function} - */ - -braces.Braces = Braces; -braces.compilers = compilers; -braces.parsers = parsers; -braces.cache = cache; - -/** - * Expose `braces` - * @type {Function} - */ - -module.exports = braces; diff --git a/packages/common/node_modules/braces/lib/utils.js b/packages/common/node_modules/braces/lib/utils.js deleted file mode 100644 index 471667171d..0000000000 --- a/packages/common/node_modules/braces/lib/utils.js +++ /dev/null @@ -1,343 +0,0 @@ -'use strict'; - -var splitString = require('split-string'); -var utils = module.exports; - -/** - * Module dependencies - */ - -utils.extend = require('extend-shallow'); -utils.flatten = require('arr-flatten'); -utils.isObject = require('isobject'); -utils.fillRange = require('fill-range'); -utils.repeat = require('repeat-element'); -utils.unique = require('array-unique'); - -utils.define = function(obj, key, val) { - Object.defineProperty(obj, key, { - writable: true, - configurable: true, - enumerable: false, - value: val - }); -}; - -/** - * Returns true if the given string contains only empty brace sets. - */ - -utils.isEmptySets = function(str) { - return /^(?:\{,\})+$/.test(str); -}; - -/** - * Returns true if the given string contains only empty brace sets. - */ - -utils.isQuotedString = function(str) { - var open = str.charAt(0); - if (open === '\'' || open === '"' || open === '`') { - return str.slice(-1) === open; - } - return false; -}; - -/** - * Create the key to use for memoization. The unique key is generated - * by iterating over the options and concatenating key-value pairs - * to the pattern string. - */ - -utils.createKey = function(pattern, options) { - var id = pattern; - if (typeof options === 'undefined') { - return id; - } - var keys = Object.keys(options); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - id += ';' + key + '=' + String(options[key]); - } - return id; -}; - -/** - * Normalize options - */ - -utils.createOptions = function(options) { - var opts = utils.extend.apply(null, arguments); - if (typeof opts.expand === 'boolean') { - opts.optimize = !opts.expand; - } - if (typeof opts.optimize === 'boolean') { - opts.expand = !opts.optimize; - } - if (opts.optimize === true) { - opts.makeRe = true; - } - return opts; -}; - -/** - * Join patterns in `a` to patterns in `b` - */ - -utils.join = function(a, b, options) { - options = options || {}; - a = utils.arrayify(a); - b = utils.arrayify(b); - - if (!a.length) return b; - if (!b.length) return a; - - var len = a.length; - var idx = -1; - var arr = []; - - while (++idx < len) { - var val = a[idx]; - if (Array.isArray(val)) { - for (var i = 0; i < val.length; i++) { - val[i] = utils.join(val[i], b, options); - } - arr.push(val); - continue; - } - - for (var j = 0; j < b.length; j++) { - var bval = b[j]; - - if (Array.isArray(bval)) { - arr.push(utils.join(val, bval, options)); - } else { - arr.push(val + bval); - } - } - } - return arr; -}; - -/** - * Split the given string on `,` if not escaped. - */ - -utils.split = function(str, options) { - var opts = utils.extend({sep: ','}, options); - if (typeof opts.keepQuotes !== 'boolean') { - opts.keepQuotes = true; - } - if (opts.unescape === false) { - opts.keepEscaping = true; - } - return splitString(str, opts, utils.escapeBrackets(opts)); -}; - -/** - * Expand ranges or sets in the given `pattern`. - * - * @param {String} `str` - * @param {Object} `options` - * @return {Object} - */ - -utils.expand = function(str, options) { - var opts = utils.extend({rangeLimit: 10000}, options); - var segs = utils.split(str, opts); - var tok = { segs: segs }; - - if (utils.isQuotedString(str)) { - return tok; - } - - if (opts.rangeLimit === true) { - opts.rangeLimit = 10000; - } - - if (segs.length > 1) { - if (opts.optimize === false) { - tok.val = segs[0]; - return tok; - } - - tok.segs = utils.stringifyArray(tok.segs); - } else if (segs.length === 1) { - var arr = str.split('..'); - - if (arr.length === 1) { - tok.val = tok.segs[tok.segs.length - 1] || tok.val || str; - tok.segs = []; - return tok; - } - - if (arr.length === 2 && arr[0] === arr[1]) { - tok.escaped = true; - tok.val = arr[0]; - tok.segs = []; - return tok; - } - - if (arr.length > 1) { - if (opts.optimize !== false) { - opts.optimize = true; - delete opts.expand; - } - - if (opts.optimize !== true) { - var min = Math.min(arr[0], arr[1]); - var max = Math.max(arr[0], arr[1]); - var step = arr[2] || 1; - - if (opts.rangeLimit !== false && ((max - min) / step >= opts.rangeLimit)) { - throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.'); - } - } - - arr.push(opts); - tok.segs = utils.fillRange.apply(null, arr); - - if (!tok.segs.length) { - tok.escaped = true; - tok.val = str; - return tok; - } - - if (opts.optimize === true) { - tok.segs = utils.stringifyArray(tok.segs); - } - - if (tok.segs === '') { - tok.val = str; - } else { - tok.val = tok.segs[0]; - } - return tok; - } - } else { - tok.val = str; - } - return tok; -}; - -/** - * Ensure commas inside brackets and parens are not split. - * @param {Object} `tok` Token from the `split-string` module - * @return {undefined} - */ - -utils.escapeBrackets = function(options) { - return function(tok) { - if (tok.escaped && tok.val === 'b') { - tok.val = '\\b'; - return; - } - - if (tok.val !== '(' && tok.val !== '[') return; - var opts = utils.extend({}, options); - var brackets = []; - var parens = []; - var stack = []; - var val = tok.val; - var str = tok.str; - var i = tok.idx - 1; - - while (++i < str.length) { - var ch = str[i]; - - if (ch === '\\') { - val += (opts.keepEscaping === false ? '' : ch) + str[++i]; - continue; - } - - if (ch === '(') { - parens.push(ch); - stack.push(ch); - } - - if (ch === '[') { - brackets.push(ch); - stack.push(ch); - } - - if (ch === ')') { - parens.pop(); - stack.pop(); - if (!stack.length) { - val += ch; - break; - } - } - - if (ch === ']') { - brackets.pop(); - stack.pop(); - if (!stack.length) { - val += ch; - break; - } - } - val += ch; - } - - tok.split = false; - tok.val = val.slice(1); - tok.idx = i; - }; -}; - -/** - * Returns true if the given string looks like a regex quantifier - * @return {Boolean} - */ - -utils.isQuantifier = function(str) { - return /^(?:[0-9]?,[0-9]|[0-9],)$/.test(str); -}; - -/** - * Cast `val` to an array. - * @param {*} `val` - */ - -utils.stringifyArray = function(arr) { - return [utils.arrayify(arr).join('|')]; -}; - -/** - * Cast `val` to an array. - * @param {*} `val` - */ - -utils.arrayify = function(arr) { - if (typeof arr === 'undefined') { - return []; - } - if (typeof arr === 'string') { - return [arr]; - } - return arr; -}; - -/** - * Returns true if the given `str` is a non-empty string - * @return {Boolean} - */ - -utils.isString = function(str) { - return str != null && typeof str === 'string'; -}; - -/** - * Get the last element from `array` - * @param {Array} `array` - * @return {*} - */ - -utils.last = function(arr, n) { - return arr[arr.length - (n || 1)]; -}; - -utils.escapeRegex = function(str) { - return str.replace(/\\?([!^*?()[\]{}+?/])/g, '\\$1'); -}; diff --git a/packages/common/node_modules/braces/package.json b/packages/common/node_modules/braces/package.json deleted file mode 100644 index 96cbb2b75c..0000000000 --- a/packages/common/node_modules/braces/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "name": "braces", - "description": "Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.", - "version": "2.3.2", - "homepage": "https://github.com/micromatch/braces", - "author": "Jon Schlinkert (https://github.com/jonschlinkert)", - "contributors": [ - "Brian Woodward (https://twitter.com/doowb)", - "Elan Shanker (https://github.com/es128)", - "Eugene Sharygin (https://github.com/eush77)", - "hemanth.hm (http://h3manth.com)", - "Jon Schlinkert (http://twitter.com/jonschlinkert)" - ], - "repository": "micromatch/braces", - "bugs": { - "url": "https://github.com/micromatch/braces/issues" - }, - "license": "MIT", - "files": [ - "index.js", - "lib" - ], - "main": "index.js", - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "mocha", - "benchmark": "node benchmark" - }, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "devDependencies": { - "ansi-cyan": "^0.1.1", - "benchmarked": "^2.0.0", - "brace-expansion": "^1.1.8", - "cross-spawn": "^5.1.0", - "gulp": "^3.9.1", - "gulp-eslint": "^4.0.0", - "gulp-format-md": "^1.0.0", - "gulp-istanbul": "^1.1.2", - "gulp-mocha": "^3.0.1", - "gulp-unused": "^0.2.1", - "is-windows": "^1.0.1", - "minimatch": "^3.0.4", - "mocha": "^3.2.0", - "noncharacters": "^1.1.0", - "text-table": "^0.2.0", - "time-diff": "^0.3.1", - "yargs-parser": "^8.0.0" - }, - "keywords": [ - "alpha", - "alphabetical", - "bash", - "brace", - "braces", - "expand", - "expansion", - "filepath", - "fill", - "fs", - "glob", - "globbing", - "letter", - "match", - "matches", - "matching", - "number", - "numerical", - "path", - "range", - "ranges", - "sh" - ], - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "lint": { - "reflinks": true - }, - "plugins": [ - "gulp-format-md" - ], - "related": { - "list": [ - "expand-brackets", - "extglob", - "fill-range", - "micromatch", - "nanomatch" - ] - } - } -} diff --git a/packages/common/node_modules/chalk/license b/packages/common/node_modules/chalk/license deleted file mode 100644 index e7af2f7710..0000000000 --- a/packages/common/node_modules/chalk/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (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. diff --git a/packages/common/node_modules/chalk/package.json b/packages/common/node_modules/chalk/package.json deleted file mode 100644 index bc324685a7..0000000000 --- a/packages/common/node_modules/chalk/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "name": "chalk", - "version": "2.4.2", - "description": "Terminal string styling done right", - "license": "MIT", - "repository": "chalk/chalk", - "engines": { - "node": ">=4" - }, - "scripts": { - "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava", - "bench": "matcha benchmark.js", - "coveralls": "nyc report --reporter=text-lcov | coveralls" - }, - "files": [ - "index.js", - "templates.js", - "types/index.d.ts", - "index.js.flow" - ], - "keywords": [ - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "str", - "ansi", - "style", - "styles", - "tty", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "devDependencies": { - "ava": "*", - "coveralls": "^3.0.0", - "execa": "^0.9.0", - "flow-bin": "^0.68.0", - "import-fresh": "^2.0.0", - "matcha": "^0.7.0", - "nyc": "^11.0.2", - "resolve-from": "^4.0.0", - "typescript": "^2.5.3", - "xo": "*" - }, - "types": "types/index.d.ts", - "xo": { - "envs": [ - "node", - "mocha" - ], - "ignores": [ - "test/_flow.js" - ] - } -} diff --git a/packages/common/node_modules/chalk/readme.md b/packages/common/node_modules/chalk/readme.md deleted file mode 100644 index d298e2c48d..0000000000 --- a/packages/common/node_modules/chalk/readme.md +++ /dev/null @@ -1,314 +0,0 @@ -

-
-
- Chalk -
-
-
-

- -> Terminal string styling done right - -[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs) - -### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0) - - - - -## Highlights - -- Expressive API -- Highly performant -- Ability to nest styles -- [256/Truecolor color support](#256-and-truecolor-color-support) -- Auto-detects color support -- Doesn't extend `String.prototype` -- Clean and focused -- Actively maintained -- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017 - - -## Install - -```console -$ npm install chalk -``` - - - - - - -## Usage - -```js -const chalk = require('chalk'); - -console.log(chalk.blue('Hello world!')); -``` - -Chalk comes with an easy to use composable API where you just chain and nest the styles you want. - -```js -const chalk = require('chalk'); -const log = console.log; - -// Combine styled and normal strings -log(chalk.blue('Hello') + ' World' + chalk.red('!')); - -// Compose multiple styles using the chainable API -log(chalk.blue.bgRed.bold('Hello world!')); - -// Pass in multiple arguments -log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz')); - -// Nest styles -log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!')); - -// Nest styles of the same type even (color, underline, background) -log(chalk.green( - 'I am a green line ' + - chalk.blue.underline.bold('with a blue substring') + - ' that becomes green again!' -)); - -// ES2015 template literal -log(` -CPU: ${chalk.red('90%')} -RAM: ${chalk.green('40%')} -DISK: ${chalk.yellow('70%')} -`); - -// ES2015 tagged template literal -log(chalk` -CPU: {red ${cpu.totalPercent}%} -RAM: {green ${ram.used / ram.total * 100}%} -DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%} -`); - -// Use RGB colors in terminal emulators that support it. -log(chalk.keyword('orange')('Yay for orange colored text!')); -log(chalk.rgb(123, 45, 67).underline('Underlined reddish color')); -log(chalk.hex('#DEADED').bold('Bold gray!')); -``` - -Easily define your own themes: - -```js -const chalk = require('chalk'); - -const error = chalk.bold.red; -const warning = chalk.keyword('orange'); - -console.log(error('Error!')); -console.log(warning('Warning!')); -``` - -Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args): - -```js -const name = 'Sindre'; -console.log(chalk.green('Hello %s'), name); -//=> 'Hello Sindre' -``` - - -## API - -### chalk.`