Skip to content

DeprecationWarning: url.parse() (DEP0169) on Node.js Current #1251

Description

@silvertuanzi

Node version: 26.4.0
When running hexo s with the latest Node.js Current release, the following deprecation warning is emitted:

(node:21304) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)

With NODE_OPTIONS=--trace-deprecation:

    at Object.urlParse [as parse] (node:url:137:13)
    at Object.<anonymous> (C:\Users\pc\Desktop\MyFiles\blog\themes\fluid\scripts\helpers\export-config.js:14:19)

The warning comes from scripts/helpers/export-config.js:14:

hostname: url.parse(config.url).hostname || config.url,

url.parse() is deprecated in recent Node.js releases.


This is not a functional issue, but updating it would remove the deprecation warning for users running newer Node.js versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions