mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
refactor(reference): derive import lookup from reader inventory
This commit is contained in:
1 parent
44b716f2f2
commit
943ae604df
4 files changed
+14
-37
No files matched your search
@@ -534,7 +534,6 @@ const appendReadEntry = (
|
||||
/** Convert bounded reader observations into graph entries and parsed edges. */
|
||||
export const parseReferenceSourceEntries = (
|
||||
read: ReferenceSourceRead,
|
||||
filePaths: ReadonlySet<string>,
|
||||
exclusions: HistoricalSourceGraphInput["exclusions"],
|
||||
signal?: AbortSignal,
|
||||
): ParsedReferenceSourceEntries => {
|
||||
@@ -550,7 +549,11 @@ export const parseReferenceSourceEntries = (
|
||||
);
|
||||
const packageInventory = readPackageMetadata(read, exclusions);
|
||||
const context: SpecifierContext = {
|
||||
lookupPath: createReferenceSourcePathLookup(filePaths),
|
||||
lookupPath: createReferenceSourcePathLookup(
|
||||
read.entries
|
||||
.filter((entry) => entry.status === "read" && entry.kind === "file")
|
||||
.map((entry) => entry.path),
|
||||
),
|
||||
packages: packageInventory.packages,
|
||||
packageManifestPathLookup: packageInventory.pathLookup,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user