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

オープン
#133 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@sarankumar1325 がすでに取り組んでいます。

2026年11月11日 から。

  • #138 @sarankumar1325 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
bun, typescript
領域
release

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
0
フォーク
0
平均マージ
15時間 51分
マージ済み PR(30日)
21

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NanoForge-dev/actions のほかの issue

NanoForge-dev/actions の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。