Skip to content

Commit

Permalink
fix type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jun 21, 2024
1 parent 90205de commit 3bbcf83
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,18 @@ function selectTag(tags: string[], oldRef: string, useGreatest: boolean) {
}
}
async function checkUrlDep(key: string, dep: Dep, useGreatest: boolean) {
type CheckResult = {
key: string,
newRange: string,
user: string,
repo: string,
oldRef: string,
newRef: string,
newDate?: string,
newTag?: string,
};
async function checkUrlDep(key: string, dep: Dep, useGreatest: boolean): Promise<CheckResult | undefined> {
const stripped = dep.old.replace(stripRe, "");
const [_, user, repo, oldRef] = partsRe.exec(stripped) || [];
if (!user || !repo || !oldRef) return;
Expand Down Expand Up @@ -991,8 +1002,7 @@ async function main() {
}), {concurrency});

for (const res of (results || []).filter(Boolean)) {
// @ts-expect-error
const {key, newRange, user, repo, oldRef, newRef, newDate} = res;
const {key, newRange, user, repo, oldRef, newRef, newDate} = res as CheckResult;
deps[mode][key] = {
// @ts-expect-error
old: maybeUrlDeps[key].old,
Expand Down

0 comments on commit 3bbcf83

Please sign in to comment.