@immense/vue-pom-generator 1.0.61 → 1.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTES.md +13 -32
- package/class-generation/index.ts +49 -11
- package/dist/class-generation/index.d.ts.map +1 -1
- package/dist/index.cjs +108 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +108 -59
- package/dist/index.mjs.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,49 +1,30 @@
|
|
|
1
|
-
●
|
|
2
|
-
|
|
1
|
+
● ```markdown
|
|
3
2
|
## Highlights
|
|
4
3
|
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
- Audit signals now included in the manifest output for downstream consumption
|
|
8
|
-
- Enhanced compiler metadata utilities to extract role and label information from templates
|
|
9
|
-
- Comprehensive test coverage for the new accessibility audit features
|
|
4
|
+
- Fixed nested component POMs not being properly attached to their parent views
|
|
5
|
+
- Added comprehensive test coverage for nested component POM attachment
|
|
10
6
|
|
|
11
7
|
## Changes
|
|
12
8
|
|
|
13
|
-
###
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
- Extended manifest generator to include `auditSignals` for each component
|
|
18
|
-
|
|
19
|
-
### Plugin & Configuration
|
|
20
|
-
- Added `auditSeverity` option to plugin configuration (default: `"warn"`)
|
|
21
|
-
- Enhanced `ResolvedGenerationOptions` to support audit configuration
|
|
22
|
-
- Updated plugin to emit warnings when accessibility issues are detected during build
|
|
23
|
-
|
|
24
|
-
### Compiler & Metadata
|
|
25
|
-
- Improved `compiler-metadata-utils.ts` to extract `role` and `aria-label` attributes
|
|
26
|
-
- Enhanced metadata collector to capture accessibility-related attributes
|
|
27
|
-
|
|
28
|
-
### Documentation
|
|
29
|
-
- Updated README with information about the new accessibility audit feature
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
- Resolved issue where nested component POMs were not correctly associated with view classes
|
|
11
|
+
during generation
|
|
12
|
+
- Improved POM attachment logic in class generation module
|
|
30
13
|
|
|
31
14
|
### Testing
|
|
32
|
-
- Added
|
|
33
|
-
- Added tests for resolved generation options
|
|
34
|
-
- Updated existing tests to accommodate new audit functionality
|
|
15
|
+
- Added 54 lines of test coverage for class generation including nested component scenarios
|
|
35
16
|
|
|
36
17
|
## Breaking Changes
|
|
37
18
|
|
|
38
|
-
None
|
|
19
|
+
None
|
|
39
20
|
|
|
40
21
|
## Pull Requests Included
|
|
41
22
|
|
|
42
|
-
|
|
43
|
-
(https://github.com/immense/vue-pom-generator/pull/25) by @dkattan
|
|
23
|
+
None (direct commit to main)
|
|
44
24
|
|
|
45
25
|
## Testing
|
|
46
26
|
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
Tests added to validate nested component POM attachment behavior. Run test suite with `npm
|
|
28
|
+
test`.
|
|
29
|
+
```
|
|
49
30
|
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
isParameterizedPomPattern,
|
|
25
25
|
orderPomPatternParameters,
|
|
26
26
|
toCSharpPomPatternExpression,
|
|
27
|
-
toTypeScriptPomPatternExpression,
|
|
28
27
|
uniquePomStringPatterns,
|
|
29
28
|
type PomStringPattern,
|
|
30
29
|
} from "../pom-patterns";
|
|
@@ -1604,14 +1603,57 @@ function prepareViewObjectModelClass(
|
|
|
1604
1603
|
testIdAttribute,
|
|
1605
1604
|
} = options;
|
|
1606
1605
|
|
|
1606
|
+
const normalizeTrackedComponentRef = (value: string): string => {
|
|
1607
|
+
return value.endsWith(".vue") ? value.slice(0, -4) : value;
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
const resolveTrackedComponentRef = (value: string): string | null => {
|
|
1611
|
+
const normalizedValue = normalizeTrackedComponentRef(value);
|
|
1612
|
+
if (componentHierarchyMap.has(value)) {
|
|
1613
|
+
return value;
|
|
1614
|
+
}
|
|
1615
|
+
if (componentHierarchyMap.has(normalizedValue)) {
|
|
1616
|
+
return normalizedValue;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
let match: string | null = null;
|
|
1620
|
+
for (const [candidateName, candidateDeps] of componentHierarchyMap.entries()) {
|
|
1621
|
+
const normalizedCandidate = normalizeTrackedComponentRef(candidateName);
|
|
1622
|
+
const candidateBaseName = path.parse(candidateDeps.filePath).name;
|
|
1623
|
+
if (normalizedCandidate !== normalizedValue && candidateBaseName !== normalizedValue) {
|
|
1624
|
+
continue;
|
|
1625
|
+
}
|
|
1626
|
+
if (match && match !== candidateName) {
|
|
1627
|
+
return null;
|
|
1628
|
+
}
|
|
1629
|
+
match = candidateName;
|
|
1630
|
+
}
|
|
1631
|
+
return match;
|
|
1632
|
+
};
|
|
1633
|
+
|
|
1634
|
+
const rawComponentRefsForInstances = isView
|
|
1635
|
+
? (usedComponentSet?.size ? usedComponentSet : childrenComponentSet)
|
|
1636
|
+
: childrenComponentSet;
|
|
1637
|
+
const componentRefsForInstances = new Set<string>();
|
|
1638
|
+
for (const ref of rawComponentRefsForInstances) {
|
|
1639
|
+
componentRefsForInstances.add(resolveTrackedComponentRef(ref) ?? normalizeTrackedComponentRef(ref));
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1607
1642
|
const hasChildComponent = (needle: string) => {
|
|
1608
|
-
const
|
|
1609
|
-
for (const child of
|
|
1610
|
-
|
|
1643
|
+
const normalizedNeedle = normalizeTrackedComponentRef(needle);
|
|
1644
|
+
for (const child of rawComponentRefsForInstances) {
|
|
1645
|
+
const resolvedChild = resolveTrackedComponentRef(child);
|
|
1646
|
+
if (normalizeTrackedComponentRef(child) === normalizedNeedle)
|
|
1611
1647
|
return true;
|
|
1612
|
-
if (
|
|
1648
|
+
if (resolvedChild && normalizeTrackedComponentRef(resolvedChild) === normalizedNeedle)
|
|
1613
1649
|
return true;
|
|
1614
|
-
if (
|
|
1650
|
+
if (resolvedChild) {
|
|
1651
|
+
const resolvedDeps = componentHierarchyMap.get(resolvedChild);
|
|
1652
|
+
if (resolvedDeps && path.parse(resolvedDeps.filePath).name === normalizedNeedle) {
|
|
1653
|
+
return true;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
if (child === `${needle}.vue`)
|
|
1615
1657
|
return true;
|
|
1616
1658
|
}
|
|
1617
1659
|
return false;
|
|
@@ -1648,10 +1690,6 @@ function prepareViewObjectModelClass(
|
|
|
1648
1690
|
? getWidgetInstancesForView(componentName, dependencies.dataTestIdSet, customPomAvailableClassIdentifiers)
|
|
1649
1691
|
: [];
|
|
1650
1692
|
|
|
1651
|
-
const componentRefsForInstances = isView
|
|
1652
|
-
? (usedComponentSet?.size ? usedComponentSet : childrenComponentSet)
|
|
1653
|
-
: childrenComponentSet;
|
|
1654
|
-
|
|
1655
1693
|
const className = toPascalCaseLocal(componentName);
|
|
1656
1694
|
const childInstancePropertyNames = Array.from(componentRefsForInstances)
|
|
1657
1695
|
.filter(child => componentHierarchyMap.has(child) && componentHierarchyMap.get(child)?.dataTestIdSet.size)
|
|
@@ -1964,7 +2002,7 @@ function sliceNodeSource(source: string, node: { start?: number | null; end?: nu
|
|
|
1964
2002
|
|
|
1965
2003
|
function getTypeAnnotationSource(
|
|
1966
2004
|
source: string,
|
|
1967
|
-
node: { typeAnnotation?:
|
|
2005
|
+
node: { typeAnnotation?: object | null },
|
|
1968
2006
|
): string | undefined {
|
|
1969
2007
|
const rawTypeAnnotation = node.typeAnnotation;
|
|
1970
2008
|
if (!rawTypeAnnotation || typeof rawTypeAnnotation !== "object" || !("type" in rawTypeAnnotation) || rawTypeAnnotation.type !== "TSTypeAnnotation" || !("typeAnnotation" in rawTypeAnnotation)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../class-generation/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAkC,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../class-generation/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAkC,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AAwC5G,OAAO,EACL,sBAAsB,EAOvB,MAAM,UAAU,CAAC;AAQlB,OAAO,EAAE,oCAAoC,EAAE,CAAC;AA2ChD,UAAU,SAAS;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAID,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,MAAM,GAAG,oBAAoB,CAAC;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AASD,MAAM,MAAM,yBAAyB,GAAG,YAAY,GAAG,OAAO,CAAC;AAqW/D,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;;;OAeG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAE1D;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gFAAgF;IAChF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhD;;;;;OAKG;IACH,oCAAoC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAEzD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAE7C,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,uDAAuD;IACvD,aAAa,CAAC,EAAE,KAAK,CAAC,IAAI,GAAG,QAAQ,CAAC,CAAC;IAEvC;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IAEtD,6BAA6B;IAC7B,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC,2FAA2F;IAC3F,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,mDAAmD;IACnD,UAAU,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IAEnC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAClD;AAsCD,wBAAsB,aAAa,CACjC,qBAAqB,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAC1D,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,iBAAiB,EAAE,MAAM,EACzB,OAAO,GAAE,oBAAyB,iBAoGnC"}
|
package/dist/index.cjs
CHANGED
|
@@ -1802,11 +1802,12 @@ function nodeHandlerAttributeInfo(node) {
|
|
|
1802
1802
|
return null;
|
|
1803
1803
|
}
|
|
1804
1804
|
const exp = handlerDirective.exp;
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1805
|
+
const transformedSource = getVueExpressionSource(exp, "content", "compiled");
|
|
1806
|
+
const authorSource = getVueExpressionSource(exp, "loc", "content", "compiled");
|
|
1807
|
+
if (!authorSource) {
|
|
1807
1808
|
return null;
|
|
1808
1809
|
}
|
|
1809
|
-
const mergeKey = `handler:expr:${
|
|
1810
|
+
const mergeKey = `handler:expr:${authorSource}`;
|
|
1810
1811
|
const expr = tryGetDirectiveBabelAst(handlerDirective, {
|
|
1811
1812
|
preferredViews: ["content", "compiled"],
|
|
1812
1813
|
plugins: ["typescript", "jsx"],
|
|
@@ -1814,9 +1815,7 @@ function nodeHandlerAttributeInfo(node) {
|
|
|
1814
1815
|
// That is fine for Vue codegen, but our semantic-name extraction needs a normal Babel parse tree.
|
|
1815
1816
|
preferExistingAst: false
|
|
1816
1817
|
});
|
|
1817
|
-
|
|
1818
|
-
return null;
|
|
1819
|
-
}
|
|
1818
|
+
const fallbackExpr = transformedSource !== authorSource ? tryParseBabelExpressionFromSource(authorSource, ["typescript", "jsx"]) : null;
|
|
1820
1819
|
const isNodeType2 = (node2, type) => {
|
|
1821
1820
|
return node2 !== null && node2.type === type;
|
|
1822
1821
|
};
|
|
@@ -2052,59 +2051,73 @@ function nodeHandlerAttributeInfo(node) {
|
|
|
2052
2051
|
const limited = parts.slice(0, 2);
|
|
2053
2052
|
return limited.map((p) => `${toPascalCase(p.key)}${p.value}`).join("");
|
|
2054
2053
|
};
|
|
2055
|
-
const
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
const
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2054
|
+
const tryFromCallExpression = (call) => {
|
|
2055
|
+
const resolvedCall = isAwaitExpressionNode(call) ? call.argument : call;
|
|
2056
|
+
if (!isCallExpressionNode(resolvedCall)) {
|
|
2057
|
+
return null;
|
|
2058
|
+
}
|
|
2059
|
+
const name = getLastIdentifierFromMemberChain(resolvedCall.callee);
|
|
2060
|
+
if (!name) {
|
|
2061
|
+
return null;
|
|
2062
|
+
}
|
|
2063
|
+
const suffix = getStableSuffixFromCall(resolvedCall);
|
|
2064
|
+
const semanticNameHint2 = suffix ? `${toPascalCase(name)}${suffix}` : toPascalCase(name);
|
|
2065
|
+
return semanticNameHint2;
|
|
2066
|
+
};
|
|
2067
|
+
const resolveSemanticName = (candidateExpr) => {
|
|
2068
|
+
if (!candidateExpr) {
|
|
2069
|
+
return null;
|
|
2070
|
+
}
|
|
2071
|
+
const direct = getLastIdentifierFromMemberChain(candidateExpr);
|
|
2072
|
+
if (direct) {
|
|
2073
|
+
return toPascalCase(direct);
|
|
2074
|
+
}
|
|
2075
|
+
if (isArrowFunctionExpressionNode(candidateExpr)) {
|
|
2076
|
+
const body = candidateExpr.body;
|
|
2077
|
+
const directCall = tryFromCallExpression(body);
|
|
2078
|
+
if (directCall) {
|
|
2079
|
+
return directCall;
|
|
2080
|
+
}
|
|
2081
|
+
if (isAssignmentExpressionNode(body)) {
|
|
2082
|
+
const lhs = getAssignmentTargetName(body.left);
|
|
2083
|
+
if (lhs) {
|
|
2084
|
+
const rhs = stableWordFromValue(body.right);
|
|
2085
|
+
return `Set${toPascalCase(lhs)}${rhs ?? ""}`;
|
|
2086
|
+
}
|
|
2069
2087
|
}
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
const lhs = getAssignmentTargetName(body.left);
|
|
2080
|
-
if (lhs) {
|
|
2081
|
-
const rhs = stableWordFromValue(body.right);
|
|
2082
|
-
const semanticNameHint = `Set${toPascalCase(lhs)}${rhs ?? ""}`;
|
|
2083
|
-
return { semanticNameHint, mergeKey };
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
if (isBlockStatementNode(body)) {
|
|
2087
|
-
const stmts = body.body ?? [];
|
|
2088
|
-
if (stmts.length > 0) {
|
|
2089
|
-
const firstStmt = stmts[0];
|
|
2090
|
-
if (isReturnStatementNode(firstStmt)) {
|
|
2091
|
-
const fromReturn = tryFromCallExpression(firstStmt.argument ?? null);
|
|
2092
|
-
if (fromReturn) {
|
|
2093
|
-
return { semanticNameHint: fromReturn, mergeKey };
|
|
2088
|
+
if (isBlockStatementNode(body)) {
|
|
2089
|
+
const stmts = body.body ?? [];
|
|
2090
|
+
if (stmts.length > 0) {
|
|
2091
|
+
const firstStmt = stmts[0];
|
|
2092
|
+
if (isReturnStatementNode(firstStmt)) {
|
|
2093
|
+
const fromReturn = tryFromCallExpression(firstStmt.argument ?? null);
|
|
2094
|
+
if (fromReturn) {
|
|
2095
|
+
return fromReturn;
|
|
2096
|
+
}
|
|
2094
2097
|
}
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2098
|
+
if (isExpressionStatementNode(firstStmt)) {
|
|
2099
|
+
const fromExpr = tryFromCallExpression(firstStmt.expression ?? null);
|
|
2100
|
+
if (fromExpr) {
|
|
2101
|
+
return fromExpr;
|
|
2102
|
+
}
|
|
2100
2103
|
}
|
|
2101
2104
|
}
|
|
2102
2105
|
}
|
|
2106
|
+
const bodyName = getLastIdentifierFromMemberChain(body);
|
|
2107
|
+
if (bodyName) {
|
|
2108
|
+
return toPascalCase(bodyName);
|
|
2109
|
+
}
|
|
2103
2110
|
}
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2111
|
+
return null;
|
|
2112
|
+
};
|
|
2113
|
+
const isVueRefValueAccess = (candidate) => {
|
|
2114
|
+
return isMemberExpressionNode(candidate) && candidate.computed === false && isIdentifierNode2(candidate.property) && candidate.property.name === "value";
|
|
2115
|
+
};
|
|
2116
|
+
const transformedSemanticName = resolveSemanticName(expr);
|
|
2117
|
+
const fallbackSemanticName = resolveSemanticName(fallbackExpr);
|
|
2118
|
+
const semanticNameHint = fallbackSemanticName && transformedSource !== authorSource && isVueRefValueAccess(expr) ? fallbackSemanticName : transformedSemanticName ?? fallbackSemanticName;
|
|
2119
|
+
if (semanticNameHint) {
|
|
2120
|
+
return { semanticNameHint, mergeKey };
|
|
2108
2121
|
}
|
|
2109
2122
|
return null;
|
|
2110
2123
|
}
|
|
@@ -5480,14 +5493,51 @@ function prepareViewObjectModelClass(componentName, dependencies, componentHiera
|
|
|
5480
5493
|
customPomAttachments = [],
|
|
5481
5494
|
testIdAttribute
|
|
5482
5495
|
} = options;
|
|
5496
|
+
const normalizeTrackedComponentRef = (value) => {
|
|
5497
|
+
return value.endsWith(".vue") ? value.slice(0, -4) : value;
|
|
5498
|
+
};
|
|
5499
|
+
const resolveTrackedComponentRef = (value) => {
|
|
5500
|
+
const normalizedValue = normalizeTrackedComponentRef(value);
|
|
5501
|
+
if (componentHierarchyMap.has(value)) {
|
|
5502
|
+
return value;
|
|
5503
|
+
}
|
|
5504
|
+
if (componentHierarchyMap.has(normalizedValue)) {
|
|
5505
|
+
return normalizedValue;
|
|
5506
|
+
}
|
|
5507
|
+
let match = null;
|
|
5508
|
+
for (const [candidateName, candidateDeps] of componentHierarchyMap.entries()) {
|
|
5509
|
+
const normalizedCandidate = normalizeTrackedComponentRef(candidateName);
|
|
5510
|
+
const candidateBaseName = path.parse(candidateDeps.filePath).name;
|
|
5511
|
+
if (normalizedCandidate !== normalizedValue && candidateBaseName !== normalizedValue) {
|
|
5512
|
+
continue;
|
|
5513
|
+
}
|
|
5514
|
+
if (match && match !== candidateName) {
|
|
5515
|
+
return null;
|
|
5516
|
+
}
|
|
5517
|
+
match = candidateName;
|
|
5518
|
+
}
|
|
5519
|
+
return match;
|
|
5520
|
+
};
|
|
5521
|
+
const rawComponentRefsForInstances = isView ? usedComponentSet?.size ? usedComponentSet : childrenComponentSet : childrenComponentSet;
|
|
5522
|
+
const componentRefsForInstances = /* @__PURE__ */ new Set();
|
|
5523
|
+
for (const ref of rawComponentRefsForInstances) {
|
|
5524
|
+
componentRefsForInstances.add(resolveTrackedComponentRef(ref) ?? normalizeTrackedComponentRef(ref));
|
|
5525
|
+
}
|
|
5483
5526
|
const hasChildComponent = (needle) => {
|
|
5484
|
-
const
|
|
5485
|
-
for (const child of
|
|
5486
|
-
|
|
5527
|
+
const normalizedNeedle = normalizeTrackedComponentRef(needle);
|
|
5528
|
+
for (const child of rawComponentRefsForInstances) {
|
|
5529
|
+
const resolvedChild = resolveTrackedComponentRef(child);
|
|
5530
|
+
if (normalizeTrackedComponentRef(child) === normalizedNeedle)
|
|
5487
5531
|
return true;
|
|
5488
|
-
if (
|
|
5532
|
+
if (resolvedChild && normalizeTrackedComponentRef(resolvedChild) === normalizedNeedle)
|
|
5489
5533
|
return true;
|
|
5490
|
-
if (
|
|
5534
|
+
if (resolvedChild) {
|
|
5535
|
+
const resolvedDeps = componentHierarchyMap.get(resolvedChild);
|
|
5536
|
+
if (resolvedDeps && path.parse(resolvedDeps.filePath).name === normalizedNeedle) {
|
|
5537
|
+
return true;
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5540
|
+
if (child === `${needle}.vue`)
|
|
5491
5541
|
return true;
|
|
5492
5542
|
}
|
|
5493
5543
|
return false;
|
|
@@ -5511,7 +5561,6 @@ function prepareViewObjectModelClass(componentName, dependencies, componentHiera
|
|
|
5511
5561
|
methodSignatures: a.flatten ? customPomMethodSignaturesByClass.get(a.className) ?? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Map()
|
|
5512
5562
|
}));
|
|
5513
5563
|
const widgetInstances = isView ? getWidgetInstancesForView(componentName, dependencies.dataTestIdSet, customPomAvailableClassIdentifiers) : [];
|
|
5514
|
-
const componentRefsForInstances = isView ? usedComponentSet?.size ? usedComponentSet : childrenComponentSet : childrenComponentSet;
|
|
5515
5564
|
const className = toPascalCaseLocal(componentName);
|
|
5516
5565
|
const childInstancePropertyNames = Array.from(componentRefsForInstances).filter((child) => componentHierarchyMap.has(child) && componentHierarchyMap.get(child)?.dataTestIdSet.size).map((child) => child.split(".vue")[0]);
|
|
5517
5566
|
const blockedViewPassthroughMethodNames = new Set(
|