Skip to content

Commit b26b823

Browse files
authored
Remove DEP0169 url.parse() usage from setup-nuget v3 runtime path (#233)
1 parent 357a986 commit b26b823

8 files changed

Lines changed: 621 additions & 5080 deletions

File tree

__tests__/installer.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import nock from 'nock';
22
import mode2Perm from 'mode-to-permissions';
33
import * as path from 'path';
4-
import * as url from 'url';
54
import * as io from '@actions/io';
65
import * as fs from 'fs';
76

@@ -72,7 +71,8 @@ describe('installer tests', () => {
7271
.get(PATH)
7372
.once()
7473
.reply(200, TOOLS_JSON);
75-
const p = url.parse(TOOLS_JSON['nuget.exe'][0].url).path || '';
74+
const requestUrl = new URL(TOOLS_JSON['nuget.exe'][0].url);
75+
const p = `${requestUrl.pathname}${requestUrl.search}`;
7676
srv
7777
.get(p)
7878
.once()

0 commit comments

Comments
 (0)