Alpha release deprecates the current alpha again when it is already deprecated

Đang mở
#133 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

@sarankumar1325 đang làm issue này rồi.

Từ ngày 11/11/2026.

  • #138 của @sarankumar1325 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
bun, typescript
Lĩnh vực
release

Hướng nghiên cứu

Read src/prerelease/prerelease-version.ts around resolveAlphaRelease and inspect the open pull request #138, which is already working on this issue. The reproduction in the issue shows the failure; done means the already-deprecated current version is absent from toDeprecate on a rerun.

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

Mô tả

bug good first issue
Issue description

resolveAlphaRelease (src/prerelease/prerelease-version.ts#L50-L51) collects the branch's alphas in a Set of objects, which doesn't dedupe by version. It then adds the committed current version as a new { version } with no deprecated field. When that version is already deprecated on npm (e.g. a re-run), it lands in toDeprecate, and npm deprecate runs on it again and overwrites its message, which #91 meant to stop. This code predates the #91 fix, so it's a path that fix missed rather than a regression.

Reproduced:

$ bun -e 'resolveAlphaRelease("1.0.1-alpha.x.2", "feat/x", [{version:"1.0.1-alpha.x.2",deprecated:"Superseded"},{version:"1.0.1-alpha.x.1",deprecated:"S"}])'
{ newVersion: "1.0.1-alpha.x.3", toDeprecate: [ "1.0.1-alpha.x.2" ] }

Expected: toDeprecate is empty here. Keying by version (a Map) and adding the current version only when npm doesn't list it fixes it.

Found by a read-only audit of main at 435a16b (first done at 046494f; no src/ file changed in between), report audits/actions-2026-11-11.md in the workspace repo.

Code sample
resolveAlphaRelease("1.0.1-alpha.x.2", "feat/x", [
  { version: "1.0.1-alpha.x.2", deprecated: "Superseded" },
  { version: "1.0.1-alpha.x.1", deprecated: "S" },
]);
// toDeprecate: ["1.0.1-alpha.x.2"], expected []
Versions
  • @nanoforge-dev/actions 3.3.0 (main at 435a16b)
  • Bun 1.3.14
Issue priority

Low (slightly annoying)

I have tested this issue on a development release

435a16b

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Merge trung bình
15 giờ 51 phút
Pull request đã merge (30 ngày)
21

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/actions

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

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.