Skip to content

stop using deprecated url.parse API - #669

Merged
klippx merged 3 commits into
masterfrom
650-url-parse
Jul 22, 2026
Merged

stop using deprecated url.parse API#669
klippx merged 3 commits into
masterfrom
650-url-parse

Conversation

@klippx

@klippx klippx commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Fixes #650

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d569b45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mappersmith Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Node HTTP gateway to avoid Node.js v24’s deprecation warning for the legacy url.parse() API by switching to the WHATWG URL API, and adds a changeset documenting the patch release.

Changes:

  • Replaced url.parse(this.request.url()) with new URL(this.request.url()) and manual http.request option construction in the Node HTTP gateway.
  • Added a changeset entry marking this as a patch release and describing the deprecation-driven change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/gateway/http.ts Switches URL parsing from deprecated url.parse() to WHATWG URL to remove DEP0169 warnings.
.changeset/brown-games-sing.md Adds a patch changeset describing the migration away from url.parse().

Comment thread src/gateway/http.ts
Comment thread src/gateway/http.ts
Comment thread .changeset/brown-games-sing.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/gateway/http.ts:62

  • decodeURIComponent(parsedUrl.username/password) can throw (e.g., credentials containing a literal % are exposed by the WHATWG URL API already-decoded), which would make performRequest fail before any network call. Also, always appending : changes the auth string when no password is present.
    if (parsedUrl.username || parsedUrl.password) {
      defaults.auth = `${decodeURIComponent(parsedUrl.username)}:${decodeURIComponent(parsedUrl.password)}`
    }

@klippx
klippx merged commit 8098018 into master Jul 22, 2026
17 checks passed
@klippx
klippx deleted the 650-url-parse branch July 22, 2026 08:28
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.

Deprecation warning for url.parse (DEP0169)on Node.js v24

2 participants