Skip to content

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

@ebickle

Description

@ebickle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions