Skip to content

Make ssh2 an optional peer dependency #64

@mark-dr

Description

@mark-dr

Currently, DockerClient can't be used without ssh2 (a very large dependency) being in the dependency tree, despite it only being used in one branch of DockerClient.fromDockerHost. If consumers don't connect over ssh, they shouldn't need that dependency.

I'd recommend:

  • Moving the static members out of DockerClient and into their own modules. That should solve the dependency tree problem (via tree-shaking) for anybody bundling their app
  • For everyone else (and just to minimise node_modules impact), it'd be good to also make ssh2 an optional peer dependency and make the ssh://-specific code paths fail if it's not present

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