Make `ssh2` an optional peer dependency

Đang mở
#64 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, node.js, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Start by tracing DockerClient.fromDockerHost and the package dependency declarations to see how ssh2 enters consumer dependency trees. Check the bundling and installation behavior for consumers that do not use SSH, and verify that ssh:// paths fail clearly when ssh2 is absent.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
TypeScript
Star
107
Fork
12
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của docker/node-sdk

Tất cả issue của docker/node-sdk

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.