stop using deprecated url.parse API - #669
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: d569b45 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
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())withnew URL(this.request.url())and manualhttp.requestoption 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(). |
There was a problem hiding this comment.
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 makeperformRequestfail 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)}`
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #650