nf publish gives no warning for invalid contents entries or a package with no contents

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

Start at the publish command and trace how it calls readPackageContents from @nanoforge-dev/registry; the issue says that function returns problems and that invalid entries are omitted from the archive. Check how the command handles flags and reports the file list. Done means it warns about those problems and an otherwise empty package, and refuses to publish in both cases unless the chosen force flag is set.

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

Mô tả

command:publish enhancement
Which package is this feature request for?

@nanoforge-dev/cli

Which command is this feature request for?

publish

Feature

nf publish gives no warning when the manifest's contents has entries @nanoforge-dev/registry can't read (an invalid kind, or a path like ./src/). Those paths are left out of the archive without a word, and the registry may refuse the manifest only after the upload. A manifest with no contents publishes only the manifest and the README/LICENSE/CHANGELOG files, with no warning either.

Ideal solution or implementation

Print the problems that readPackageContents returns as warnings before the file list, and warn when nothing but the root files would be packed. Refuse in both cases unless a flag such as --force is given.

Alternative solutions or implementations

Warnings only, never refusing.

Other context

Found during the feat/registry-lib change (not merged yet): @nanoforge-dev/registry moves from the editor to libs/registry, and nf install/publish/unpublish use it.

Ngôn ngữ chính
TypeScript
Star
2
Fork
2
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
17

Chuẩn bị môi trường

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 NanoForge-dev/CLI

Tất cả issue của NanoForge-dev/CLI

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.