Skip to content

Remove DEP0169 url.parse() usage from setup-nuget v3 runtime path#233

Merged
jeffkl merged 2 commits into
mainfrom
copilot/fix-deprecation-warning-url-parse
Apr 13, 2026
Merged

Remove DEP0169 url.parse() usage from setup-nuget v3 runtime path#233
jeffkl merged 2 commits into
mainfrom
copilot/fix-deprecation-warning-url-parse

Conversation

Copilot AI commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #232

setup-nuget@v3 emits Node DEP0169 warnings under newer runners because typed-rest-client (used by version resolution) relies on url.parse(). This change removes that dependency from the action’s runtime path and switches URL handling to WHATWG URL APIs.

  • Runtime path: replace typed-rest-client with native HTTPS + WHATWG URL

    • Reworked src/pick-version.ts to fetch https://dist.nuget.org/tools.json via https.get(new URL(...))
    • Preserved retry behavior with explicit retry loop
    • Kept existing version-selection semantics intact (latest, preview, semver range)
  • Dependency cleanup

    • Removed typed-rest-client from runtime dependencies (package.json, lockfile)
  • Test updates for URL API consistency

    • Updated installer test URL path derivation to use WHATWG URL instead of url.parse()
  • Generated artifacts updated

    • Regenerated lib/ and dist/ outputs so published action code reflects the runtime change
const requestUrl = new URL('https://dist.nuget.org/tools.json');
https.get(requestUrl, response => {
  // parse JSON and resolve versions
});

Copilot AI changed the title [WIP] Fix deprecation warning for url.parse usage in setup-nuget@v3 Remove DEP0169 url.parse() usage from setup-nuget v3 runtime path Apr 13, 2026
Copilot AI requested a review from jeffkl April 13, 2026 18:00
@jeffkl
jeffkl marked this pull request as ready for review April 13, 2026 18:07
@jeffkl
jeffkl requested a review from a team as a code owner April 13, 2026 18:07
@jeffkl
jeffkl merged commit b26b823 into main Apr 13, 2026
5 of 6 checks passed
@jeffkl
jeffkl deleted the copilot/fix-deprecation-warning-url-parse branch April 13, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: [DEP0169] DeprecationWarning: url.parse() usage in setup-nuget@v3

3 participants