Files
klz-cables.com/.pnpm-store/v10/files/05/f529a61e6719771a68c17074a50ad98d9cc0cdcafeaa9c78f5c45d44e577bae63542fdf5323537be1c2ea68c94649b8698bed643348e5ff18e901956e7abc7
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
12 KiB
Plaintext

{"version":3,"names":["_t","require","isBinding","isBlockScoped","nodeIsBlockScoped","isExportDeclaration","isExpression","nodeIsExpression","isFlow","nodeIsFlow","isForStatement","isForXStatement","isIdentifier","isImportDeclaration","isImportSpecifier","isJSXIdentifier","isJSXMemberExpression","isMemberExpression","isRestElement","nodeIsRestElement","isReferenced","nodeIsReferenced","isScope","nodeIsScope","isStatement","nodeIsStatement","isVar","nodeIsVar","isVariableDeclaration","react","isForOfStatement","isCompatTag","isReferencedIdentifier","opts","node","parent","parentPath","name","isReferencedMemberExpression","isBindingIdentifier","grandparent","left","init","isUser","_this$node","loc","isGenerated","isPure","constantsOnly","scope","importKind","exportKind","isRestProperty","_this$parentPath","isObjectPattern","isSpreadProperty","_this$parentPath2","isObjectExpression","isForAwaitStatement","await","exports","isExistentialTypeParam","Error","isNumericLiteralTypeAnnotation"],"sources":["../../../src/path/lib/virtual-types-validator.ts"],"sourcesContent":["import type NodePath from \"../index.ts\";\nimport {\n isBinding,\n isBlockScoped as nodeIsBlockScoped,\n isExportDeclaration,\n isExpression as nodeIsExpression,\n isFlow as nodeIsFlow,\n isForStatement,\n isForXStatement,\n isIdentifier,\n isImportDeclaration,\n isImportSpecifier,\n isJSXIdentifier,\n isJSXMemberExpression,\n isMemberExpression,\n isRestElement as nodeIsRestElement,\n isReferenced as nodeIsReferenced,\n isScope as nodeIsScope,\n isStatement as nodeIsStatement,\n isVar as nodeIsVar,\n isVariableDeclaration,\n react,\n isForOfStatement,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nconst { isCompatTag } = react;\nimport type { VirtualTypeAliases } from \"./virtual-types.ts\";\n\ntype Options<Obj> = Partial<{\n [Prop in Exclude<keyof Obj, \"type\">]: Obj[Prop] extends t.Node\n ? t.Node\n : Obj[Prop] extends t.Node[]\n ? t.Node[]\n : Obj[Prop];\n}>;\n\nexport interface VirtualTypeNodePathValidators {\n isBindingIdentifier(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"BindingIdentifier\"]>;\n isBlockScoped(this: NodePath<t.Node | null>): boolean;\n /**\n * @deprecated\n */\n isExistentialTypeParam(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"ExistentialTypeParam\"]>;\n isExpression(this: NodePath<t.Node | null>): this is NodePath<t.Expression>;\n isFlow(this: NodePath<t.Node | null>): this is NodePath<t.Flow>;\n isForAwaitStatement(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"ForAwaitStatement\"]>;\n isGenerated(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"Generated\"]>;\n /**\n * @deprecated\n */\n isNumericLiteralTypeAnnotation(this: NodePath<t.Node | null>): void;\n isPure(): boolean;\n isReferenced(): boolean;\n isReferencedIdentifier<\n Opts extends Options<VirtualTypeAliases[\"ReferencedIdentifier\"]>,\n >(\n this: NodePath<t.Node | null>,\n opts?: Opts,\n ): this is NodePath<VirtualTypeAliases[\"ReferencedIdentifier\"] & Opts>;\n isReferencedMemberExpression(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"ReferencedMemberExpression\"]>;\n isRestProperty(\n this: NodePath<t.Node | null>,\n ): this is NodePath<t.RestProperty>;\n isScope(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"Scope\"]>;\n isSpreadProperty(\n this: NodePath<t.Node | null>,\n ): this is NodePath<t.SpreadProperty>;\n isStatement(this: NodePath<t.Node | null>): this is NodePath<t.Statement>;\n isUser(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"User\"]>;\n isVar(\n this: NodePath<t.Node | null>,\n ): this is NodePath<VirtualTypeAliases[\"Var\"]>;\n}\n\nexport function isReferencedIdentifier(\n this: NodePath<t.Node | null>,\n opts?: Options<VirtualTypeAliases[\"ReferencedIdentifier\"]>,\n): boolean {\n const { node, parent } = this;\n if (isIdentifier(node, opts)) {\n return nodeIsReferenced(node, parent, this.parentPath.parent);\n } else if (isJSXIdentifier(node, opts)) {\n if (!isJSXMemberExpression(parent) && isCompatTag(node.name)) return false;\n return nodeIsReferenced(node, parent, this.parentPath.parent);\n } else {\n // not a JSXIdentifier or an Identifier\n return false;\n }\n}\n\nexport function isReferencedMemberExpression(\n this: NodePath<t.Node | null>,\n): boolean {\n const { node, parent } = this;\n return isMemberExpression(node) && nodeIsReferenced(node, parent);\n}\n\nexport function isBindingIdentifier(this: NodePath<t.Node | null>): boolean {\n const { node, parent } = this;\n const grandparent = this.parentPath.parent;\n return isIdentifier(node) && isBinding(node, parent, grandparent);\n}\n\nexport function isStatement(this: NodePath<t.Node | null>): boolean {\n const { node, parent } = this;\n if (nodeIsStatement(node)) {\n if (isVariableDeclaration(node)) {\n if (isForXStatement(parent, { left: node })) return false;\n if (isForStatement(parent, { init: node })) return false;\n }\n\n return true;\n } else {\n return false;\n }\n}\n\nexport function isExpression(this: NodePath<t.Node | null>): boolean {\n if (this.isIdentifier()) {\n return this.isReferencedIdentifier();\n } else {\n return nodeIsExpression(this.node);\n }\n}\n\nexport function isScope(this: NodePath<t.Node | null>): boolean {\n return nodeIsScope(this.node, this.parent);\n}\n\nexport function isReferenced(this: NodePath<t.Node | null>): boolean {\n return nodeIsReferenced(this.node, this.parent);\n}\n\nexport function isBlockScoped(this: NodePath<t.Node | null>): boolean {\n return nodeIsBlockScoped(this.node);\n}\n\nexport function isVar(this: NodePath<t.Node | null>): boolean {\n return nodeIsVar(this.node);\n}\n\nexport function isUser(this: NodePath<t.Node | null>): boolean {\n return !!this.node?.loc;\n}\n\nexport function isGenerated(this: NodePath<t.Node | null>): boolean {\n return !this.isUser();\n}\n\nexport function isPure(\n this: NodePath<t.Node | null>,\n constantsOnly?: boolean,\n): boolean {\n return this.scope.isPure(this.node, constantsOnly);\n}\n\nexport function isFlow(this: NodePath<t.Node | null>): boolean {\n const { node } = this;\n if (nodeIsFlow(node)) {\n return true;\n } else if (isImportDeclaration(node)) {\n return node.importKind === \"type\" || node.importKind === \"typeof\";\n } else if (isExportDeclaration(node)) {\n return node.exportKind === \"type\";\n } else if (isImportSpecifier(node)) {\n return node.importKind === \"type\" || node.importKind === \"typeof\";\n } else {\n return false;\n }\n}\n\n// TODO: 7.0 Backwards Compat\nexport function isRestProperty(this: NodePath<t.Node | null>): boolean {\n return nodeIsRestElement(this.node) && this.parentPath?.isObjectPattern();\n}\n\nexport function isSpreadProperty(this: NodePath<t.Node | null>): boolean {\n return nodeIsRestElement(this.node) && this.parentPath?.isObjectExpression();\n}\n\nexport function isForAwaitStatement(this: NodePath<t.Node | null>): boolean {\n return isForOfStatement(this.node, { await: true });\n}\n\nif (!process.env.BABEL_8_BREAKING && !USE_ESM) {\n // eslint-disable-next-line no-restricted-globals\n exports.isExistentialTypeParam = function isExistentialTypeParam(\n this: NodePath,\n ): void {\n throw new Error(\n \"`path.isExistentialTypeParam` has been renamed to `path.isExistsTypeAnnotation()` in Babel 7.\",\n );\n };\n\n // eslint-disable-next-line no-restricted-globals\n exports.isNumericLiteralTypeAnnotation =\n function isNumericLiteralTypeAnnotation(this: NodePath): void {\n throw new Error(\n \"`path.isNumericLiteralTypeAnnotation()` has been renamed to `path.isNumberLiteralTypeAnnotation()` in Babel 7.\",\n );\n };\n}\n"],"mapp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