npm lookups read registry errors as not published

未关闭
#132 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@tylrcc 已经在做这个了。

开始于 2026年11月11日。

  • #139 来自 @tylrcc —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
领域
backend, release

调研方向

Read src/lib/registry.ts around isOnNpm and src/prerelease/prerelease-version.ts around fetchDevVersions; compare both with nfRegistryVersions in the same prerelease file. Check existing tests for these lookups and confirm they distinguish 404 from other non-2xx responses. Done means only 404 is treated as absent and other registry errors fail the step.

由索引模型根据 Issue 内容生成。

描述

bug good first issue
Issue description

Both npm lookups read an error as "nothing there":

During an npm outage or a rate limit (traced, not run):

  • a release re-run tries to publish a version that is already out and fails;
  • an alpha whose committed version isn't on this branch's prefix restarts at .0, and the publish fails on a taken version;
  • a beta publishes and silently deprecates nothing.

nfRegistryVersions in the same file already does it right: [] on 404 only, and an error on any other status.

Expected: only a 404 means "not published"; any other status fails the step.

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
export const isOnNpm = async (name: string, version: string): Promise<boolean> =>
  (await fetch(`https://registry.npmjs.org/${name}/${version}`)).ok;
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 分钟
30 天内合并 PR
21

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NanoForge-dev/actions 的其他 Issue

查看 NanoForge-dev/actions 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。