Skip to content

Replace deprecated url.parse with URL constructor#60

Open
mcollina wants to merge 1 commit intomainfrom
fix/url-parse-deprecation
Open

Replace deprecated url.parse with URL constructor#60
mcollina wants to merge 1 commit intomainfrom
fix/url-parse-deprecation

Conversation

@mcollina
Copy link
Copy Markdown
Collaborator

@mcollina mcollina commented Apr 5, 2026

Replace deprecated url.parse() with the URL constructor to fix Node.js 24 deprecation warnings.

Changes

  • Replace url.parse() with new URL() in lib/utils/index.ts
  • Decode username/password from URL auth component using decodeURIComponent()
  • Handle unix socket paths explicitly (return early for paths starting with /)

Testing

  • All parseURL unit tests pass
  • No lint errors

Related

Fixes #58

@mcollina mcollina force-pushed the fix/url-parse-deprecation branch from babbd58 to af99aef Compare April 5, 2026 12:25
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@mcollina mcollina force-pushed the fix/url-parse-deprecation branch from af99aef to 728c233 Compare April 5, 2026 14:55
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.

DeprecationWarning: url.parse()

1 participant