Skip to content

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

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

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?

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.

2 participants