mirror of
https://github.com/denoland/setup-deno.git
synced 2026-08-26 00:00:35 +02:00
chore: use versions.json from dl.deno.land (#130)
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- "1.33.1"
|
- "1.33.1"
|
||||||
- "canary"
|
- "canary"
|
||||||
- "~1.32"
|
- "~1.32"
|
||||||
- "b290fd01f3f5d32f9d010fc719ced0240759c049"
|
- "4e8b2f46ab638ae6fa20cf53a9a4cd3b5f4550bf"
|
||||||
- "rc"
|
- "rc"
|
||||||
- "lts"
|
- "lts"
|
||||||
|
|
||||||
|
|||||||
Vendored
+2
-2
@@ -19385,8 +19385,8 @@ async function resolveRelease(range) {
|
|||||||
kind: "stable"
|
kind: "stable"
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
const res = await fetchWithRetries("https://deno.com/versions.json");
|
const res = await fetchWithRetries("https://dl.deno.land/versions.json");
|
||||||
if (res.status !== 200) throw new Error("Failed to fetch stable version info from deno.com/versions.json. Please try again later.");
|
if (res.status !== 200) throw new Error("Failed to fetch stable version info from dl.deno.land/versions.json. Please try again later.");
|
||||||
const versionJson = await res.json();
|
const versionJson = await res.json();
|
||||||
if (typeof versionJson !== "object" || versionJson === null) throw new Error("Fetched stable version info is invalid.");
|
if (typeof versionJson !== "object" || versionJson === null) throw new Error("Fetched stable version info is invalid.");
|
||||||
if (!("cli" in versionJson)) throw new Error("Fetched stable version info is invalid.");
|
if (!("cli" in versionJson)) throw new Error("Fetched stable version info is invalid.");
|
||||||
|
|||||||
+2
-2
@@ -159,10 +159,10 @@ async function resolveRelease(range: string): Promise<Version | null> {
|
|||||||
}
|
}
|
||||||
return { version, kind: "stable" };
|
return { version, kind: "stable" };
|
||||||
} else {
|
} else {
|
||||||
const res = await fetchWithRetries("https://deno.com/versions.json");
|
const res = await fetchWithRetries("https://dl.deno.land/versions.json");
|
||||||
if (res.status !== 200) {
|
if (res.status !== 200) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Failed to fetch stable version info from deno.com/versions.json. Please try again later.",
|
"Failed to fetch stable version info from dl.deno.land/versions.json. Please try again later.",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const versionJson = await res.json();
|
const versionJson = await res.json();
|
||||||
|
|||||||
Reference in New Issue
Block a user