Skip to content

Commit

Permalink
fix(core): ensure the unversioned to have a path after update
Browse files Browse the repository at this point in the history
  • Loading branch information
hasundue committed May 22, 2024
1 parent a0a2af3 commit 847e814
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions core/dependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@ export async function resolveLatestVersion(
: undefined;
const cached = cache?.get(dependency.name);
if (cached) {
console.log(dependency);
console.log(cached);
return { ...cached, path: dependency.path };
dependency.version === undefined
? {
name: cached.name,
path: dependency.name.slice(cached.name.length),
}
: { ...cached, path: dependency.path };
}
if (cached === null) {
// The dependency is already found to be up to date or unable to resolve.
Expand Down Expand Up @@ -220,13 +223,6 @@ class LatestVersionCache implements Disposable {
}
}

function reparseUnversionedWithCached(
dependency: Dependency & { version: undefined },
cached: UpdatedDependency,
) {
const { name, version, path } = cached;
}

async function _resolveLatestVersion(
dependency: Dependency,
): Promise<UpdatedDependency | undefined> {
Expand Down

0 comments on commit 847e814

Please sign in to comment.