Skip to content

Usage of deprecated Node url.parse() #65

@chris-addison

Description

@chris-addison

Hey folks, just requesting a quick change in the package to remove a warning that shows in the console. Thanks in advance!

Expected Behavior

The standrard JS URL should be used instead

Current Behavior

Node's deprecated url.parse() is used in the package. This method is unmaintained and no longer receives security fixes.

When we start the package Node/Electron prints this warning:

(node:8930) [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.

Possible Solution

Switch to using URL() or URL.parse()

Steps to Reproduce

  1. Import @amplitude/experiment-node-server
  2. Initialize the service
  3. See warning message in console

Environment

  • JS Server SDK Version: Electron 40.0.0/Node 24.13.0
  • Installation Method: NPM
  • Browser and Version: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions