hapijs / hapijs/hapi-pino

Set pino as a peerDependency and pino-pretty as an optionalDependency

Open
#95 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.