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
- Create a Payload project with
@payloadcms/db-mongodb
- Run with
NODE_OPTIONS=--trace-deprecation
- 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)
Describe the Bug
The
url.parse()deprecation warning (DEP0169) was partially fixed in Payload v3.69.0 (#14978), but still occurs because@payloadcms/db-mongodbpins[email protected], which depends onmongodb@~6.16.0.The MongoDB driver 6.x uses
url.parse()internally (e.g. inmongodb/lib/utils.js). This was fixed in[email protected], which ships with[email protected].Dependency chain:
Proposed fix: Upgrade to
mongoose@^9.xwhich depends onmongodb@~7.1(no moreurl.parse()).Link to the code that reproduces this issue
https://github.com/payloadcms/payload/blob/main/packages/db-mongodb/package.json#L55
Reproduction Steps
@payloadcms/db-mongodbNODE_OPTIONS=--trace-deprecationmongodb/lib/utils.js(via mongoose 8.x)Which area(s) are affected?
db: mongodb
Environment Info