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

Aperta
#133 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@sarankumar1325 ci sta già lavorando.

Dal 11/11/2026.

  • #138 di @sarankumar1325 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
bun, typescript
Ambito
release

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
0
Fork
0
Merge medio
15h 51m
PR unite (30g)
21

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NanoForge-dev/actions

Tutte le issue di NanoForge-dev/actions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.