Skip to content

url.parse() deprecation warning persists due to [email protected] pinning [email protected] #16201

@jhb-dev

Description

@jhb-dev

Describe the Bug

The url.parse() deprecation warning (DEP0169) was partially fixed in Payload v3.69.0 (#14978), but still occurs because @payloadcms/db-mongodb pins [email protected], which depends on mongodb@~6.16.0.

The MongoDB driver 6.x uses url.parse() internally (e.g. in mongodb/lib/utils.js). This was fixed in [email protected], which ships with [email protected].

Dependency chain:

@payloadcms/db-mongodb → [email protected] → mongodb@~6.16.0 (uses url.parse)

Proposed fix: Upgrade to mongoose@^9.x which depends on mongodb@~7.1 (no more url.parse()).

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/blob/main/packages/db-mongodb/package.json#L55

Reproduction Steps

  1. Create a Payload project with @payloadcms/db-mongodb
  2. Run with NODE_OPTIONS=--trace-deprecation
  3. Observe DEP0169 warning originating from mongodb/lib/utils.js (via mongoose 8.x)

Which area(s) are affected?

db: mongodb

Environment Info

Payload: 3.81.0 (latest)
mongoose: 8.15.1
mongodb: 6.16.0
Node: >= 21 (where DEP0169 is emitted)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions