fastify-mongodb icon indicating copy to clipboard operation
fastify-mongodb copied to clipboard

chore: move mongodb to devDeps and add it to peerDeps

Open rtritto opened this issue 2 years ago • 8 comments
trafficstars

Checklist

rtritto avatar Oct 22 '23 14:10 rtritto

The default value of omit option is dev. From npm version >= 7 (Node version >= 16) peer dependencies are autoinstalled: source. Imply that mongodb, as peer dependency, will be installed with omit=dev.

rtritto avatar Oct 22 '23 14:10 rtritto

Unfortunately the minimum supported version of this module is Node v14.

mcollina avatar Oct 23 '23 05:10 mcollina

Generically we prefer to stay away from peerdependencies because they create more problems than what they are worth.

mcollina avatar Oct 23 '23 05:10 mcollina

Unfortunately the minimum supported version of this module is Node v14.

For mongodb v6 the minimum supported Node.js version is v16.20.1 (source).

rtritto avatar Oct 23 '23 07:10 rtritto

Oof, that's correct, good catch

A PR that downgrades it is welcome

gurgunday avatar Oct 23 '23 07:10 gurgunday

I would really prefer avoiding peerDependencies anyway. They are just a source of headaches for maintainers.

mcollina avatar Oct 23 '23 07:10 mcollina

Node v14 isn't mantained, when it will be removed?

rtritto avatar Oct 23 '23 08:10 rtritto

When Fastify v5 is released (probably by the end of this year)

gurgunday avatar Oct 23 '23 08:10 gurgunday

I am closing the PR because we avoid using peerDependencies in any case. So, it is not going to merge in anytime.

climba03003 avatar Apr 01 '24 07:04 climba03003