Socket
Socket
Sign inDemoInstall

@babel/types

Package Overview
Dependencies
3
Maintainers
4
Versions
155
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.22.11 to 7.22.15

2

lib/asserts/assertNode.js

@@ -7,3 +7,3 @@ "use strict";

exports.default = assertNode;
var _isNode = require("../validators/isNode");
var _isNode = require("../validators/isNode.js");
function assertNode(node) {

@@ -10,0 +10,0 @@ if (!(0, _isNode.default)(node)) {

@@ -309,4 +309,4 @@ "use strict";

exports.assertYieldExpression = assertYieldExpression;
var _is = require("../../validators/is");
var _deprecationWarning = require("../../utils/deprecationWarning");
var _is = require("../../validators/is.js");
var _deprecationWarning = require("../../utils/deprecationWarning.js");
function assert(type, node, opts) {

@@ -313,0 +313,0 @@ if (!(0, _is.default)(type, node, opts)) {

@@ -7,4 +7,4 @@ "use strict";

exports.default = createFlowUnionType;
var _generated = require("../generated");
var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates");
var _index = require("../generated/index.js");
var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates.js");
function createFlowUnionType(types) {

@@ -15,3 +15,3 @@ const flattened = (0, _removeTypeDuplicates.default)(types);

} else {
return (0, _generated.unionTypeAnnotation)(flattened);
return (0, _index.unionTypeAnnotation)(flattened);
}

@@ -18,0 +18,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

exports.default = void 0;
var _generated = require("../generated");
var _index = require("../generated/index.js");
var _default = createTypeAnnotationBasedOnTypeof;

@@ -14,17 +14,17 @@ exports.default = _default;

case "string":
return (0, _generated.stringTypeAnnotation)();
return (0, _index.stringTypeAnnotation)();
case "number":
return (0, _generated.numberTypeAnnotation)();
return (0, _index.numberTypeAnnotation)();
case "undefined":
return (0, _generated.voidTypeAnnotation)();
return (0, _index.voidTypeAnnotation)();
case "boolean":
return (0, _generated.booleanTypeAnnotation)();
return (0, _index.booleanTypeAnnotation)();
case "function":
return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Function"));
case "object":
return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Object"));
case "symbol":
return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
return (0, _index.genericTypeAnnotation)((0, _index.identifier)("Symbol"));
case "bigint":
return (0, _generated.anyTypeAnnotation)();
return (0, _index.anyTypeAnnotation)();
}

@@ -31,0 +31,0 @@ throw new Error("Invalid typeof value: " + type);

@@ -259,4 +259,4 @@ "use strict";

exports.yieldExpression = yieldExpression;
var _validateNode = require("../validateNode");
var _deprecationWarning = require("../../utils/deprecationWarning");
var _validateNode = require("../validateNode.js");
var _deprecationWarning = require("../../utils/deprecationWarning.js");
function arrayExpression(elements = []) {

@@ -263,0 +263,0 @@ return (0, _validateNode.default)({

@@ -1524,4 +1524,4 @@ "use strict";

});
var _index = require("./index");
var _index = require("./index.js");
//# sourceMappingURL=uppercase.js.map

@@ -7,4 +7,4 @@ "use strict";

exports.default = buildChildren;
var _generated = require("../../validators/generated");
var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild");
var _index = require("../../validators/generated/index.js");
var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild.js");
function buildChildren(node) {

@@ -14,8 +14,8 @@ const elements = [];

let child = node.children[i];
if ((0, _generated.isJSXText)(child)) {
if ((0, _index.isJSXText)(child)) {
(0, _cleanJSXElementLiteralChild.default)(child, elements);
continue;
}
if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression;
if ((0, _generated.isJSXEmptyExpression)(child)) continue;
if ((0, _index.isJSXExpressionContainer)(child)) child = child.expression;
if ((0, _index.isJSXEmptyExpression)(child)) continue;
elements.push(child);

@@ -22,0 +22,0 @@ }

@@ -7,8 +7,8 @@ "use strict";

exports.default = createTSUnionType;
var _generated = require("../generated");
var _removeTypeDuplicates = require("../../modifications/typescript/removeTypeDuplicates");
var _index = require("../../validators/generated/index");
var _index = require("../generated/index.js");
var _removeTypeDuplicates = require("../../modifications/typescript/removeTypeDuplicates.js");
var _index2 = require("../../validators/generated/index.js");
function createTSUnionType(typeAnnotations) {
const types = typeAnnotations.map(type => {
return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
return (0, _index2.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
});

@@ -19,3 +19,3 @@ const flattened = (0, _removeTypeDuplicates.default)(types);

} else {
return (0, _generated.tsUnionType)(flattened);
return (0, _index.tsUnionType)(flattened);
}

@@ -22,0 +22,0 @@ }

@@ -7,6 +7,6 @@ "use strict";

exports.default = validateNode;
var _validate = require("../validators/validate");
var _ = require("..");
var _validate = require("../validators/validate.js");
var _index = require("../index.js");
function validateNode(node) {
const keys = _.BUILDER_KEYS[node.type];
const keys = _index.BUILDER_KEYS[node.type];
for (const key of keys) {

@@ -13,0 +13,0 @@ (0, _validate.default)(node, key, node[key]);

@@ -7,3 +7,3 @@ "use strict";

exports.default = clone;
var _cloneNode = require("./cloneNode");
var _cloneNode = require("./cloneNode.js");
function clone(node) {

@@ -10,0 +10,0 @@ return (0, _cloneNode.default)(node, false);

@@ -7,3 +7,3 @@ "use strict";

exports.default = cloneDeep;
var _cloneNode = require("./cloneNode");
var _cloneNode = require("./cloneNode.js");
function cloneDeep(node) {

@@ -10,0 +10,0 @@ return (0, _cloneNode.default)(node);

@@ -7,3 +7,3 @@ "use strict";

exports.default = cloneDeepWithoutLoc;
var _cloneNode = require("./cloneNode");
var _cloneNode = require("./cloneNode.js");
function cloneDeepWithoutLoc(node) {

@@ -10,0 +10,0 @@ return (0, _cloneNode.default)(node, true, true);

@@ -7,4 +7,4 @@ "use strict";

exports.default = cloneNode;
var _definitions = require("../definitions");
var _generated = require("../validators/generated");
var _index = require("../definitions/index.js");
var _index2 = require("../validators/generated/index.js");
const has = Function.call.bind(Object.prototype.hasOwnProperty);

@@ -34,3 +34,3 @@ function cloneIfNode(obj, deep, withoutLoc, commentsCache) {

};
if ((0, _generated.isIdentifier)(node)) {
if ((0, _index2.isIdentifier)(node)) {
newNode.name = node.name;

@@ -43,9 +43,9 @@ if (has(node, "optional") && typeof node.optional === "boolean") {

}
} else if (!has(_definitions.NODE_FIELDS, type)) {
} else if (!has(_index.NODE_FIELDS, type)) {
throw new Error(`Unknown node type: "${type}"`);
} else {
for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
for (const field of Object.keys(_index.NODE_FIELDS[type])) {
if (has(node, field)) {
if (deep) {
newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
newNode[field] = (0, _index2.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc, commentsCache) : cloneIfNodeOrArray(node[field], true, withoutLoc, commentsCache);
} else {

@@ -52,0 +52,0 @@ newNode[field] = node[field];

@@ -7,3 +7,3 @@ "use strict";

exports.default = cloneWithoutLoc;
var _cloneNode = require("./cloneNode");
var _cloneNode = require("./cloneNode.js");
function cloneWithoutLoc(node) {

@@ -10,0 +10,0 @@ return (0, _cloneNode.default)(node, false, true);

@@ -7,3 +7,3 @@ "use strict";

exports.default = addComment;
var _addComments = require("./addComments");
var _addComments = require("./addComments.js");
function addComment(node, type, content, line) {

@@ -10,0 +10,0 @@ return (0, _addComments.default)(node, type, [{

@@ -7,3 +7,3 @@ "use strict";

exports.default = inheritInnerComments;
var _inherit = require("../utils/inherit");
var _inherit = require("../utils/inherit.js");
function inheritInnerComments(child, parent) {

@@ -10,0 +10,0 @@ (0, _inherit.default)("innerComments", child, parent);

@@ -7,3 +7,3 @@ "use strict";

exports.default = inheritLeadingComments;
var _inherit = require("../utils/inherit");
var _inherit = require("../utils/inherit.js");
function inheritLeadingComments(child, parent) {

@@ -10,0 +10,0 @@ (0, _inherit.default)("leadingComments", child, parent);

@@ -7,5 +7,5 @@ "use strict";

exports.default = inheritsComments;
var _inheritTrailingComments = require("./inheritTrailingComments");
var _inheritLeadingComments = require("./inheritLeadingComments");
var _inheritInnerComments = require("./inheritInnerComments");
var _inheritTrailingComments = require("./inheritTrailingComments.js");
var _inheritLeadingComments = require("./inheritLeadingComments.js");
var _inheritInnerComments = require("./inheritInnerComments.js");
function inheritsComments(child, parent) {

@@ -12,0 +12,0 @@ (0, _inheritTrailingComments.default)(child, parent);

@@ -7,3 +7,3 @@ "use strict";

exports.default = inheritTrailingComments;
var _inherit = require("../utils/inherit");
var _inherit = require("../utils/inherit.js");
function inheritTrailingComments(child, parent) {

@@ -10,0 +10,0 @@ (0, _inherit.default)("trailingComments", child, parent);

@@ -7,5 +7,5 @@ "use strict";

exports.default = removeComments;
var _constants = require("../constants");
var _index = require("../constants/index.js");
function removeComments(node) {
_constants.COMMENT_KEYS.forEach(key => {
_index.COMMENT_KEYS.forEach(key => {
node[key] = null;

@@ -12,0 +12,0 @@ });

@@ -7,100 +7,100 @@ "use strict";

exports.WHILE_TYPES = exports.USERWHITESPACABLE_TYPES = exports.UNARYLIKE_TYPES = exports.TYPESCRIPT_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.TSENTITYNAME_TYPES = exports.TSBASETYPE_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.STANDARDIZED_TYPES = exports.SCOPABLE_TYPES = exports.PUREISH_TYPES = exports.PROPERTY_TYPES = exports.PRIVATE_TYPES = exports.PATTERN_TYPES = exports.PATTERNLIKE_TYPES = exports.OBJECTMEMBER_TYPES = exports.MODULESPECIFIER_TYPES = exports.MODULEDECLARATION_TYPES = exports.MISCELLANEOUS_TYPES = exports.METHOD_TYPES = exports.LVAL_TYPES = exports.LOOP_TYPES = exports.LITERAL_TYPES = exports.JSX_TYPES = exports.IMPORTOREXPORTDECLARATION_TYPES = exports.IMMUTABLE_TYPES = exports.FUNCTION_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FOR_TYPES = exports.FORXSTATEMENT_TYPES = exports.FLOW_TYPES = exports.FLOWTYPE_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.EXPRESSION_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.DECLARATION_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.CLASS_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.BINARY_TYPES = exports.ACCESSOR_TYPES = void 0;
var _definitions = require("../../definitions");
const STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"];
var _index = require("../../definitions/index.js");
const STANDARDIZED_TYPES = _index.FLIPPED_ALIAS_KEYS["Standardized"];
exports.STANDARDIZED_TYPES = STANDARDIZED_TYPES;
const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
const EXPRESSION_TYPES = _index.FLIPPED_ALIAS_KEYS["Expression"];
exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
const BINARY_TYPES = _index.FLIPPED_ALIAS_KEYS["Binary"];
exports.BINARY_TYPES = BINARY_TYPES;
const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
const SCOPABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Scopable"];
exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
const BLOCKPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["BlockParent"];
exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
const BLOCK_TYPES = _index.FLIPPED_ALIAS_KEYS["Block"];
exports.BLOCK_TYPES = BLOCK_TYPES;
const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
const STATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["Statement"];
exports.STATEMENT_TYPES = STATEMENT_TYPES;
const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
const TERMINATORLESS_TYPES = _index.FLIPPED_ALIAS_KEYS["Terminatorless"];
exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
const COMPLETIONSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["CompletionStatement"];
exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
const CONDITIONAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Conditional"];
exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
const LOOP_TYPES = _index.FLIPPED_ALIAS_KEYS["Loop"];
exports.LOOP_TYPES = LOOP_TYPES;
const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
const WHILE_TYPES = _index.FLIPPED_ALIAS_KEYS["While"];
exports.WHILE_TYPES = WHILE_TYPES;
const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
const EXPRESSIONWRAPPER_TYPES = _index.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
const FOR_TYPES = _index.FLIPPED_ALIAS_KEYS["For"];
exports.FOR_TYPES = FOR_TYPES;
const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
const FORXSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["ForXStatement"];
exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
const FUNCTION_TYPES = _index.FLIPPED_ALIAS_KEYS["Function"];
exports.FUNCTION_TYPES = FUNCTION_TYPES;
const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
const FUNCTIONPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["FunctionParent"];
exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
const PUREISH_TYPES = _index.FLIPPED_ALIAS_KEYS["Pureish"];
exports.PUREISH_TYPES = PUREISH_TYPES;
const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
const DECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["Declaration"];
exports.DECLARATION_TYPES = DECLARATION_TYPES;
const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
const PATTERNLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["PatternLike"];
exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
const LVAL_TYPES = _index.FLIPPED_ALIAS_KEYS["LVal"];
exports.LVAL_TYPES = LVAL_TYPES;
const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
const TSENTITYNAME_TYPES = _index.FLIPPED_ALIAS_KEYS["TSEntityName"];
exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
const LITERAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Literal"];
exports.LITERAL_TYPES = LITERAL_TYPES;
const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
const IMMUTABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Immutable"];
exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
const USERWHITESPACABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
const METHOD_TYPES = _index.FLIPPED_ALIAS_KEYS["Method"];
exports.METHOD_TYPES = METHOD_TYPES;
const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
const OBJECTMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["ObjectMember"];
exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
const PROPERTY_TYPES = _index.FLIPPED_ALIAS_KEYS["Property"];
exports.PROPERTY_TYPES = PROPERTY_TYPES;
const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
const UNARYLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["UnaryLike"];
exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
const PATTERN_TYPES = _index.FLIPPED_ALIAS_KEYS["Pattern"];
exports.PATTERN_TYPES = PATTERN_TYPES;
const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
const CLASS_TYPES = _index.FLIPPED_ALIAS_KEYS["Class"];
exports.CLASS_TYPES = CLASS_TYPES;
const IMPORTOREXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ImportOrExportDeclaration"];
const IMPORTOREXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ImportOrExportDeclaration"];
exports.IMPORTOREXPORTDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;
const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
const EXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
const MODULESPECIFIER_TYPES = _index.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
const ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"];
const ACCESSOR_TYPES = _index.FLIPPED_ALIAS_KEYS["Accessor"];
exports.ACCESSOR_TYPES = ACCESSOR_TYPES;
const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
const PRIVATE_TYPES = _index.FLIPPED_ALIAS_KEYS["Private"];
exports.PRIVATE_TYPES = PRIVATE_TYPES;
const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
const FLOW_TYPES = _index.FLIPPED_ALIAS_KEYS["Flow"];
exports.FLOW_TYPES = FLOW_TYPES;
const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
const FLOWTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowType"];
exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
const FLOWBASEANNOTATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
const FLOWDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
const FLOWPREDICATE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowPredicate"];
exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
const ENUMBODY_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumBody"];
exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
const ENUMMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumMember"];
exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
const JSX_TYPES = _index.FLIPPED_ALIAS_KEYS["JSX"];
exports.JSX_TYPES = JSX_TYPES;
const MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"];
const MISCELLANEOUS_TYPES = _index.FLIPPED_ALIAS_KEYS["Miscellaneous"];
exports.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES;
const TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"];
const TYPESCRIPT_TYPES = _index.FLIPPED_ALIAS_KEYS["TypeScript"];
exports.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES;
const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
const TSTYPEELEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["TSTypeElement"];
exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
const TSTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSType"];
exports.TSTYPE_TYPES = TSTYPE_TYPES;
const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
const TSBASETYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSBaseType"];
exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES;

@@ -107,0 +107,0 @@ const MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;

@@ -7,3 +7,3 @@ "use strict";

exports.default = ensureBlock;
var _toBlock = require("./toBlock");
var _toBlock = require("./toBlock.js");
function ensureBlock(node, key = "body") {

@@ -10,0 +10,0 @@ const result = (0, _toBlock.default)(node[key], node);

@@ -7,6 +7,6 @@ "use strict";

exports.default = gatherSequenceExpressions;
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers");
var _generated = require("../validators/generated");
var _generated2 = require("../builders/generated");
var _cloneNode = require("../clone/cloneNode");
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers.js");
var _index = require("../validators/generated/index.js");
var _index2 = require("../builders/generated/index.js");
var _cloneNode = require("../clone/cloneNode.js");
function gatherSequenceExpressions(nodes, scope, declars) {

@@ -16,10 +16,10 @@ const exprs = [];

for (const node of nodes) {
if (!(0, _generated.isEmptyStatement)(node)) {
if (!(0, _index.isEmptyStatement)(node)) {
ensureLastUndefined = false;
}
if ((0, _generated.isExpression)(node)) {
if ((0, _index.isExpression)(node)) {
exprs.push(node);
} else if ((0, _generated.isExpressionStatement)(node)) {
} else if ((0, _index.isExpressionStatement)(node)) {
exprs.push(node.expression);
} else if ((0, _generated.isVariableDeclaration)(node)) {
} else if ((0, _index.isVariableDeclaration)(node)) {
if (node.kind !== "var") return;

@@ -35,16 +35,16 @@ for (const declar of node.declarations) {

if (declar.init) {
exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
exprs.push((0, _index2.assignmentExpression)("=", declar.id, declar.init));
}
}
ensureLastUndefined = true;
} else if ((0, _generated.isIfStatement)(node)) {
} else if ((0, _index.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)) {
exprs.push((0, _index2.conditionalExpression)(node.test, consequent, alternate));
} else if ((0, _index.isBlockStatement)(node)) {
const body = gatherSequenceExpressions(node.body, scope, declars);
if (!body) return;
exprs.push(body);
} else if ((0, _generated.isEmptyStatement)(node)) {
} else if ((0, _index.isEmptyStatement)(node)) {
if (nodes.indexOf(node) === 0) {

@@ -63,3 +63,3 @@ ensureLastUndefined = true;

} else {
return (0, _generated2.sequenceExpression)(exprs);
return (0, _index2.sequenceExpression)(exprs);
}

@@ -66,0 +66,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

exports.default = toBindingIdentifierName;
var _toIdentifier = require("./toIdentifier");
var _toIdentifier = require("./toIdentifier.js");
function toBindingIdentifierName(name) {

@@ -10,0 +10,0 @@ name = (0, _toIdentifier.default)(name);

@@ -7,17 +7,17 @@ "use strict";

exports.default = toBlock;
var _generated = require("../validators/generated");
var _generated2 = require("../builders/generated");
var _index = require("../validators/generated/index.js");
var _index2 = require("../builders/generated/index.js");
function toBlock(node, parent) {
if ((0, _generated.isBlockStatement)(node)) {
if ((0, _index.isBlockStatement)(node)) {
return node;
}
let blockNodes = [];
if ((0, _generated.isEmptyStatement)(node)) {
if ((0, _index.isEmptyStatement)(node)) {
blockNodes = [];
} else {
if (!(0, _generated.isStatement)(node)) {
if ((0, _generated.isFunction)(parent)) {
node = (0, _generated2.returnStatement)(node);
if (!(0, _index.isStatement)(node)) {
if ((0, _index.isFunction)(parent)) {
node = (0, _index2.returnStatement)(node);
} else {
node = (0, _generated2.expressionStatement)(node);
node = (0, _index2.expressionStatement)(node);
}

@@ -27,5 +27,5 @@ }

}
return (0, _generated2.blockStatement)(blockNodes);
return (0, _index2.blockStatement)(blockNodes);
}
//# sourceMappingURL=toBlock.js.map

@@ -7,6 +7,6 @@ "use strict";

exports.default = toComputedKey;
var _generated = require("../validators/generated");
var _generated2 = require("../builders/generated");
var _index = require("../validators/generated/index.js");
var _index2 = require("../builders/generated/index.js");
function toComputedKey(node, key = node.key || node.property) {
if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name);
if (!node.computed && (0, _index.isIdentifier)(key)) key = (0, _index2.stringLiteral)(key.name);
return key;

@@ -13,0 +13,0 @@ }

@@ -7,18 +7,18 @@ "use strict";

exports.default = void 0;
var _generated = require("../validators/generated");
var _index = require("../validators/generated/index.js");
var _default = toExpression;
exports.default = _default;
function toExpression(node) {
if ((0, _generated.isExpressionStatement)(node)) {
if ((0, _index.isExpressionStatement)(node)) {
node = node.expression;
}
if ((0, _generated.isExpression)(node)) {
if ((0, _index.isExpression)(node)) {
return node;
}
if ((0, _generated.isClass)(node)) {
if ((0, _index.isClass)(node)) {
node.type = "ClassExpression";
} else if ((0, _generated.isFunction)(node)) {
} else if ((0, _index.isFunction)(node)) {
node.type = "FunctionExpression";
}
if (!(0, _generated.isExpression)(node)) {
if (!(0, _index.isExpression)(node)) {
throw new Error(`cannot turn ${node.type} to an expression`);

@@ -25,0 +25,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

exports.default = toIdentifier;
var _isValidIdentifier = require("../validators/isValidIdentifier");
var _isValidIdentifier = require("../validators/isValidIdentifier.js");
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");

@@ -10,0 +10,0 @@ function toIdentifier(input) {

@@ -7,5 +7,5 @@ "use strict";

exports.default = toKeyAlias;
var _generated = require("../validators/generated");
var _cloneNode = require("../clone/cloneNode");
var _removePropertiesDeep = require("../modifications/removePropertiesDeep");
var _index = require("../validators/generated/index.js");
var _cloneNode = require("../clone/cloneNode.js");
var _removePropertiesDeep = require("../modifications/removePropertiesDeep.js");
function toKeyAlias(node, key = node.key) {

@@ -15,5 +15,5 @@ let alias;

return toKeyAlias.increment() + "";
} else if ((0, _generated.isIdentifier)(key)) {
} else if ((0, _index.isIdentifier)(key)) {
alias = key.name;
} else if ((0, _generated.isStringLiteral)(key)) {
} else if ((0, _index.isStringLiteral)(key)) {
alias = JSON.stringify(key.value);

@@ -20,0 +20,0 @@ } else {

@@ -7,3 +7,3 @@ "use strict";

exports.default = toSequenceExpression;
var _gatherSequenceExpressions = require("./gatherSequenceExpressions");
var _gatherSequenceExpressions = require("./gatherSequenceExpressions.js");
function toSequenceExpression(nodes, scope) {

@@ -10,0 +10,0 @@ if (!(nodes != null && nodes.length)) return;

@@ -7,8 +7,8 @@ "use strict";

exports.default = void 0;
var _generated = require("../validators/generated");
var _generated2 = require("../builders/generated");
var _index = require("../validators/generated/index.js");
var _index2 = require("../builders/generated/index.js");
var _default = toStatement;
exports.default = _default;
function toStatement(node, ignore) {
if ((0, _generated.isStatement)(node)) {
if ((0, _index.isStatement)(node)) {
return node;

@@ -18,10 +18,10 @@ }

let newType;
if ((0, _generated.isClass)(node)) {
if ((0, _index.isClass)(node)) {
mustHaveId = true;
newType = "ClassDeclaration";
} else if ((0, _generated.isFunction)(node)) {
} else if ((0, _index.isFunction)(node)) {
mustHaveId = true;
newType = "FunctionDeclaration";
} else if ((0, _generated.isAssignmentExpression)(node)) {
return (0, _generated2.expressionStatement)(node);
} else if ((0, _index.isAssignmentExpression)(node)) {
return (0, _index2.expressionStatement)(node);
}

@@ -28,0 +28,0 @@ if (mustHaveId && !node.id) {

@@ -7,4 +7,4 @@ "use strict";

exports.default = void 0;
var _isValidIdentifier = require("../validators/isValidIdentifier");
var _generated = require("../builders/generated");
var _isValidIdentifier = require("../validators/isValidIdentifier.js");
var _index = require("../builders/generated/index.js");
var _default = valueToNode;

@@ -25,12 +25,12 @@ exports.default = _default;

if (value === undefined) {
return (0, _generated.identifier)("undefined");
return (0, _index.identifier)("undefined");
}
if (value === true || value === false) {
return (0, _generated.booleanLiteral)(value);
return (0, _index.booleanLiteral)(value);
}
if (value === null) {
return (0, _generated.nullLiteral)();
return (0, _index.nullLiteral)();
}
if (typeof value === "string") {
return (0, _generated.stringLiteral)(value);
return (0, _index.stringLiteral)(value);
}

@@ -40,14 +40,14 @@ if (typeof value === "number") {

if (Number.isFinite(value)) {
result = (0, _generated.numericLiteral)(Math.abs(value));
result = (0, _index.numericLiteral)(Math.abs(value));
} else {
let numerator;
if (Number.isNaN(value)) {
numerator = (0, _generated.numericLiteral)(0);
numerator = (0, _index.numericLiteral)(0);
} else {
numerator = (0, _generated.numericLiteral)(1);
numerator = (0, _index.numericLiteral)(1);
}
result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
result = (0, _index.binaryExpression)("/", numerator, (0, _index.numericLiteral)(0));
}
if (value < 0 || Object.is(value, -0)) {
result = (0, _generated.unaryExpression)("-", result);
result = (0, _index.unaryExpression)("-", result);
}

@@ -59,6 +59,6 @@ return result;

const flags = value.toString().match(/\/([a-z]+|)$/)[1];
return (0, _generated.regExpLiteral)(pattern, flags);
return (0, _index.regExpLiteral)(pattern, flags);
}
if (Array.isArray(value)) {
return (0, _generated.arrayExpression)(value.map(valueToNode));
return (0, _index.arrayExpression)(value.map(valueToNode));
}

@@ -70,9 +70,9 @@ if (isPlainObject(value)) {

if ((0, _isValidIdentifier.default)(key)) {
nodeKey = (0, _generated.identifier)(key);
nodeKey = (0, _index.identifier)(key);
} else {
nodeKey = (0, _generated.stringLiteral)(key);
nodeKey = (0, _index.stringLiteral)(key);
}
props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
props.push((0, _index.objectProperty)(nodeKey, valueToNode(value[key])));
}
return (0, _generated.objectExpression)(props);
return (0, _index.objectExpression)(props);
}

@@ -79,0 +79,0 @@ throw new Error("don't know how to turn this value into a node");

@@ -7,8 +7,8 @@ "use strict";

exports.patternLikeCommon = exports.functionTypeAnnotationCommon = exports.functionDeclarationCommon = exports.functionCommon = exports.classMethodOrPropertyCommon = exports.classMethodOrDeclareMethodCommon = void 0;
var _is = require("../validators/is");
var _isValidIdentifier = require("../validators/isValidIdentifier");
var _is = require("../validators/is.js");
var _isValidIdentifier = require("../validators/isValidIdentifier.js");
var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
var _helperStringParser = require("@babel/helper-string-parser");
var _constants = require("../constants");
var _utils = require("./utils");
var _index = require("../constants/index.js");
var _utils = require("./utils.js");
const defineType = (0, _utils.defineAliasedType)("Standardized");

@@ -32,3 +32,3 @@ defineType("ArrayExpression", {

}
const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
const identifier = (0, _utils.assertOneOf)(..._index.ASSIGNMENT_OPERATORS);
const pattern = (0, _utils.assertOneOf)("=");

@@ -56,3 +56,3 @@ return function (node, key, val) {

operator: {
validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
validate: (0, _utils.assertOneOf)(..._index.BINARY_OPERATORS)
},

@@ -507,3 +507,3 @@ left: {

operator: {
validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
validate: (0, _utils.assertOneOf)(..._index.LOGICAL_OPERATORS)
},

@@ -793,3 +793,3 @@ left: {

operator: {
validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
validate: (0, _utils.assertOneOf)(..._index.UNARY_OPERATORS)
}

@@ -810,3 +810,3 @@ },

operator: {
validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
validate: (0, _utils.assertOneOf)(..._index.UPDATE_OPERATORS)
}

@@ -813,0 +813,0 @@ },

"use strict";
var _utils = require("./utils");
var _utils = require("./utils.js");
(0, _utils.default)("ArgumentPlaceholder", {});

@@ -5,0 +5,0 @@ (0, _utils.default)("BindExpression", {

"use strict";
var _utils = require("./utils");
var _utils = require("./utils.js");
const defineType = (0, _utils.defineAliasedType)("Flow");

@@ -5,0 +5,0 @@ const defineInterfaceishType = name => {

@@ -74,11 +74,11 @@ "use strict";

var _toFastProperties = require("to-fast-properties");
require("./core");
require("./flow");
require("./jsx");
require("./misc");
require("./experimental");
require("./typescript");
var _utils = require("./utils");
var _placeholders = require("./placeholders");
var _deprecatedAliases = require("./deprecated-aliases");
require("./core.js");
require("./flow.js");
require("./jsx.js");
require("./misc.js");
require("./experimental.js");
require("./typescript.js");
var _utils = require("./utils.js");
var _placeholders = require("./placeholders.js");
var _deprecatedAliases = require("./deprecated-aliases.js");
Object.keys(_deprecatedAliases.DEPRECATED_ALIASES).forEach(deprecatedAlias => {

@@ -85,0 +85,0 @@ _utils.FLIPPED_ALIAS_KEYS[deprecatedAlias] = _utils.FLIPPED_ALIAS_KEYS[_deprecatedAliases.DEPRECATED_ALIASES[deprecatedAlias]];

"use strict";
var _utils = require("./utils");
var _utils = require("./utils.js");
const defineType = (0, _utils.defineAliasedType)("JSX");

@@ -5,0 +5,0 @@ defineType("JSXAttribute", {

"use strict";
var _utils = require("./utils");
var _placeholders = require("./placeholders");
var _utils = require("./utils.js");
var _placeholders = require("./placeholders.js");
const defineType = (0, _utils.defineAliasedType)("Miscellaneous");

@@ -6,0 +6,0 @@ {

@@ -7,3 +7,3 @@ "use strict";

exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
var _utils = require("./utils");
var _utils = require("./utils.js");
const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];

@@ -10,0 +10,0 @@ exports.PLACEHOLDERS = PLACEHOLDERS;

"use strict";
var _utils = require("./utils");
var _core = require("./core");
var _is = require("../validators/is");
var _utils = require("./utils.js");
var _core = require("./core.js");
var _is = require("../validators/is.js");
const defineType = (0, _utils.defineAliasedType)("TypeScript");

@@ -7,0 +7,0 @@ const bool = (0, _utils.assertValueType)("boolean");

@@ -25,4 +25,4 @@ "use strict";

exports.validateType = validateType;
var _is = require("../validators/is");
var _validate = require("../validators/validate");
var _is = require("../validators/is.js");
var _validate = require("../validators/validate.js");
const VISITOR_KEYS = {};

@@ -29,0 +29,0 @@ exports.VISITOR_KEYS = VISITOR_KEYS;

@@ -409,34 +409,34 @@ "use strict";

});
var _isReactComponent = require("./validators/react/isReactComponent");
var _isCompatTag = require("./validators/react/isCompatTag");
var _buildChildren = require("./builders/react/buildChildren");
var _assertNode = require("./asserts/assertNode");
var _generated = require("./asserts/generated");
Object.keys(_generated).forEach(function (key) {
var _isReactComponent = require("./validators/react/isReactComponent.js");
var _isCompatTag = require("./validators/react/isCompatTag.js");
var _buildChildren = require("./builders/react/buildChildren.js");
var _assertNode = require("./asserts/assertNode.js");
var _index = require("./asserts/generated/index.js");
Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _generated[key]) return;
if (key in exports && exports[key] === _index[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _generated[key];
return _index[key];
}
});
});
var _createTypeAnnotationBasedOnTypeof = require("./builders/flow/createTypeAnnotationBasedOnTypeof");
var _createFlowUnionType = require("./builders/flow/createFlowUnionType");
var _createTSUnionType = require("./builders/typescript/createTSUnionType");
var _generated2 = require("./builders/generated");
Object.keys(_generated2).forEach(function (key) {
var _createTypeAnnotationBasedOnTypeof = require("./builders/flow/createTypeAnnotationBasedOnTypeof.js");
var _createFlowUnionType = require("./builders/flow/createFlowUnionType.js");
var _createTSUnionType = require("./builders/typescript/createTSUnionType.js");
var _index2 = require("./builders/generated/index.js");
Object.keys(_index2).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _generated2[key]) return;
if (key in exports && exports[key] === _index2[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _generated2[key];
return _index2[key];
}
});
});
var _uppercase = require("./builders/generated/uppercase");
var _uppercase = require("./builders/generated/uppercase.js");
Object.keys(_uppercase).forEach(function (key) {

@@ -453,69 +453,69 @@ if (key === "default" || key === "__esModule") return;

});
var _cloneNode = require("./clone/cloneNode");
var _clone = require("./clone/clone");
var _cloneDeep = require("./clone/cloneDeep");
var _cloneDeepWithoutLoc = require("./clone/cloneDeepWithoutLoc");
var _cloneWithoutLoc = require("./clone/cloneWithoutLoc");
var _addComment = require("./comments/addComment");
var _addComments = require("./comments/addComments");
var _inheritInnerComments = require("./comments/inheritInnerComments");
var _inheritLeadingComments = require("./comments/inheritLeadingComments");
var _inheritsComments = require("./comments/inheritsComments");
var _inheritTrailingComments = require("./comments/inheritTrailingComments");
var _removeComments = require("./comments/removeComments");
var _generated3 = require("./constants/generated");
Object.keys(_generated3).forEach(function (key) {
var _cloneNode = require("./clone/cloneNode.js");
var _clone = require("./clone/clone.js");
var _cloneDeep = require("./clone/cloneDeep.js");
var _cloneDeepWithoutLoc = require("./clone/cloneDeepWithoutLoc.js");
var _cloneWithoutLoc = require("./clone/cloneWithoutLoc.js");
var _addComment = require("./comments/addComment.js");
var _addComments = require("./comments/addComments.js");
var _inheritInnerComments = require("./comments/inheritInnerComments.js");
var _inheritLeadingComments = require("./comments/inheritLeadingComments.js");
var _inheritsComments = require("./comments/inheritsComments.js");
var _inheritTrailingComments = require("./comments/inheritTrailingComments.js");
var _removeComments = require("./comments/removeComments.js");
var _index3 = require("./constants/generated/index.js");
Object.keys(_index3).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _generated3[key]) return;
if (key in exports && exports[key] === _index3[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _generated3[key];
return _index3[key];
}
});
});
var _constants = require("./constants");
Object.keys(_constants).forEach(function (key) {
var _index4 = require("./constants/index.js");
Object.keys(_index4).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _constants[key]) return;
if (key in exports && exports[key] === _index4[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _constants[key];
return _index4[key];
}
});
});
var _ensureBlock = require("./converters/ensureBlock");
var _toBindingIdentifierName = require("./converters/toBindingIdentifierName");
var _toBlock = require("./converters/toBlock");
var _toComputedKey = require("./converters/toComputedKey");
var _toExpression = require("./converters/toExpression");
var _toIdentifier = require("./converters/toIdentifier");
var _toKeyAlias = require("./converters/toKeyAlias");
var _toSequenceExpression = require("./converters/toSequenceExpression");
var _toStatement = require("./converters/toStatement");
var _valueToNode = require("./converters/valueToNode");
var _definitions = require("./definitions");
Object.keys(_definitions).forEach(function (key) {
var _ensureBlock = require("./converters/ensureBlock.js");
var _toBindingIdentifierName = require("./converters/toBindingIdentifierName.js");
var _toBlock = require("./converters/toBlock.js");
var _toComputedKey = require("./converters/toComputedKey.js");
var _toExpression = require("./converters/toExpression.js");
var _toIdentifier = require("./converters/toIdentifier.js");
var _toKeyAlias = require("./converters/toKeyAlias.js");
var _toSequenceExpression = require("./converters/toSequenceExpression.js");
var _toStatement = require("./converters/toStatement.js");
var _valueToNode = require("./converters/valueToNode.js");
var _index5 = require("./definitions/index.js");
Object.keys(_index5).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _definitions[key]) return;
if (key in exports && exports[key] === _index5[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _definitions[key];
return _index5[key];
}
});
});
var _appendToMemberExpression = require("./modifications/appendToMemberExpression");
var _inherits = require("./modifications/inherits");
var _prependToMemberExpression = require("./modifications/prependToMemberExpression");
var _removeProperties = require("./modifications/removeProperties");
var _removePropertiesDeep = require("./modifications/removePropertiesDeep");
var _removeTypeDuplicates = require("./modifications/flow/removeTypeDuplicates");
var _getBindingIdentifiers = require("./retrievers/getBindingIdentifiers");
var _getOuterBindingIdentifiers = require("./retrievers/getOuterBindingIdentifiers");
var _traverse = require("./traverse/traverse");
var _appendToMemberExpression = require("./modifications/appendToMemberExpression.js");
var _inherits = require("./modifications/inherits.js");
var _prependToMemberExpression = require("./modifications/prependToMemberExpression.js");
var _removeProperties = require("./modifications/removeProperties.js");
var _removePropertiesDeep = require("./modifications/removePropertiesDeep.js");
var _removeTypeDuplicates = require("./modifications/flow/removeTypeDuplicates.js");
var _getBindingIdentifiers = require("./retrievers/getBindingIdentifiers.js");
var _getOuterBindingIdentifiers = require("./retrievers/getOuterBindingIdentifiers.js");
var _traverse = require("./traverse/traverse.js");
Object.keys(_traverse).forEach(function (key) {

@@ -532,35 +532,35 @@ if (key === "default" || key === "__esModule") return;

});
var _traverseFast = require("./traverse/traverseFast");
var _shallowEqual = require("./utils/shallowEqual");
var _is = require("./validators/is");
var _isBinding = require("./validators/isBinding");
var _isBlockScoped = require("./validators/isBlockScoped");
var _isImmutable = require("./validators/isImmutable");
var _isLet = require("./validators/isLet");
var _isNode = require("./validators/isNode");
var _isNodesEquivalent = require("./validators/isNodesEquivalent");
var _isPlaceholderType = require("./validators/isPlaceholderType");
var _isReferenced = require("./validators/isReferenced");
var _isScope = require("./validators/isScope");
var _isSpecifierDefault = require("./validators/isSpecifierDefault");
var _isType = require("./validators/isType");
var _isValidES3Identifier = require("./validators/isValidES3Identifier");
var _isValidIdentifier = require("./validators/isValidIdentifier");
var _isVar = require("./validators/isVar");
var _matchesPattern = require("./validators/matchesPattern");
var _validate = require("./validators/validate");
var _buildMatchMemberExpression = require("./validators/buildMatchMemberExpression");
var _generated4 = require("./validators/generated");
Object.keys(_generated4).forEach(function (key) {
var _traverseFast = require("./traverse/traverseFast.js");
var _shallowEqual = require("./utils/shallowEqual.js");
var _is = require("./validators/is.js");
var _isBinding = require("./validators/isBinding.js");
var _isBlockScoped = require("./validators/isBlockScoped.js");
var _isImmutable = require("./validators/isImmutable.js");
var _isLet = require("./validators/isLet.js");
var _isNode = require("./validators/isNode.js");
var _isNodesEquivalent = require("./validators/isNodesEquivalent.js");
var _isPlaceholderType = require("./validators/isPlaceholderType.js");
var _isReferenced = require("./validators/isReferenced.js");
var _isScope = require("./validators/isScope.js");
var _isSpecifierDefault = require("./validators/isSpecifierDefault.js");
var _isType = require("./validators/isType.js");
var _isValidES3Identifier = require("./validators/isValidES3Identifier.js");
var _isValidIdentifier = require("./validators/isValidIdentifier.js");
var _isVar = require("./validators/isVar.js");
var _matchesPattern = require("./validators/matchesPattern.js");
var _validate = require("./validators/validate.js");
var _buildMatchMemberExpression = require("./validators/buildMatchMemberExpression.js");
var _index6 = require("./validators/generated/index.js");
Object.keys(_index6).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _generated4[key]) return;
if (key in exports && exports[key] === _index6[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _generated4[key];
return _index6[key];
}
});
});
var _deprecationWarning = require("./utils/deprecationWarning");
var _deprecationWarning = require("./utils/deprecationWarning.js");
const react = {

@@ -567,0 +567,0 @@ isReactComponent: _isReactComponent.default,

@@ -7,5 +7,5 @@ "use strict";

exports.default = appendToMemberExpression;
var _generated = require("../builders/generated");
var _index = require("../builders/generated/index.js");
function appendToMemberExpression(member, append, computed = false) {
member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
member.object = (0, _index.memberExpression)(member.object, member.property, member.computed);
member.property = append;

@@ -12,0 +12,0 @@ member.computed = !!computed;

@@ -7,5 +7,5 @@ "use strict";

exports.default = removeTypeDuplicates;
var _generated = require("../../validators/generated");
var _index = require("../../validators/generated/index.js");
function getQualifiedName(node) {
return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
return (0, _index.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
}

@@ -24,10 +24,10 @@ function removeTypeDuplicates(nodesIn) {

}
if ((0, _generated.isAnyTypeAnnotation)(node)) {
if ((0, _index.isAnyTypeAnnotation)(node)) {
return [node];
}
if ((0, _generated.isFlowBaseAnnotation)(node)) {
if ((0, _index.isFlowBaseAnnotation)(node)) {
bases.set(node.type, node);
continue;
}
if ((0, _generated.isUnionTypeAnnotation)(node)) {
if ((0, _index.isUnionTypeAnnotation)(node)) {
if (!typeGroups.has(node.types)) {

@@ -39,3 +39,3 @@ nodes.push(...node.types);

}
if ((0, _generated.isGenericTypeAnnotation)(node)) {
if ((0, _index.isGenericTypeAnnotation)(node)) {
const name = getQualifiedName(node.id);

@@ -42,0 +42,0 @@ if (generics.has(name)) {

@@ -7,7 +7,7 @@ "use strict";

exports.default = inherits;
var _constants = require("../constants");
var _inheritsComments = require("../comments/inheritsComments");
var _index = require("../constants/index.js");
var _inheritsComments = require("../comments/inheritsComments.js");
function inherits(child, parent) {
if (!child || !parent) return child;
for (const key of _constants.INHERIT_KEYS.optional) {
for (const key of _index.INHERIT_KEYS.optional) {
if (child[key] == null) {

@@ -22,3 +22,3 @@ child[key] = parent[key];

}
for (const key of _constants.INHERIT_KEYS.force) {
for (const key of _index.INHERIT_KEYS.force) {
child[key] = parent[key];

@@ -25,0 +25,0 @@ }

@@ -7,9 +7,9 @@ "use strict";

exports.default = prependToMemberExpression;
var _generated = require("../builders/generated");
var _ = require("..");
var _index = require("../builders/generated/index.js");
var _index2 = require("../index.js");
function prependToMemberExpression(member, prepend) {
if ((0, _.isSuper)(member.object)) {
if ((0, _index2.isSuper)(member.object)) {
throw new Error("Cannot prepend node to super property access (`super.foo`).");
}
member.object = (0, _generated.memberExpression)(prepend, member.object);
member.object = (0, _index.memberExpression)(prepend, member.object);
return member;

@@ -16,0 +16,0 @@ }

@@ -7,5 +7,5 @@ "use strict";

exports.default = removeProperties;
var _constants = require("../constants");
var _index = require("../constants/index.js");
const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
const CLEAR_KEYS_PLUS_COMMENTS = [..._constants.COMMENT_KEYS, "comments", ...CLEAR_KEYS];
const CLEAR_KEYS_PLUS_COMMENTS = [..._index.COMMENT_KEYS, "comments", ...CLEAR_KEYS];
function removeProperties(node, opts = {}) {

@@ -12,0 +12,0 @@ const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;

@@ -7,4 +7,4 @@ "use strict";

exports.default = removePropertiesDeep;
var _traverseFast = require("../traverse/traverseFast");
var _removeProperties = require("./removeProperties");
var _traverseFast = require("../traverse/traverseFast.js");
var _removeProperties = require("./removeProperties.js");
function removePropertiesDeep(tree, opts) {

@@ -11,0 +11,0 @@ (0, _traverseFast.default)(tree, _removeProperties.default, opts);

@@ -7,5 +7,5 @@ "use strict";

exports.default = removeTypeDuplicates;
var _generated = require("../../validators/generated");
var _index = require("../../validators/generated/index.js");
function getQualifiedName(node) {
return (0, _generated.isIdentifier)(node) ? node.name : `${node.right.name}.${getQualifiedName(node.left)}`;
return (0, _index.isIdentifier)(node) ? node.name : `${node.right.name}.${getQualifiedName(node.left)}`;
}

@@ -24,10 +24,10 @@ function removeTypeDuplicates(nodesIn) {

}
if ((0, _generated.isTSAnyKeyword)(node)) {
if ((0, _index.isTSAnyKeyword)(node)) {
return [node];
}
if ((0, _generated.isTSBaseType)(node)) {
if ((0, _index.isTSBaseType)(node)) {
bases.set(node.type, node);
continue;
}
if ((0, _generated.isTSUnionType)(node)) {
if ((0, _index.isTSUnionType)(node)) {
if (!typeGroups.has(node.types)) {

@@ -39,3 +39,3 @@ nodes.push(...node.types);

}
if ((0, _generated.isTSTypeReference)(node) && node.typeParameters) {
if ((0, _index.isTSTypeReference)(node) && node.typeParameters) {
const name = getQualifiedName(node.typeName);

@@ -42,0 +42,0 @@ if (generics.has(name)) {

@@ -7,3 +7,3 @@ "use strict";

exports.default = getBindingIdentifiers;
var _generated = require("../validators/generated");
var _index = require("../validators/generated/index.js");
function getBindingIdentifiers(node, duplicates, outerOnly) {

@@ -16,3 +16,3 @@ const search = [].concat(node);

const keys = getBindingIdentifiers.keys[id.type];
if ((0, _generated.isIdentifier)(id)) {
if ((0, _index.isIdentifier)(id)) {
if (duplicates) {

@@ -26,4 +26,4 @@ const _ids = ids[id.name] = ids[id.name] || [];

}
if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
if ((0, _generated.isDeclaration)(id.declaration)) {
if ((0, _index.isExportDeclaration)(id) && !(0, _index.isExportAllDeclaration)(id)) {
if ((0, _index.isDeclaration)(id.declaration)) {
search.push(id.declaration);

@@ -34,7 +34,7 @@ }

if (outerOnly) {
if ((0, _generated.isFunctionDeclaration)(id)) {
if ((0, _index.isFunctionDeclaration)(id)) {
search.push(id.id);
continue;
}
if ((0, _generated.isFunctionExpression)(id)) {
if ((0, _index.isFunctionExpression)(id)) {
continue;

@@ -41,0 +41,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

exports.default = void 0;
var _getBindingIdentifiers = require("./getBindingIdentifiers");
var _getBindingIdentifiers = require("./getBindingIdentifiers.js");
var _default = getOuterBindingIdentifiers;

@@ -10,0 +10,0 @@ exports.default = _default;

@@ -7,3 +7,3 @@ "use strict";

exports.default = traverse;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function traverse(node, handlers, state) {

@@ -22,3 +22,3 @@ if (typeof handlers === "function") {

function traverseSimpleImpl(node, enter, exit, state, ancestors) {
const keys = _definitions.VISITOR_KEYS[node.type];
const keys = _index.VISITOR_KEYS[node.type];
if (!keys) return;

@@ -25,0 +25,0 @@ if (enter) enter(node, ancestors, state);

@@ -7,6 +7,6 @@ "use strict";

exports.default = traverseFast;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function traverseFast(node, enter, opts) {
if (!node) return;
const keys = _definitions.VISITOR_KEYS[node.type];
const keys = _index.VISITOR_KEYS[node.type];
if (!keys) return;

@@ -13,0 +13,0 @@ opts = opts || {};

@@ -7,4 +7,4 @@ "use strict";

exports.default = cleanJSXElementLiteralChild;
var _generated = require("../../builders/generated");
var _ = require("../..");
var _index = require("../../builders/generated/index.js");
var _index2 = require("../../index.js");
function cleanJSXElementLiteralChild(child, args) {

@@ -38,5 +38,5 @@ const lines = child.value.split(/\r\n|\n|\r/);

}
if (str) args.push((0, _.inherits)((0, _generated.stringLiteral)(str), child));
if (str) args.push((0, _index2.inherits)((0, _index.stringLiteral)(str), child));
}
//# sourceMappingURL=cleanJSXElementLiteralChild.js.map

@@ -7,3 +7,3 @@ "use strict";

exports.default = buildMatchMemberExpression;
var _matchesPattern = require("./matchesPattern");
var _matchesPattern = require("./matchesPattern.js");
function buildMatchMemberExpression(match, allowPartial) {

@@ -10,0 +10,0 @@ const parts = match.split(".");

@@ -7,6 +7,6 @@ "use strict";

exports.default = is;
var _shallowEqual = require("../utils/shallowEqual");
var _isType = require("./isType");
var _isPlaceholderType = require("./isPlaceholderType");
var _definitions = require("../definitions");
var _shallowEqual = require("../utils/shallowEqual.js");
var _isType = require("./isType.js");
var _isPlaceholderType = require("./isPlaceholderType.js");
var _index = require("../definitions/index.js");
function is(type, node, opts) {

@@ -16,3 +16,3 @@ if (!node) return false;

if (!matches) {
if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
if (!opts && node.type === "Placeholder" && type in _index.FLIPPED_ALIAS_KEYS) {
return (0, _isPlaceholderType.default)(node.expectedNode, type);

@@ -19,0 +19,0 @@ }

@@ -7,3 +7,3 @@ "use strict";

exports.default = isBinding;
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers");
var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers.js");
function isBinding(node, parent, grandparent) {

@@ -10,0 +10,0 @@ if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {

@@ -7,8 +7,8 @@ "use strict";

exports.default = isBlockScoped;
var _generated = require("./generated");
var _isLet = require("./isLet");
var _index = require("./generated/index.js");
var _isLet = require("./isLet.js");
function isBlockScoped(node) {
return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
return (0, _index.isFunctionDeclaration)(node) || (0, _index.isClassDeclaration)(node) || (0, _isLet.default)(node);
}
//# sourceMappingURL=isBlockScoped.js.map

@@ -7,7 +7,7 @@ "use strict";

exports.default = isImmutable;
var _isType = require("./isType");
var _generated = require("./generated");
var _isType = require("./isType.js");
var _index = require("./generated/index.js");
function isImmutable(node) {
if ((0, _isType.default)(node.type, "Immutable")) return true;
if ((0, _generated.isIdentifier)(node)) {
if ((0, _index.isIdentifier)(node)) {
if (node.name === "undefined") {

@@ -14,0 +14,0 @@ return true;

@@ -7,8 +7,8 @@ "use strict";

exports.default = isLet;
var _generated = require("./generated");
var _constants = require("../constants");
var _index = require("./generated/index.js");
var _index2 = require("../constants/index.js");
function isLet(node) {
return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
return (0, _index.isVariableDeclaration)(node) && (node.kind !== "var" || node[_index2.BLOCK_SCOPED_SYMBOL]);
}
//# sourceMappingURL=isLet.js.map

@@ -7,7 +7,7 @@ "use strict";

exports.default = isNode;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function isNode(node) {
return !!(node && _definitions.VISITOR_KEYS[node.type]);
return !!(node && _index.VISITOR_KEYS[node.type]);
}
//# sourceMappingURL=isNode.js.map

@@ -7,3 +7,3 @@ "use strict";

exports.default = isNodesEquivalent;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function isNodesEquivalent(a, b) {

@@ -16,4 +16,4 @@ if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {

}
const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
const visitorKeys = _definitions.VISITOR_KEYS[a.type];
const fields = Object.keys(_index.NODE_FIELDS[a.type] || a.type);
const visitorKeys = _index.VISITOR_KEYS[a.type];
for (const field of fields) {

@@ -20,0 +20,0 @@ const val_a = a[field];

@@ -7,6 +7,6 @@ "use strict";

exports.default = isPlaceholderType;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function isPlaceholderType(placeholderType, targetType) {
if (placeholderType === targetType) return true;
const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
const aliases = _index.PLACEHOLDERS_ALIAS[placeholderType];
if (aliases) {

@@ -13,0 +13,0 @@ for (const alias of aliases) {

@@ -7,13 +7,13 @@ "use strict";

exports.default = isScope;
var _generated = require("./generated");
var _index = require("./generated/index.js");
function isScope(node, parent) {
if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
if ((0, _index.isBlockStatement)(node) && ((0, _index.isFunction)(parent) || (0, _index.isCatchClause)(parent))) {
return false;
}
if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
if ((0, _index.isPattern)(node) && ((0, _index.isFunction)(parent) || (0, _index.isCatchClause)(parent))) {
return true;
}
return (0, _generated.isScopable)(node);
return (0, _index.isScopable)(node);
}
//# sourceMappingURL=isScope.js.map

@@ -7,5 +7,5 @@ "use strict";

exports.default = isSpecifierDefault;
var _generated = require("./generated");
var _index = require("./generated/index.js");
function isSpecifierDefault(specifier) {
return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
return (0, _index.isImportDefaultSpecifier)(specifier) || (0, _index.isIdentifier)(specifier.imported || specifier.exported, {
name: "default"

@@ -12,0 +12,0 @@ });

@@ -7,8 +7,8 @@ "use strict";

exports.default = isType;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function isType(nodeType, targetType) {
if (nodeType === targetType) return true;
if (nodeType == null) return false;
if (_definitions.ALIAS_KEYS[targetType]) return false;
const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
if (_index.ALIAS_KEYS[targetType]) return false;
const aliases = _index.FLIPPED_ALIAS_KEYS[targetType];
if (aliases) {

@@ -15,0 +15,0 @@ if (aliases[0] === nodeType) return true;

@@ -7,3 +7,3 @@ "use strict";

exports.default = isValidES3Identifier;
var _isValidIdentifier = require("./isValidIdentifier");
var _isValidIdentifier = require("./isValidIdentifier.js");
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"]);

@@ -10,0 +10,0 @@ function isValidES3Identifier(name) {

@@ -7,10 +7,10 @@ "use strict";

exports.default = isVar;
var _generated = require("./generated");
var _constants = require("../constants");
var _index = require("./generated/index.js");
var _index2 = require("../constants/index.js");
function isVar(node) {
return (0, _generated.isVariableDeclaration)(node, {
return (0, _index.isVariableDeclaration)(node, {
kind: "var"
}) && !node[_constants.BLOCK_SCOPED_SYMBOL];
}) && !node[_index2.BLOCK_SCOPED_SYMBOL];
}
//# sourceMappingURL=isVar.js.map

@@ -7,9 +7,9 @@ "use strict";

exports.default = matchesPattern;
var _generated = require("./generated");
var _index = require("./generated/index.js");
function matchesPattern(member, match, allowPartial) {
if (!(0, _generated.isMemberExpression)(member)) return false;
if (!(0, _index.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) {
for (node = member; (0, _index.isMemberExpression)(node); node = node.object) {
nodes.push(node.property);

@@ -23,7 +23,7 @@ }

let value;
if ((0, _generated.isIdentifier)(node)) {
if ((0, _index.isIdentifier)(node)) {
value = node.name;
} else if ((0, _generated.isStringLiteral)(node)) {
} else if ((0, _index.isStringLiteral)(node)) {
value = node.value;
} else if ((0, _generated.isThisExpression)(node)) {
} else if ((0, _index.isThisExpression)(node)) {
value = "this";

@@ -30,0 +30,0 @@ } else {

@@ -7,3 +7,3 @@ "use strict";

exports.default = void 0;
var _buildMatchMemberExpression = require("../buildMatchMemberExpression");
var _buildMatchMemberExpression = require("../buildMatchMemberExpression.js");
const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");

@@ -10,0 +10,0 @@ var _default = isReactComponent;

@@ -9,6 +9,6 @@ "use strict";

exports.validateField = validateField;
var _definitions = require("../definitions");
var _index = require("../definitions/index.js");
function validate(node, key, val) {
if (!node) return;
const fields = _definitions.NODE_FIELDS[node.type];
const fields = _index.NODE_FIELDS[node.type];
if (!fields) return;

@@ -26,3 +26,3 @@ const field = fields[key];

if (val == null) return;
const validate = _definitions.NODE_PARENT_VALIDATIONS[val.type];
const validate = _index.NODE_PARENT_VALIDATIONS[val.type];
if (!validate) return;

@@ -29,0 +29,0 @@ validate(node, key, val);

{
"name": "@babel/types",
"version": "7.22.11",
"version": "7.22.15",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",

@@ -28,8 +28,8 @@ "author": "The Babel Team (https://babel.dev/team)",

"@babel/helper-string-parser": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.15",
"to-fast-properties": "^2.0.0"
},
"devDependencies": {
"@babel/generator": "^7.22.10",
"@babel/parser": "^7.22.11",
"@babel/generator": "^7.22.15",
"@babel/parser": "^7.22.15",
"glob": "^7.2.0"

@@ -36,0 +36,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc