Skip to content

fix: replace deprecated url.parse() with new URL()#945

Closed
mriganshu16 wants to merge 1 commit into
web-push-libs:masterfrom
mriganshu16:fix-url-parse-deprecation
Closed

fix: replace deprecated url.parse() with new URL()#945
mriganshu16 wants to merge 1 commit into
web-push-libs:masterfrom
mriganshu16:fix-url-parse-deprecation

Conversation

@mriganshu16

Copy link
Copy Markdown

Node.js 24 throws a deprecation warning (DEP0169) when url.parse()
is used. This replaces the two usages of url.parse() in web-push-lib.js
with the modern WHATWG URL API (new URL()), which is the recommended
replacement.

Fixes the issue reported in #943

Comment thread src/web-push-lib.js
@@ -1,3 +1,3 @@
'use strict';

const url = require('url');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this still required?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi @mriganshu16, can you update the PR?

@alexneventchin

Copy link
Copy Markdown

Bump, this should get merged

@marco-c

marco-c commented Jul 11, 2026

Copy link
Copy Markdown
Member

This was done in #948.

@marco-c marco-c closed this Jul 11, 2026
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.

5 participants