@component-compass/reference-graph 0.1.15 → 0.1.18
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/dist/engine/argument-map.d.ts +4 -0
- package/dist/engine/argument-map.js +7 -4
- package/dist/engine/argument-map.js.map +1 -1
- package/dist/engine/assert-never.d.ts +7 -0
- package/dist/engine/assert-never.js +10 -0
- package/dist/engine/assert-never.js.map +1 -0
- package/dist/engine/component-shape.d.ts +38 -0
- package/dist/engine/component-shape.js +177 -0
- package/dist/engine/component-shape.js.map +1 -0
- package/dist/engine/helper-callers.d.ts +31 -29
- package/dist/engine/helper-callers.js +98 -78
- package/dist/engine/helper-callers.js.map +1 -1
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +239 -99
- package/dist/engine/index.js.map +1 -1
- package/dist/engine/library-stubs.d.ts +2 -0
- package/dist/engine/library-stubs.js +42 -0
- package/dist/engine/library-stubs.js.map +1 -0
- package/dist/engine/member-identity.d.ts +24 -4
- package/dist/engine/member-identity.js +28 -4
- package/dist/engine/member-identity.js.map +1 -1
- package/dist/engine/registry.d.ts +74 -0
- package/dist/engine/registry.js +226 -0
- package/dist/engine/registry.js.map +1 -0
- package/dist/engine/resolve-reference.js +7 -0
- package/dist/engine/resolve-reference.js.map +1 -1
- package/dist/engine/resolve-type.js +54 -1
- package/dist/engine/resolve-type.js.map +1 -1
- package/dist/engine/wrapper-folding.d.ts +21 -3
- package/dist/engine/wrapper-folding.js +386 -91
- package/dist/engine/wrapper-folding.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/types/file-graph.d.ts +0 -10
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper-callers.js","sourceRoot":"","sources":["../../src/engine/helper-callers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAA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,YAAY,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;YACtF,IAAI,IAAI;gBAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;QAChD,CAAC;IACH,CAAC;IAED,0EAA0E;IAC1E,uEAAuE;IACvE,sEAAsE;IACtE,4EAA4E;IAC5E,KAAK,MAAM,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtC,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAC;YAC9E,MAAM,IAAI,GAAG,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;YAC3E,IAAI,IAAI;gBAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;QAC9C,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,GAAG,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3E,MAAM,IAAI,GAAG,WAAW,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,YAAY,KAAK,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;YAC3E,IAAI,IAAI;gBAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Graph } from "../index.js";
|
|
2
2
|
import type { OccurrenceVia, ComponentId, PropValueState, DiagnosticCollector } from "@component-compass/plugin-core";
|
|
3
|
+
import { type ComponentRegistry } from "./registry.js";
|
|
3
4
|
/** Full occurrence shape produced by the engine.
|
|
4
5
|
*
|
|
5
6
|
* `rawComponentId` carries the structured `ComponentId` (same type as in
|
|
@@ -63,6 +64,9 @@ export type EngineOccurrence = {
|
|
|
63
64
|
};
|
|
64
65
|
export type ResolvedGraph = {
|
|
65
66
|
occurrences: EngineOccurrence[];
|
|
67
|
+
/** The component registry this resolution admitted identities against
|
|
68
|
+
* (spec D1). The CLI's roster join (`buildComponentSeeds`) reads it. */
|
|
69
|
+
registry: ComponentRegistry;
|
|
66
70
|
};
|
|
67
71
|
/**
|
|
68
72
|
* Project-wide tag → identity lookup. Supplied by the host so the engine can
|
package/dist/engine/index.js
CHANGED
|
@@ -1,24 +1,66 @@
|
|
|
1
|
+
import { asTagName, computeOccurrenceId, serialiseComponentId, projectPropUsages, parseCompoundExport } from "@component-compass/plugin-core";
|
|
1
2
|
import { MODULE_SCOPE } from "../index.js";
|
|
2
|
-
import { asTagName, computeOccurrenceId, serialiseComponentId, projectPropUsages } from "@component-compass/plugin-core";
|
|
3
3
|
import { createArgumentMap } from "./argument-map.js";
|
|
4
4
|
import { resolveReference } from "./resolve-reference.js";
|
|
5
|
-
import { walkWithFolding } from "./wrapper-folding.js";
|
|
5
|
+
import { walkWithFolding, argumentProvenance } from "./wrapper-folding.js";
|
|
6
6
|
import { packageNameFromSpecifier, externalSubpath } from "./specifier.js";
|
|
7
7
|
import { followReExportChain } from "./re-export-chain.js";
|
|
8
|
-
import { buildHelperCallers } from "./helper-callers.js";
|
|
8
|
+
import { buildHelperCallers, findLocalDeclaration } from "./helper-callers.js";
|
|
9
9
|
import { resolveOwnerChain } from "./owner-resolution.js";
|
|
10
10
|
import { createCycleGuard } from "./cycle-detection.js";
|
|
11
|
-
import { unparsedMemberDefinition, effectiveExportName } from "./member-identity.js";
|
|
11
|
+
import { unparsedMemberDefinition, effectiveExportName, residualMemberChain, compoundExportName } from "./member-identity.js";
|
|
12
|
+
import { buildComponentRegistry, excludeFoldedHolders, entryKey } from "./registry.js";
|
|
13
|
+
/**
|
|
14
|
+
* JSX treats a bare, lowercase-initial element name as a host element
|
|
15
|
+
* (`div`, `svg`, `web-button`) — it never names a binding, so it is not an
|
|
16
|
+
* unresolved reference. A member chain (`motion.div`) or a capitalised name
|
|
17
|
+
* is a component reference and IS reported when unbound (#518 D7).
|
|
18
|
+
*/
|
|
19
|
+
function isHostElementRoot(ref) {
|
|
20
|
+
return ref.memberChain.length === 0 && /^[a-z]/.test(ref.symbol);
|
|
21
|
+
}
|
|
12
22
|
export function resolve(graph, opts) {
|
|
13
23
|
const occurrences = [];
|
|
14
24
|
const argMap = createArgumentMap();
|
|
15
25
|
const helperIndex = buildHelperCallers(graph);
|
|
26
|
+
const registry = buildComponentRegistry(graph);
|
|
27
|
+
// THE admission rule (spec D1/D12, ruling 14: shape-only). A local
|
|
28
|
+
// react-component identity must be component-shaped; consumption is the
|
|
29
|
+
// usage itself (a JSX usage that resolves to a local declaration IS that
|
|
30
|
+
// declaration's consumption — the engine's own alias/union/dynamic-map/
|
|
31
|
+
// re-export/wrapper-fold resolution already did that work, so admission
|
|
32
|
+
// never re-derives it). Everything the registry does not type (externals,
|
|
33
|
+
// custom elements, vue-dialect declarations, workspace-member definitions
|
|
34
|
+
// outside the graph) is admitted as before — except a non-code file, which
|
|
35
|
+
// is never a component.
|
|
36
|
+
//
|
|
37
|
+
// Ruling 17: a workspace-member path outside the graph (the bounded
|
|
38
|
+
// resolver pins it but never parses it — a lazy `import("./PhoneInput")`
|
|
39
|
+
// whose target file wasn't walked) is rejected only when its path HAS an
|
|
40
|
+
// extension that is provably not code (`hero.png`, `.SVG`). An
|
|
41
|
+
// extensionless path (`./PhoneInput` resolved without a suffix — the
|
|
42
|
+
// resolver's own concern, not this rule's) is admitted: it's far more
|
|
43
|
+
// likely an unwalked source file than a non-code asset, and this rule has
|
|
44
|
+
// no way to tell without walking it.
|
|
45
|
+
const CODE_EXT = /\.(?:[cm]?[jt]sx?|vue)$/i;
|
|
46
|
+
const HAS_EXT = /\.[^./\\]+$/;
|
|
47
|
+
const admit = (id) => {
|
|
48
|
+
if (id.kind !== "react-component" || id.source.type !== "local")
|
|
49
|
+
return true;
|
|
50
|
+
const { filePath } = id.source;
|
|
51
|
+
const declaring = graph.files.get(filePath);
|
|
52
|
+
if (declaring === undefined)
|
|
53
|
+
return !HAS_EXT.test(filePath) || CODE_EXT.test(filePath);
|
|
54
|
+
if (declaring.dialect === "vue")
|
|
55
|
+
return true;
|
|
56
|
+
return registry.isComponentShaped(filePath, id.export);
|
|
57
|
+
};
|
|
16
58
|
// Parallel sidecar holding the per-file usage index, kind, and (pre-resolved)
|
|
17
59
|
// parent-usage index for each emitted occurrence. Used in pass 2 to resolve
|
|
18
60
|
// `parentRef`. Held off-band (not on `EngineOccurrence`) so the public type
|
|
19
|
-
// stays clean and scratch state can't leak into output. `null` slots
|
|
20
|
-
//
|
|
21
|
-
//
|
|
61
|
+
// stays clean and scratch state can't leak into output. `null` slots mean
|
|
62
|
+
// the occurrence has no lexical JSX parent — the argument-site seeding pass
|
|
63
|
+
// stamps nothing for its occurrences. Pre-capturing `parentUsageIdx` at
|
|
22
64
|
// stamp time lets pass 2 do an O(1) lookup per occurrence instead of an
|
|
23
65
|
// O(ownership) `.find()` — matters on large files (hundreds of usages).
|
|
24
66
|
const composition = [];
|
|
@@ -39,19 +81,28 @@ export function resolve(graph, opts) {
|
|
|
39
81
|
// same identity AND same owner — always a spurious duplicate. The
|
|
40
82
|
// `composition` sidecar isn't populated for this slice until the stamp loop
|
|
41
83
|
// below, so the compaction only touches `occurrences`.
|
|
42
|
-
|
|
84
|
+
// THE per-slice compaction seam (admission + #248 dedup). Every emission
|
|
85
|
+
// path — a usage's slice via `stampComposition`, a holder's argument-site
|
|
86
|
+
// slice below — routes through it; never re-derive admission or dedup at a
|
|
87
|
+
// push site.
|
|
88
|
+
const compactSlice = (lengthBefore) => {
|
|
43
89
|
const seenOccurrenceIds = new Set();
|
|
44
90
|
let write = lengthBefore;
|
|
45
91
|
for (let read = lengthBefore; read < occurrences.length; read++) {
|
|
46
92
|
const occ = occurrences[read];
|
|
47
93
|
if (occ === undefined)
|
|
48
94
|
continue;
|
|
95
|
+
if (!admit(occ.rawComponentId))
|
|
96
|
+
continue;
|
|
49
97
|
if (seenOccurrenceIds.has(occ.occurrenceId))
|
|
50
98
|
continue;
|
|
51
99
|
seenOccurrenceIds.add(occ.occurrenceId);
|
|
52
100
|
occurrences[write++] = occ;
|
|
53
101
|
}
|
|
54
102
|
occurrences.length = write;
|
|
103
|
+
};
|
|
104
|
+
const stampComposition = (lengthBefore, kind, fileUsageIdx, depth, parentUsageIdx) => {
|
|
105
|
+
compactSlice(lengthBefore);
|
|
55
106
|
for (let i = lengthBefore; i < occurrences.length; i++) {
|
|
56
107
|
const occ = occurrences[i];
|
|
57
108
|
if (!occ)
|
|
@@ -80,8 +131,24 @@ export function resolve(graph, opts) {
|
|
|
80
131
|
if (!matchedImport) {
|
|
81
132
|
// Symbol is locally declared (no import) — emit local identity.
|
|
82
133
|
const decl = findLocalDeclaration(fileGraph, usage.ref);
|
|
83
|
-
if (!decl)
|
|
134
|
+
if (!decl) {
|
|
135
|
+
if (!isHostElementRoot(usage.ref)) {
|
|
136
|
+
// No import record and no declaration in scope: the engine cannot
|
|
137
|
+
// attribute this usage. Surface it (#518 D7 / #111) instead of
|
|
138
|
+
// dropping it silently — `info`, because the usual cause is a
|
|
139
|
+
// global or macro-provided binding the scan cannot see.
|
|
140
|
+
opts?.collector?.emit({
|
|
141
|
+
code: "unresolved-reference",
|
|
142
|
+
severity: "info",
|
|
143
|
+
filePath,
|
|
144
|
+
line: usage.loc.line,
|
|
145
|
+
column: usage.loc.column,
|
|
146
|
+
symbol: usage.ref.symbol,
|
|
147
|
+
memberChain: [...usage.ref.memberChain],
|
|
148
|
+
});
|
|
149
|
+
}
|
|
84
150
|
continue;
|
|
151
|
+
}
|
|
85
152
|
pushLocalOccurrence(occurrences, filePath, usage, decl, graph, fileGraph, argMap, ownerRef, helperIndex, opts, viaOverride);
|
|
86
153
|
stampComposition(jsxLengthBefore, "jsx", usageIdx, jsxDepth, jsxParentUsageIdx);
|
|
87
154
|
continue;
|
|
@@ -91,6 +158,11 @@ export function resolve(graph, opts) {
|
|
|
91
158
|
// every export-name / re-export lookup below keys on this, not the raw
|
|
92
159
|
// `imported` (#362). `via.import` keeps the raw `imported` (provenance).
|
|
93
160
|
const effectiveImported = effectiveExportName(matchedImport.imported, usage.ref.memberChain);
|
|
161
|
+
// #518 D4: lookups below key on `effectiveImported` (the ROOT); the
|
|
162
|
+
// identity stamped on a fallback is the root plus the residual chain.
|
|
163
|
+
// A member the walker resolves to its own declaration never reaches a
|
|
164
|
+
// fallback, so this only names members with no declaration of their own.
|
|
165
|
+
const residual = residualMemberChain(matchedImport.imported, usage.ref.memberChain);
|
|
94
166
|
if (!packageName) {
|
|
95
167
|
// Relative / absolute specifier — always a local file reference.
|
|
96
168
|
// Resolve the target path; normalize absolute → graph-relative if possible.
|
|
@@ -152,7 +224,7 @@ export function resolve(graph, opts) {
|
|
|
152
224
|
};
|
|
153
225
|
const fallbackComponentId = {
|
|
154
226
|
kind: componentKindFor(fileGraph.dialect),
|
|
155
|
-
export: exportName,
|
|
227
|
+
export: compoundExportName(exportName, residual),
|
|
156
228
|
source: { type: "local", filePath: canonicalFile },
|
|
157
229
|
};
|
|
158
230
|
if (viaOverride !== undefined) {
|
|
@@ -235,9 +307,12 @@ export function resolve(graph, opts) {
|
|
|
235
307
|
const jsxTerminals = foldedTerminals.filter((t) => t.type.kind === "JSX");
|
|
236
308
|
if (jsxTerminals.length === 0)
|
|
237
309
|
continue;
|
|
238
|
-
const
|
|
310
|
+
const siblingFallback = workspaceSiblingFallback(graph, resolvedNormTarget, matchedImport, effectiveImported, fileGraph.dialect);
|
|
311
|
+
const localFallback = siblingFallback !== undefined && siblingFallback.kind !== "custom-element"
|
|
312
|
+
? { ...siblingFallback, export: compoundExportName(siblingFallback.export, residual) }
|
|
313
|
+
: siblingFallback;
|
|
239
314
|
for (const ft of jsxTerminals) {
|
|
240
|
-
pushOccurrence(occurrences, filePath, usage, matchedImport, effectiveImported, packageName, graph, fileGraph, ft, ownerRef, helperIndex, opts, localFallback, viaOverride);
|
|
315
|
+
pushOccurrence(occurrences, filePath, usage, matchedImport, compoundExportName(effectiveImported, residual), packageName, graph, fileGraph, ft, ownerRef, helperIndex, opts, localFallback, viaOverride);
|
|
241
316
|
}
|
|
242
317
|
}
|
|
243
318
|
else {
|
|
@@ -255,13 +330,13 @@ export function resolve(graph, opts) {
|
|
|
255
330
|
if (member !== null) {
|
|
256
331
|
const localFallback = {
|
|
257
332
|
kind: componentKindFor(fileGraph.dialect),
|
|
258
|
-
export: member.exportName,
|
|
333
|
+
export: compoundExportName(member.exportName, residual),
|
|
259
334
|
source: { type: "local", filePath: member.absFile },
|
|
260
335
|
};
|
|
261
|
-
pushOccurrence(occurrences, filePath, usage, matchedImport, effectiveImported, packageName, graph, fileGraph, sentinelFt, ownerRef, helperIndex, opts, localFallback, viaOverride);
|
|
336
|
+
pushOccurrence(occurrences, filePath, usage, matchedImport, compoundExportName(effectiveImported, residual), packageName, graph, fileGraph, sentinelFt, ownerRef, helperIndex, opts, localFallback, viaOverride);
|
|
262
337
|
}
|
|
263
338
|
else {
|
|
264
|
-
pushOccurrence(occurrences, filePath, usage, matchedImport, effectiveImported, packageName, graph, fileGraph, sentinelFt, ownerRef, helperIndex, opts, undefined, viaOverride);
|
|
339
|
+
pushOccurrence(occurrences, filePath, usage, matchedImport, compoundExportName(effectiveImported, residual), packageName, graph, fileGraph, sentinelFt, ownerRef, helperIndex, opts, undefined, viaOverride);
|
|
265
340
|
}
|
|
266
341
|
}
|
|
267
342
|
stampComposition(jsxLengthBefore, "jsx", usageIdx, jsxDepth, jsxParentUsageIdx);
|
|
@@ -319,6 +394,43 @@ export function resolve(graph, opts) {
|
|
|
319
394
|
stampComposition(tagLengthBefore, "tag", i, tagDepth, tagParentUsageIdx);
|
|
320
395
|
}
|
|
321
396
|
}
|
|
397
|
+
// Argument-site seeding (spec §4, D4/D5; PR 2 rulings R1–R3). A module-
|
|
398
|
+
// scope registry member whose value is a call — a wrapper product — is a
|
|
399
|
+
// *holder*. Its own fold decides everything: when the fold reaches JSX and
|
|
400
|
+
// every terminal carries neither an identity nor a `hoc-wrapper` hop, the
|
|
401
|
+
// holder is its own identity
|
|
402
|
+
// (D9 arm 2: the callee was visible and built a new function) and credited
|
|
403
|
+
// none of its arguments, so each identifier argument of the OUTERMOST call
|
|
404
|
+
// that resolves to a component gets one occurrence at the argument's own
|
|
405
|
+
// position, owned by the holder. A fold that carried an identity credited
|
|
406
|
+
// an argument already (arm 1 / arm 3) and seeds nothing — a site is never
|
|
407
|
+
// counted twice. The registry gate keeps an unused, unexported holder from
|
|
408
|
+
// owning anything (no phantom owner by construction). Runs after the usage
|
|
409
|
+
// loops so a holder's slice never interleaves with a usage's; there is no
|
|
410
|
+
// composition sidecar entry because an argument site has no lexical JSX
|
|
411
|
+
// parent.
|
|
412
|
+
// #539 D1/D2: the SAME fold answers membership. A holder whose every JSX
|
|
413
|
+
// terminal carries an identity has credited another identity for every
|
|
414
|
+
// render — it is the route to that identity, not a member. Collected here,
|
|
415
|
+
// applied once through `excludeFoldedHolders` at the return below.
|
|
416
|
+
const folded = new Map();
|
|
417
|
+
for (const [filePath, fileGraph] of graph.files) {
|
|
418
|
+
if (fileGraph.dialect === "vue")
|
|
419
|
+
continue;
|
|
420
|
+
for (const decl of fileGraph.declarations.values()) {
|
|
421
|
+
if (decl.scope !== MODULE_SCOPE || decl.value.kind !== "ReturnTypeOf")
|
|
422
|
+
continue;
|
|
423
|
+
if (!registry.hasLocal(filePath, decl.symbol))
|
|
424
|
+
continue;
|
|
425
|
+
const holderJsx = walkWithFolding(graph, fileGraph, decl.value, argMap).filter((t) => t.type.kind === "JSX");
|
|
426
|
+
const foldedAway = foldedHolder(holderJsx, filePath);
|
|
427
|
+
if (foldedAway !== null)
|
|
428
|
+
folded.set(entryKey(filePath, decl.symbol), foldedAway);
|
|
429
|
+
const lengthBefore = occurrences.length;
|
|
430
|
+
pushArgumentSiteOccurrences(occurrences, filePath, decl, decl.value, holderJsx, graph, fileGraph, argMap, opts);
|
|
431
|
+
compactSlice(lengthBefore);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
322
434
|
// Pass 2: resolve `parentRef` from per-file `parentUsageIdx` ownership data.
|
|
323
435
|
// Pass 1 populated the `composition` sidecar with `(fileUsageIdx, kind)` per
|
|
324
436
|
// emitted occurrence, which lets us build a `(filePath, kind, fileUsageIdx)
|
|
@@ -343,25 +455,7 @@ export function resolve(graph, opts) {
|
|
|
343
455
|
if (parentIdx !== undefined)
|
|
344
456
|
occ.parentRef = parentIdx;
|
|
345
457
|
}
|
|
346
|
-
return { occurrences };
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Walk the scope chain for `ref.symbol` in `fileGraph.declarations` and
|
|
350
|
-
* return the first matching BindingDecl, or null if not found.
|
|
351
|
-
*/
|
|
352
|
-
function findLocalDeclaration(fileGraph, ref) {
|
|
353
|
-
let scope = ref.scope;
|
|
354
|
-
while (true) {
|
|
355
|
-
const decl = fileGraph.declarations.get(`${scope}::${ref.symbol}`);
|
|
356
|
-
if (decl)
|
|
357
|
-
return decl;
|
|
358
|
-
if (scope === MODULE_SCOPE)
|
|
359
|
-
return null;
|
|
360
|
-
const parent = fileGraph.scopes.get(scope)?.parent;
|
|
361
|
-
if (parent === null || parent === undefined)
|
|
362
|
-
return null;
|
|
363
|
-
scope = parent;
|
|
364
|
-
}
|
|
458
|
+
return { occurrences, registry: excludeFoldedHolders(registry, folded) };
|
|
365
459
|
}
|
|
366
460
|
/**
|
|
367
461
|
* Build a local-scope ComponentId for a symbol declared in `filePath`.
|
|
@@ -389,8 +483,8 @@ function dialectForFile(graph, filePath) {
|
|
|
389
483
|
}
|
|
390
484
|
/**
|
|
391
485
|
* Owner ComponentId for a parser-pre-decided owner reference (#151
|
|
392
|
-
* prop-forward
|
|
393
|
-
*
|
|
486
|
+
* prop-forward path). `fallbackFile` is the consuming file, used when the ref
|
|
487
|
+
* carries no originFile.
|
|
394
488
|
*
|
|
395
489
|
* This and `ownerIdFromResolution` are the ONLY places an occurrence's
|
|
396
490
|
* `rawOwnerComponentId` may be built — the dialect must come from the
|
|
@@ -503,12 +597,16 @@ function relabelExternalLeaf(rawComponentId, filePath, specifier, resolveExterna
|
|
|
503
597
|
rawComponentId.source.type !== "external") {
|
|
504
598
|
return rawComponentId;
|
|
505
599
|
}
|
|
506
|
-
|
|
600
|
+
// A compound export (#518) names a member of the package's ROOT export;
|
|
601
|
+
// the leaf walk resolves the root and the member chain is re-joined onto
|
|
602
|
+
// whatever export the leaf calls it.
|
|
603
|
+
const { root, path } = parseCompoundExport(rawComponentId.export);
|
|
604
|
+
const hit = resolveExternalLeaf(filePath, specifier, root);
|
|
507
605
|
if (!hit || hit.leafPackage === rawComponentId.source.package)
|
|
508
606
|
return rawComponentId;
|
|
509
607
|
return {
|
|
510
608
|
kind: rawComponentId.kind,
|
|
511
|
-
export: hit.exportName,
|
|
609
|
+
export: compoundExportName(hit.exportName, path),
|
|
512
610
|
source: externalSource(hit.leafPackage, `${hit.leafPackage}/${hit.modulePath}`),
|
|
513
611
|
};
|
|
514
612
|
}
|
|
@@ -571,9 +669,10 @@ function computeWraps(rawComponentId, wrapCallback) {
|
|
|
571
669
|
return { kind: "custom-element", tagName: hit.tagName, packageName: hit.packageName };
|
|
572
670
|
}
|
|
573
671
|
function pushOccurrence(occurrences, filePath, usage, matchedImport,
|
|
574
|
-
/** Export name for the fallback identity —
|
|
575
|
-
*
|
|
576
|
-
* `
|
|
672
|
+
/** Export name for the fallback identity — the root export resolved via
|
|
673
|
+
* `effectiveExportName` (#362) joined with the residual member chain via
|
|
674
|
+
* `compoundExportName` (#518). Distinct from `matchedImport.imported`,
|
|
675
|
+
* which stays raw for `via` provenance. */
|
|
577
676
|
effectiveImported, packageName, graph, fileGraph, ft, ownerRef, helperIndex, opts, fallbackOverride, viaOverride) {
|
|
578
677
|
const fallback = fallbackOverride ?? {
|
|
579
678
|
kind: componentKindFor(fileGraph.dialect),
|
|
@@ -646,17 +745,20 @@ effectiveImported, packageName, graph, fileGraph, ft, ownerRef, helperIndex, opt
|
|
|
646
745
|
* Walks the decl's value via walkWithFolding and fans out per JSX terminal.
|
|
647
746
|
*/
|
|
648
747
|
function pushLocalOccurrence(occurrences, filePath, usage, decl, graph, fileGraph, argMap, ownerRef, helperIndex, opts, viaOverride) {
|
|
649
|
-
|
|
748
|
+
// A member access on a same-file binding (`<LocalNS.Leaf/>`) walks the
|
|
749
|
+
// MEMBER, not the whole object — `resolveReference` applies the usage's
|
|
750
|
+
// member chain exactly as the import path already gets it (#520 shape 4,
|
|
751
|
+
// the same static-MemberOf arm as #512). A bare reference is unchanged:
|
|
752
|
+
// `decl.value` is what `resolveReference` returns for an empty chain.
|
|
753
|
+
const value = usage.ref.memberChain.length > 0 ? resolveReference(graph, fileGraph, usage.ref) : decl.value;
|
|
754
|
+
const folded = walkWithFolding(graph, fileGraph, value, argMap);
|
|
650
755
|
const jsxTerminals = folded.filter((t) => t.type.kind === "JSX");
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
pushDynamicBindingOccurrence(occurrences, filePath, usage, decl.dynamicSource, fileGraph.dialect, rawOwnerComponentId);
|
|
657
|
-
}
|
|
756
|
+
// A reference that resolves to no JSX terminal — a function parameter
|
|
757
|
+
// (`<Component/>` inside a factory body), a hook-return destructure, or an
|
|
758
|
+
// unresolvable alias — emits nothing (spec D4/D7). The old dynamic-binding
|
|
759
|
+
// phantom (`{ packageName: null, exportName: "Component" }`) is gone.
|
|
760
|
+
if (jsxTerminals.length === 0)
|
|
658
761
|
return;
|
|
659
|
-
}
|
|
660
762
|
const outerVia = viaOverride ?? { kind: "local-component" };
|
|
661
763
|
if (viaOverride !== undefined) {
|
|
662
764
|
// #151 prop-forward: parser has pre-decided the owner — single-occurrence path.
|
|
@@ -664,7 +766,7 @@ function pushLocalOccurrence(occurrences, filePath, usage, decl, graph, fileGrap
|
|
|
664
766
|
for (const ft of jsxTerminals) {
|
|
665
767
|
const fallback = {
|
|
666
768
|
kind: componentKindFor(fileGraph.dialect),
|
|
667
|
-
export: usage.ref.symbol,
|
|
769
|
+
export: compoundExportName(usage.ref.symbol, usage.ref.memberChain),
|
|
668
770
|
source: { type: "local", filePath },
|
|
669
771
|
};
|
|
670
772
|
const rawComponentId = componentIdFromIdentity(ft.identity, fallback, fileGraph.dialect, {
|
|
@@ -696,7 +798,7 @@ function pushLocalOccurrence(occurrences, filePath, usage, decl, graph, fileGrap
|
|
|
696
798
|
for (const ft of jsxTerminals) {
|
|
697
799
|
const fallback = {
|
|
698
800
|
kind: componentKindFor(fileGraph.dialect),
|
|
699
|
-
export: usage.ref.symbol,
|
|
801
|
+
export: compoundExportName(usage.ref.symbol, usage.ref.memberChain),
|
|
700
802
|
source: { type: "local", filePath },
|
|
701
803
|
};
|
|
702
804
|
const rawComponentId = componentIdFromIdentity(ft.identity, fallback, fileGraph.dialect, {
|
|
@@ -726,55 +828,93 @@ function pushLocalOccurrence(occurrences, filePath, usage, decl, graph, fileGrap
|
|
|
726
828
|
}
|
|
727
829
|
}
|
|
728
830
|
/**
|
|
729
|
-
*
|
|
730
|
-
*
|
|
731
|
-
* identity is
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
* memberChain on the usage is intentionally dropped — claiming `.Foo` of an
|
|
737
|
-
* unknown adds noise without information.
|
|
738
|
-
*
|
|
739
|
-
* `definition` is intentionally absent: the declaration site of a parameter
|
|
740
|
-
* is the function signature, which doesn't represent a component definition
|
|
741
|
-
* in the local-component aggregation sense.
|
|
831
|
+
* #539 D1: a holder is folded away iff its fold reaches JSX and EVERY JSX
|
|
832
|
+
* terminal carries an identity — the fold credited someone else for every
|
|
833
|
+
* render. Any identity-less terminal means the holder is its own identity
|
|
834
|
+
* (spec D9 arm 2: `memo(createField(Base))`, `forwardRef((p, r) => <b/>)`).
|
|
835
|
+
* D4: the target is reported only when all terminals name ONE local member of
|
|
836
|
+
* the holder's own file; that member inherits `isDefault` in the seam.
|
|
837
|
+
* Returns `null` when the holder is not folded.
|
|
742
838
|
*/
|
|
743
|
-
function
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
839
|
+
function foldedHolder(holderJsx, filePath) {
|
|
840
|
+
if (holderJsx.length === 0 || holderJsx.some((t) => t.identity === null))
|
|
841
|
+
return null;
|
|
842
|
+
const first = holderJsx[0]?.identity;
|
|
843
|
+
const sameFileSingle = first !== undefined &&
|
|
844
|
+
first !== null &&
|
|
845
|
+
first.kind === "local" &&
|
|
846
|
+
first.filePath === filePath &&
|
|
847
|
+
holderJsx.every((t) => t.identity !== null && t.identity.kind === "local" && t.identity.filePath === filePath && t.identity.export === first.export);
|
|
848
|
+
return { target: sameFileSingle ? { filePath, export: first.export } : null };
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Argument-site seeding for one holder (spec §4; PR 2 rulings R1–R3) over the
|
|
852
|
+
* fold the caller already ran (#539 D2) — the rule is stated at the call site
|
|
853
|
+
* in `resolve`. Identity goes through `componentIdFromIdentity` (the
|
|
854
|
+
* external-leaf relabel seam) and the owner through `ownerIdFromRef`, exactly
|
|
855
|
+
* as every other push path; the binding is named through `argumentProvenance`,
|
|
856
|
+
* the same helper `hoc-wrapper` uses. The caller compacts the slice
|
|
857
|
+
* (admission + dedup).
|
|
858
|
+
*/
|
|
859
|
+
function pushArgumentSiteOccurrences(occurrences, filePath, holder, call, holderJsx, graph, fileGraph, argMap, opts) {
|
|
860
|
+
// R1: the holder is its own identity iff its fold reaches JSX and no
|
|
861
|
+
// terminal carries an identity of its own OR a `hoc-wrapper` hop — the hop
|
|
862
|
+
// is the fold's own record that it credited an argument (arm 1 / arm 3),
|
|
863
|
+
// even when that argument was anonymous (`forwardRef((p, r) => <b/>, x)`),
|
|
864
|
+
// so the holder is a wrapper of it and its other arguments are
|
|
865
|
+
// configuration, not wrapped components.
|
|
866
|
+
if (holderJsx.length === 0 ||
|
|
867
|
+
holderJsx.some((t) => t.identity !== null || t.viaTrail.some((v) => v.kind === "hoc-wrapper"))) {
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
const holderRef = {
|
|
871
|
+
symbol: holder.symbol,
|
|
872
|
+
scope: MODULE_SCOPE,
|
|
873
|
+
memberChain: [],
|
|
874
|
+
loc: holder.loc,
|
|
875
|
+
originFile: filePath,
|
|
763
876
|
};
|
|
764
|
-
const
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
877
|
+
const rawOwnerComponentId = ownerIdFromRef(graph, holderRef, filePath);
|
|
878
|
+
const ownerKey = rawOwnerComponentId !== undefined ? serialiseComponentId(rawOwnerComponentId) : undefined;
|
|
879
|
+
// R2: the outermost call's arguments only — an inner call's arguments
|
|
880
|
+
// configure the wrapper, they are not wrapped. R3: identifier arguments
|
|
881
|
+
// only, each resolved through the walker so aliases, re-exports and
|
|
882
|
+
// import-backed leaves take the same path a render site does; a null
|
|
883
|
+
// identity is skipped, never invented.
|
|
884
|
+
call.args.forEach((arg, index) => {
|
|
885
|
+
if (arg.kind !== "TypeOf")
|
|
886
|
+
return;
|
|
887
|
+
const outerVia = { kind: "passed-as-argument", index, ...argumentProvenance(call, arg, fileGraph) };
|
|
888
|
+
const argDecl = findLocalDeclaration(fileGraph, arg.ref);
|
|
889
|
+
// Never applied: every terminal used below carries a non-null identity,
|
|
890
|
+
// and `buildComponentId` returns the fallback only for a null one. The
|
|
891
|
+
// relabel seam's signature requires a fallback all the same.
|
|
892
|
+
const unusedFallback = makeLocalComponentId(filePath, arg.ref.symbol, fileGraph.dialect);
|
|
893
|
+
for (const ft of walkWithFolding(graph, fileGraph, arg, argMap)) {
|
|
894
|
+
if (ft.type.kind !== "JSX" || ft.identity === null)
|
|
895
|
+
continue;
|
|
896
|
+
const rawComponentId = componentIdFromIdentity(ft.identity, unusedFallback, fileGraph.dialect, {
|
|
897
|
+
filePath,
|
|
898
|
+
resolveExternalLeaf: opts?.resolveExternalLeaf,
|
|
899
|
+
});
|
|
900
|
+
const wraps = computeWraps(rawComponentId, opts?.wrapCallback);
|
|
901
|
+
const occurrenceId = computeOccurrenceId(serialiseComponentId(rawComponentId), filePath, arg.ref.loc.line, arg.ref.loc.column, ownerKey);
|
|
902
|
+
occurrences.push({
|
|
903
|
+
rawComponentId,
|
|
904
|
+
filePath,
|
|
905
|
+
line: arg.ref.loc.line,
|
|
906
|
+
column: arg.ref.loc.column,
|
|
907
|
+
via: outerVia,
|
|
908
|
+
viaChain: [outerVia, ...ft.viaTrail],
|
|
909
|
+
props: {},
|
|
910
|
+
events: [],
|
|
911
|
+
occurrenceId,
|
|
912
|
+
depth: 0,
|
|
913
|
+
...(argDecl !== null ? { definition: { line: argDecl.loc.line, column: argDecl.loc.column } } : {}),
|
|
914
|
+
...(rawOwnerComponentId !== undefined ? { rawOwnerComponentId } : {}),
|
|
915
|
+
...(wraps !== undefined ? { wraps } : {}),
|
|
916
|
+
});
|
|
917
|
+
}
|
|
778
918
|
});
|
|
779
919
|
}
|
|
780
920
|
/**
|