Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
d04d671
fix(javascript): preserve vite dependency values and indexes
evenafterallisaid Oct 11, 2026
215d21b
fix(javascript): merge main and track shared Vite cache mutations
morluto Oct 13, 2026
f029c24
style: format review corrections
morluto Oct 13, 2026
1bb4b1f
fix(javascript): retain Vite cache ownership across copies
morluto Oct 13, 2026
a282791
fix(javascript): preserve Vite cache ownership facts
Oct 13, 2026
df2fa18
fix(javascript): retain cache ownership for getter overrides
Oct 13, 2026
0412c78
fix(javascript): complete Vite cache ownership cases
Oct 13, 2026
48fa42b
fix(javascript): preserve Vite cache ownership facts
morluto Oct 13, 2026
3400d75
merge(main): refresh Vite checks against current source
morluto Oct 13, 2026
c4ebe5e
Merge branch 'main' into fix/vite-dependency-values
morluto Oct 13, 2026
effdc8e
Merge branch 'main' into fix/vite-dependency-values
morluto Oct 13, 2026
e1b4e33
fix(javascript): reconcile Vite analysis with current main
evenafterallisaid Oct 14, 2026
2c501ec
fix(javascript): complete Vite cache ownership regressions
evenafterallisaid Oct 14, 2026
3b09741
Merge remote-tracking branch 'upstream/main' into fix/vite-dependency…
evenafterallisaid Oct 14, 2026
af3a1ad
fix(javascript): retain inline cache escapes and assign targets
evenafterallisaid Oct 14, 2026
a8c7631
Merge remote-tracking branch 'upstream/main' into fix/vite-dependency…
evenafterallisaid Oct 15, 2026
3a8121d
fix(javascript): track restored Vite cache identities and method effects
evenafterallisaid Oct 15, 2026
a6d61ca
fix(javascript): preserve Vite container children and property identity
evenafterallisaid Oct 15, 2026
1fcace9
Merge remote-tracking branch 'upstream/main' into fix/vite-dependency…
evenafterallisaid Oct 15, 2026
815c5d5
fix(javascript): preserve Vite cache identities and bounded projection
evenafterallisaid Oct 15, 2026
88ce916
fix(javascript): close Vite cache mutation and decoding gaps
evenafterallisaid Oct 16, 2026
b9f0f2a
fix(javascript): reconcile upstream analysis finalizers
evenafterallisaid Oct 16, 2026
7eaa00c
Merge remote-tracking branch 'upstream/main' into fix/vite-dependency…
evenafterallisaid Oct 16, 2026
6222484
fix(javascript): retain cache effects across value transfers
evenafterallisaid Oct 17, 2026
51de9d4
fix(javascript): preserve shared values returned by Vite helpers
evenafterallisaid Oct 17, 2026
b4347a2
fix(javascript): keep helper supplied tables from invalidating the de…
evenafterallisaid Oct 17, 2026
41cc28e
chore(ci): align turbo lint inputs with upstream
evenafterallisaid Oct 17, 2026
548c232
Merge remote-tracking branch 'upstream/main' into fix/vite-dependency…
evenafterallisaid Oct 17, 2026
c6efc75
fix(javascript): require plain data slots for mapped helper arguments
evenafterallisaid Oct 17, 2026
157d76f
fix(javascript): expose unproven index protocols and inert index slots
evenafterallisaid Oct 17, 2026
b11b483
chore(ci): retrigger the required run for the launched-orphan lifecyc…
evenafterallisaid Oct 17, 2026
5ac739c
fix(javascript): expose only selected tables for unproven index proto…
evenafterallisaid Oct 17, 2026
92bf31a
fix(javascript): reuse selected tables for opaque Vite mapping
evenafterallisaid Oct 17, 2026
7ee46c0
fix(javascript): retain selected Vite table allocation on escape
evenafterallisaid Oct 17, 2026
38e5026
fix(javascript): scope escaped slots to reachable cache owners
evenafterallisaid Oct 17, 2026
9455a93
merge main and preserve Vite analysis integration
evenafterallisaid Oct 18, 2026
895c2b8
fix(javascript): retain exported and inherited Vite cache identities
evenafterallisaid Oct 18, 2026
a2749a8
fix(javascript): preserve supplied prototype ownership
evenafterallisaid Oct 18, 2026
e76ff97
fix(javascript): retain uncertainty after Vite table spreads
evenafterallisaid Oct 18, 2026
8c8d36b
fix(javascript): revisit prototype proofs after late effects
evenafterallisaid Oct 18, 2026
95577bd
merge main and preserve cooperative Vite analysis
evenafterallisaid Oct 19, 2026
62628b3
fix(javascript): stop Vite decoding after effectful reads
evenafterallisaid Oct 19, 2026
1b243e8
Merge branch 'main' into fix/vite-dependency-values
gensokyo-dev Oct 19, 2026
581f875
chore: merge main and preserve Vite integration proofs
evenafterallisaid Oct 21, 2026
8acd05f
fix: repair merged export and formatting checks
evenafterallisaid Oct 24, 2026
72ce50d
fix(javascript): propagate implicit Vite cache effects
evenafterallisaid Oct 24, 2026
6edb272
chore: merge main and preserve Windows Vite validation
evenafterallisaid Oct 24, 2026
52c2a97
chore: merge current main
evenafterallisaid Oct 24, 2026
09bf40f
test(javascript): distinguish cache reads from escapes
evenafterallisaid Oct 24, 2026
ffb83ef
fix(javascript): land deferred restrictions and skip constant escapes
evenafterallisaid Oct 24, 2026
80c1c72
fix(javascript): align cache ordering with current main
evenafterallisaid Oct 25, 2026
d8e0366
fix(javascript): retain cache ownership through created prototypes
evenafterallisaid Oct 25, 2026
be11ee8
fix(javascript): retain cache ownership in loop bindings
evenafterallisaid Oct 25, 2026
b875ccd
chore: use the upstream launcher fixture repair
evenafterallisaid Oct 25, 2026
e861441
fix(javascript): separate yielded elements from array ownership
evenafterallisaid Oct 25, 2026
727475a
fix(javascript): retain values from uncertain helper selections
evenafterallisaid Oct 25, 2026
aeeca27
Merge remote-tracking branch 'origin/main' into codex/vite-1840-prove…
morluto Oct 29, 2026
e6a3ce1
fix(javascript): retain Vite output markers after integration
morluto Oct 29, 2026
f03dc0d
fix: retain upstream behavior in Vite merge
morluto Oct 29, 2026
4f7a4d6
Merge commit 'refs/rea-audit/latest-main' into codex/vite-1840-main-m…
morluto Oct 29, 2026
a9507c7
fix(javascript)!: retain Vite table values as candidates
morluto Oct 29, 2026
ccc2dff
fix: preserve Vite index uncertainty in table defaults
morluto Oct 29, 2026
1a2d032
test: verify Vite default mutation at runtime
morluto Oct 29, 2026
353e301
fix(javascript): retain inherited Vite values and iteration identity
morluto Oct 29, 2026
6baf6a8
fix(javascript)!: preserve file occurrence identity in application gr…
morluto Oct 29, 2026
eb8e1ea
fix(javascript): classify Vite initializer identifier roles
morluto Oct 29, 2026
ffd0fd1
test(javascript): retain Vite candidates with harmless property keys
morluto Oct 29, 2026
6b31f3a
test(javascript): exercise Vite property keys through CLI and MCP
morluto Oct 29, 2026
374bcb4
fix(javascript): preserve selected Vite table value ownership
morluto Oct 29, 2026
26e5551
test(javascript): exercise selected Vite values through CLI and MCP
morluto Oct 29, 2026
64c7f0e
fix(javascript): scope intrinsic exposure to mapped values
morluto Oct 29, 2026
4893a9e
fix(javascript): retain intrinsic prototype escape effects
morluto Oct 29, 2026
37fe1e1
test(javascript): exercise intrinsic prototype escapes through CLI an…
morluto Oct 29, 2026
e183bb7
fix(javascript): retain unproven descriptor effects
morluto Oct 29, 2026
8ff9445
test(javascript): exercise unknown prototype descriptors through CLI …
morluto Oct 29, 2026
9dfe1ae
test(javascript): group Vite ownership regressions by behavior
morluto Oct 29, 2026
d063b37
fix(javascript): match URL source declarations across versions
morluto Oct 29, 2026
5476350
test(javascript): exercise URL source maps through CLI and MCP
morluto Oct 29, 2026
c2766e4
fix(javascript): preserve copied value provenance
morluto Oct 29, 2026
faf6e2b
fix(javascript): index copy hazards by semantic order
morluto Oct 29, 2026
8243462
test(javascript): exercise inherited prototype copies through CLI and…
morluto Oct 29, 2026
0578fbf
fix(javascript): include prototype writes in cache read proofs
morluto Oct 29, 2026
ab92e4d
fix(javascript): invalidate helper family for shared method effects
morluto Oct 29, 2026
9f6b470
test(javascript): group prototype effect regressions
morluto Oct 29, 2026
8ae2c13
fix(javascript): preserve primitive candidates through shared effects
evenafterallisaid Oct 29, 2026
697899a
test(javascript): verify source occurrence identities at boundaries
evenafterallisaid Oct 29, 2026
a9c9d68
fix(javascript): preserve own computed table values
evenafterallisaid Oct 29, 2026
7ce8a45
test(javascript): align resource and template identity assertions
evenafterallisaid Oct 29, 2026
59a948d
test(javascript): align occurrence and input diagnostic assertions
evenafterallisaid Oct 29, 2026
cdba1cc
fix(javascript): retain bundle correspondence across container versions
evenafterallisaid Oct 29, 2026
9c119b9
chore: merge current main into vite dependency fix
evenafterallisaid Oct 29, 2026
9888267
test(javascript): compare source maps using retained session evidence
evenafterallisaid Oct 29, 2026
217801b
test(javascript): verify source map occurrence identity
evenafterallisaid Oct 29, 2026
71d723f
test(javascript): select semantic chunks and preserve file occurrences
evenafterallisaid Oct 29, 2026
0587d9d
fix(javascript): preserve copied values and source occurrence compari…
evenafterallisaid Nov 3, 2026
3999f71
test(javascript): supply application view predicate
evenafterallisaid Nov 3, 2026
5e8dbeb
test(javascript): admit module item view requests
evenafterallisaid Nov 3, 2026
64a3bd0
fix(tests): find retained checkpoints by file occurrence
evenafterallisaid Nov 4, 2026
0a88ed2
fix(javascript): preserve Vite receiver facts and index ordered writes
evenafterallisaid Nov 5, 2026
3498d44
merge main and preserve shared JavaScript source facts
evenafterallisaid Nov 5, 2026
e1996f5
fix(javascript): guard changed constructors and yield indexed sorting
evenafterallisaid Nov 6, 2026
80711fc
test(javascript): bound the snapshot ordering regression fixture
evenafterallisaid Nov 6, 2026
ee6bd3c
merge main and preserve JavaScript loader identity
evenafterallisaid Nov 8, 2026
91a2db2
merge latest main and align Electron applicability tests
evenafterallisaid Nov 8, 2026
97e86f5
fix(javascript): retain call authority and match unchanged Electron s…
evenafterallisaid Nov 9, 2026
ae97bb1
merge main and retain Vite constructor and call authority
evenafterallisaid Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(javascript)!: retain Vite table values as candidates
  • Loading branch information
morluto committed Oct 29, 2026
commit a9507c7df6fbea4c86dd6af7d9d686ddb0ff499e
15 changes: 7 additions & 8 deletions docs/javascript-artifact-reconstruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,12 @@ Selected bounded text is then parsed as inert data to recover:
relative to the calling module; string worker and service-worker paths use
the document base URL or Node's working directory, which static analysis
does not establish, so they keep their expression and stay unresolved);
- Vite preload dependency tables (`__vite__mapDeps`): `./` entries resolve
relative to the importing chunk; base-relative entries such as
`assets/chunk.js` carry a `vite-output:` specifier and resolve under the one
ancestor directory of the importer that holds them, the build output
directory. A file found there but not analyzed, such as a stylesheet, stays
`unavailable` with its path. Selecting only the assets directory leaves them
`not-found`;
- Vite dependency tables (`__vite__mapDeps`): selected literal entries retain
their original values as candidates. A matching local file may be reported as
a candidate path, but the table alone does not establish a load, runtime URL
base, or applicable import map. Candidate resolution stays unavailable and
graph coverage is partial; independently observed imports keep their own
resolution. Previously retained Evidence is not rewritten;
- route, network endpoint, storage, and vendor-marker observations;
- local source-map declarations and original
source names and content digests;
Expand All @@ -392,7 +391,7 @@ candidates. A template recovered with a parser error and no cooked value stays
dynamic; its raw spelling is not treated as a valid JavaScript string.

Vite `__vite__mapDeps` dependency tables use decoded JavaScript string values,
so an escaped path such as `caf\u00e9.js` resolves to `café.js`. array positions
so an escaped path such as `caf\u00e9.js` is retained as `café.js`. array positions
are preserved when entries are dynamic or missing; a spread of unknown length
makes subsequent indexes unknown. calls use their own lexical helper binding,
and unresolved dependencies retain the call expression and source evidence.
Expand Down
182 changes: 128 additions & 54 deletions src/application/javascript/JavaScriptArtifactGraphFindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import { posix } from "node:path";

import { compactStringIdentityKey } from "../../domain/compactStringIdentity.js";
import type { ApplicationNode } from "../../domain/javascript/javascriptApplicationGraphSchemas.js";
import {
VITE_OUTPUT_DEPENDENCY_PREFIX,
type JavaScriptStaticAnalysis,
} from "../../domain/javascript/javascriptStaticAnalysisTypes.js";
import type { JavaScriptStaticAnalysis } from "../../domain/javascript/javascriptStaticAnalysisTypes.js";
import type { JavaScriptArtifactFile } from "../../domain/javascript/javascriptArtifactFiles.js";
import {
addAstContainsEdge,
addStaticInferenceEdge,
applicationRootPath,
applicationContainerIdentity,
Expand Down Expand Up @@ -204,14 +202,16 @@ const addReference = (
input.value.module_runtime,
) ?? input.asset;
const resolved =
input.value.kind === "vite-table-candidate" ||
input.value.specifier === null
? null
: resolveReference(context, input.file.path, input.value, input.coverage);
if (
input.value.operation === "load" &&
(input.value.kind === "static-import" ||
input.value.kind === "dynamic-import" ||
input.value.kind === "require") &&
((input.value.operation === "load" &&
(input.value.kind === "static-import" ||
input.value.kind === "dynamic-import" ||
input.value.kind === "require")) ||
input.value.kind === "vite-table-candidate") &&
(input.value.specifier === null ||
resolved === null ||
resolved.targetImportsUnexamined === true)
Expand All @@ -222,6 +222,55 @@ const addReference = (
gaps.add(input.file.path);
context.applicationModuleGapSources.set(container, gaps);
}
if (input.value.kind === "vite-table-candidate") {
const candidateResolution =
input.value.specifier === null
? undefined
: resolveViteTableCandidate(
context,
input.file.path,
input.value.specifier,
);
const candidate = context.accumulator.addNode({
kind: "unknown",
identity: artifactLocalIdentity(
input.file.sha256,
"vite-table-candidate",
`${input.value.specifier ?? input.value.expression}:${JSON.stringify(input.value.location)}`,
),
Comment thread
morluto marked this conversation as resolved.
Resolved
observations: [
{
label: input.value.specifier,
properties: {
vite_table_candidate: true,
specifier: input.value.specifier,
expression: input.value.expression,
resolution_status: "unavailable",
...artifactPathResolutionProperties(candidateResolution),
},
evidence: astObservationEvidence({
sha256: input.file.sha256,
path: input.file.path,
range: input.value.location,
operation: "observe-vite-table-candidate",
coverage: input.coverage,
limitations: candidateResolution?.limitations ?? [
"The selected Vite table value is not proof of a runtime load or its deployed URL; import-map effects are unknown.",
],
}),
},
],
});
addAstContainsEdge(context, {
source,
target: candidate,
file: input.file,
range: input.value.location,
coverage: input.coverage,
properties: { vite_table_candidate: true },
});
return;
}
if (
resolved !== null &&
resolved.path !== null &&
Expand Down Expand Up @@ -668,13 +717,9 @@ const resolveReference = (
posix.join(posix.dirname(sourcePath), reference.resolution_base_path),
)
: sourcePath;
const viteDependency = specifier.startsWith(VITE_OUTPUT_DEPENDENCY_PREFIX)
? specifier.slice(VITE_OUTPUT_DEPENDENCY_PREFIX.length)
: undefined;
const chunk =
isWorker || viteDependency !== undefined
? null
: resolveBundlerChunkReference(context, sourcePath, reference);
const chunk = isWorker
? null
: resolveBundlerChunkReference(context, sourcePath, reference);
if (chunk !== null) return chunk;
const module =
isWorker || reference.module_runtime === undefined
Expand All @@ -694,38 +739,35 @@ const resolveReference = (
};
}
// Worker scripts are URLs relative to the script, not module specifiers.
const resolution =
viteDependency !== undefined
? resolveViteOutputDependency(context, sourcePath, viteDependency)
: isWorker
? resolveArtifactPathByContext({
declaredPath: specifier,
sourcePath,
context: "url-reference",
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
})
: resolveArtifactPathByContext({
declaredPath: specifier,
sourcePath: resolutionSourcePath,
context: "module-specifier",
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
...("require" === reference.kind ||
"static-import" === reference.kind ||
"dynamic-import" === reference.kind
? {
moduleKind: moduleResolutionModeForJavaScriptReference(
resolutionSourcePath,
reference.kind,
),
}
: {}),
});
const resolution = isWorker
? resolveArtifactPathByContext({
declaredPath: specifier,
sourcePath,
context: "url-reference",
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
})
: resolveArtifactPathByContext({
declaredPath: specifier,
sourcePath: resolutionSourcePath,
context: "module-specifier",
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
...("require" === reference.kind ||
"static-import" === reference.kind ||
"dynamic-import" === reference.kind
? {
moduleKind: moduleResolutionModeForJavaScriptReference(
resolutionSourcePath,
reference.kind,
),
}
: {}),
});
const path = resolution.resolved_path;
const targetPath = path ?? resolution.candidate_path;
const targetKind =
Expand Down Expand Up @@ -784,12 +826,44 @@ const resolveReference = (
};
};

/** A selected table value is not proof of its use or its deployed URL. */
const resolveViteTableCandidate = (
context: JavaScriptArtifactGraphContext,
sourcePath: string,
specifier: string,
): ArtifactPathResolution => {
const local =
specifier.startsWith(".") || specifier.startsWith("/")
? resolveArtifactPathByContext({
declaredPath: specifier,
sourcePath,
context: "url-reference",
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
})
: findViteTableCandidateByAncestor(context, sourcePath, specifier);
const candidate = local.resolved_path ?? local.candidate_path;
return {
declared_path: specifier,
resolution_context: "url-reference",
resolved_path: null,
resolution_status: "unavailable",
...(candidate === undefined ? {} : { candidate_path: candidate }),
limitations: [
"The selected Vite dependency table value is a candidate; its use, runtime URL base, and applicable import maps are not established.",
...local.limitations,
],
unexamined_module_imports: true,
};
};

/**
* Vite's preload helper prefixes the configured base to a path under the
* build output directory, which is an ancestor of the importing chunk. Only
* one ancestor holding the file establishes that directory.
* Find possible matching table values in ancestor directories. A unique
* match is a candidate only; it does not establish the runtime URL base.
*/
const resolveViteOutputDependency = (
const findViteTableCandidateByAncestor = (
context: JavaScriptArtifactGraphContext,
sourcePath: string,
dependency: string,
Expand Down Expand Up @@ -828,7 +902,7 @@ const resolveViteOutputDependency = (
limitations: [
...new Set([
...candidates.flatMap(({ limitations }) => limitations),
`Several ancestors of the importing file may hold this Vite build-output path (${paths.join(", ")}); the build output directory is not established.`,
`Several importer ancestors may match this Vite table value (${paths.join(", ")}); the runtime URL base is not established.`,
]),
],
};
Expand All @@ -838,11 +912,11 @@ const resolveViteOutputDependency = (
resolved_path: null,
resolution_status:
root.resolution_status === "resolved"
? "not-found"
? "unavailable"
: root.resolution_status,
limitations: [
...root.limitations,
"A Vite preload dependency is relative to the build output directory, and no ancestor of the importing file holds it. Select the build output directory, which holds index.html and the assets directory.",
"No inventoried ancestor matched this Vite table value; its runtime URL remains unknown.",
],
};
};
Expand Down
18 changes: 5 additions & 13 deletions src/domain/javascript/javascriptStaticAnalysis.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { hasScheme } from "../artifactPathSyntax.js";
import { VITE_OUTPUT_DEPENDENCY_PREFIX } from "./javascriptStaticAnalysisTypes.js";
import { createXhrOpenRequestQuery } from "./javascriptNetworkRequests.js";
import { uniqueSortedBy } from "../canonicalOrdering.js";
import * as t from "@babel/types";
Expand Down Expand Up @@ -267,19 +265,13 @@ function* retainViteReferencesSteps(
for (const specifier of specifiers) {
if (examined++ % 1024 === 0) yield;
const before = accumulator.references.length;
if (specifier === undefined) accumulator.unknownFindings += 1;
const retainedSpecifier =
specifier === undefined ||
specifier === "" ||
specifier.startsWith(".") ||
specifier.startsWith("/") ||
hasScheme(specifier)
? specifier
: `${VITE_OUTPUT_DEPENDENCY_PREFIX}${specifier}`;
// A table value is an observed candidate, not proof of a runtime load.
accumulator.unknownFindings += 1;
addReference(findings, {
node,
kind: "dynamic-import",
specifier: retainedSpecifier,
kind: "vite-table-candidate",
operation: "candidate",
specifier,
Comment thread
morluto marked this conversation as resolved.
Resolved
});
const reference = accumulator.references[before];
if (reference !== undefined) ordered.push(reference);
Expand Down
13 changes: 6 additions & 7 deletions src/domain/javascript/javascriptStaticAnalysisCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import {
import * as t from "@babel/types";
import { isIntrinsicMapLookup } from "./javascriptSemanticMapOperations.js";

import {
htmlUrlText,
stripQueryAndFragment,
} from "../artifactPathSyntax.js";
import { htmlUrlText, stripQueryAndFragment } from "../artifactPathSyntax.js";
import { sanitizeEndpointCandidate } from "../browserObservation.js";
import {
addFindingOnce,
Expand Down Expand Up @@ -361,7 +358,6 @@ const chunkLoadSpecifier = (
return { specifier: prefixedArgument("chunk:", node.arguments[0]) };
};


const requestConstructorUrl = (
node: t.Node,
bindings: JavaScriptSemanticAnalysisState,
Expand Down Expand Up @@ -816,13 +812,16 @@ export const addReference = (
expression: sourceSlice(context.source, input.node),
}
: { specifier, expression: null };
const identity =
input.kind === "vite-table-candidate"
? { kind: input.kind, operation: input.operation }
: { kind: input.kind, operation: input.operation ?? "load" };
addLocatedFinding(context, {
collection: context.accumulator.references,
key: `reference\0${input.kind}\0${input.operation ?? "load"}\0${reference.specifier ?? reference.expression}\0${input.resolutionBasePath ?? ""}`,
node: input.node,
value: {
kind: input.kind,
operation: input.operation ?? "load",
...identity,
...reference,
...(input.resolutionBasePath === undefined
? {}
Expand Down
15 changes: 11 additions & 4 deletions src/domain/javascript/javascriptStaticAnalysisState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,20 @@ export interface JavaScriptFindingContext {
}

/** Candidate import, require, worker, or service-worker reference. */
export interface JavaScriptReferenceInput {
readonly operation?: JavaScriptStaticReference["operation"];
export type JavaScriptReferenceInput = {
readonly node: t.Node;
readonly kind: JavaScriptStaticReference["kind"];
readonly specifier: string | undefined;
readonly resolutionBasePath?: string;
}
} & (
| { readonly kind: "vite-table-candidate"; readonly operation: "candidate" }
| {
readonly kind: Exclude<
JavaScriptStaticReference["kind"],
"vite-table-candidate"
>;
readonly operation?: "load" | "resolve";
}
);

/** Candidate route or network endpoint literal. */
export interface JavaScriptEndpointInput {
Expand Down
Loading
Loading