Skip to content

Fix deprecation warning from legacy node url module#299

Merged
danmactough merged 3 commits intomasterfrom
claude/node-20-11-1-emits-deprecation-warning-dep0170-1E55R
Mar 21, 2026
Merged

Fix deprecation warning from legacy node url module#299
danmactough merged 3 commits intomasterfrom
claude/node-20-11-1-emits-deprecation-warning-dep0170-1E55R

Conversation

@danmactough
Copy link
Owner

Fixes #295

Switching over to the WHATWG URL library resolves the deprecation warning (and future-proofs us for when the deprecated methods are removed).

claude and others added 3 commits March 20, 2026 21:12
The legacy url.resolve() and url.parse() APIs trigger DEP0170 deprecation
warnings in Node 20.11.1+ when they encounter invalid URLs like tag: URIs
(e.g. tag:mefi.social,2024-01-26:objectId=20368395).

Switch to the WHATWG URL constructor throughout utils.js. URL resolution
now wraps new URL(pathUrl, baseUrl) in a try/catch so that non-resolvable
URIs (tag:, urn:, and similar schemes) are returned unchanged rather than
throwing or emitting a deprecation warning.

Fixes #295.

https://claude.ai/code/session_01V3aqinwFj3H6atH9MFX36r
The project's ESLint config has no ecmaVersion set, which defaults to ES5.
Destructuring syntax is ES6+, so replace with a simple property access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@danmactough danmactough marked this pull request as ready for review March 21, 2026 00:53
@danmactough danmactough merged commit 4ad95ce into master Mar 21, 2026
5 checks passed
@danmactough danmactough mentioned this pull request Mar 21, 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.

Node 20.11.1 emits deprecation warning DEP0170

2 participants