refactor(javascript): centralize package and JSON document facts

This commit is contained in:
morluto
2026-10-23 14:39:17 +08:00
parent 4cfc61147b
commit 37e92e430b
29 changed files with 748 additions and 113 deletions
@@ -562,6 +562,7 @@ export const addJavaScriptPackageNodes = (
context: "package-entrypoint",
runtimePathKind: "node-entrypoint",
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
}),
@@ -689,6 +690,7 @@ const addPackageRole = (
? { runtimePathKind: "node-entrypoint" as const }
: {}),
files: context.filesByPath,
jsonDocuments: context.analysis.jsonDocuments,
directoryPaths: context.directoryPaths,
unanalyzedFiles: context.unanalyzedFiles,
});