diff --git a/.changeset/wild-ducks-decide.md b/.changeset/wild-ducks-decide.md new file mode 100644 index 0000000000..8a6f85be73 --- /dev/null +++ b/.changeset/wild-ducks-decide.md @@ -0,0 +1,5 @@ +--- +'@astrojs/upgrade': patch +--- + +Fixes a bug that caused registry URLs that specify a port to be incorrectly detected as offline. diff --git a/packages/upgrade/src/actions/verify.ts b/packages/upgrade/src/actions/verify.ts index 384df5134a..3b7c15a9e1 100644 --- a/packages/upgrade/src/actions/verify.ts +++ b/packages/upgrade/src/actions/verify.ts @@ -43,8 +43,8 @@ export async function verify( } function isOnline(registry: string): Promise { - const { host } = new URL(registry); - return dns.lookup(host).then( + const { hostname } = new URL(registry); + return dns.lookup(hostname).then( () => true, () => false, );