Skip to content

Commit 00f4bc1

Browse files
authored
Merge pull request #2411 from github/koesie10/remove-deprecated-url-parse
Remove deprecated use of `url.parse`
2 parents 7dfa6f0 + 8a75399 commit 00f4bc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/ql-vscode/src/codeql-cli/distribution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { pathExists, mkdtemp, createWriteStream, remove } from "fs-extra";
33
import { tmpdir } from "os";
44
import { delimiter, dirname, join } from "path";
55
import * as semver from "semver";
6-
import { parse } from "url";
6+
import { URL } from "url";
77
import { ExtensionContext, Event } from "vscode";
88
import { DistributionConfig } from "../config";
99
import {
@@ -670,7 +670,7 @@ export class ReleasesApiConsumer {
670670
redirectUrl &&
671671
redirectCount < ReleasesApiConsumer._maxRedirects
672672
) {
673-
const parsedRedirectUrl = parse(redirectUrl);
673+
const parsedRedirectUrl = new URL(redirectUrl);
674674
if (parsedRedirectUrl.protocol !== "https:") {
675675
throw new Error("Encountered a non-https redirect, rejecting");
676676
}

0 commit comments

Comments
 (0)