Skip to content

Usage of url.parse in default app triggers deprecation warning #49550

@timfish

Description

@timfish

Preflight Checklist

Electron Version

40.0.0

What operating system(s) are you using?

macOS

Operating System Version

Latest

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

The default app should not trigger deprecation warnings

Actual Behavior

(node:94934) [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.
     at Module.urlParse (node:url:136:13)
     at file:///Users/tim/.cache/40.0.0-arm64/Electron.app/Contents/Resources/default_app.asar/main.js:231:26
     at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:671:26)
     at async node:electron/js2c/browser_init:2:139459
     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)",

Which is triggered by this:

const protocol = url.parse(file).protocol;

Testcase Gist URL

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    👍 Does Not Block Stable

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions