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
Currently,
DockerClientcan't be used withoutssh2(a very large dependency) being in the dependency tree, despite it only being used in one branch ofDockerClient.fromDockerHost. If consumers don't connect over ssh, they shouldn't need that dependency.I'd recommend:
DockerClientand into their own modules. That should solve the dependency tree problem (via tree-shaking) for anybody bundling their appnode_modulesimpact), it'd be good to also makessh2an optional peer dependency and make thessh://-specific code paths fail if it's not present