Set pino as a peerDependency and pino-pretty as an optionalDependency
- Dominant language
- JavaScript
- Stars
- 147
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
In the next 'breaking change' release, would it be possible to modify the package.json dependencies to use peer dependencies instead of direct dependencies?
- Having `pino-pretty` as a required dependency doesn't match the core pino documentation which states it generally should not be installed for production builds. `hapi-pino` does not appear to take a dependency on `pino-pretty`.
- Having `pino` as a required dependency creates a scenario where an application could have multiple versions of pino in its node_modules graph - for example, the application may be creating their own pino logger instance directly and passing it in via `options.instance`. The version of pino used by the application can, in some scenarios, be different than the one directly depended on by `hapi-pino`.
Contributor guide
Assessment
This issue has not been assessed yet.