From e09dc920021416765149c81de54b4d343789e058 Mon Sep 17 00:00:00 2001 From: Madraka <8898640+Madraka@users.noreply.github.com> Date: Thu, 22 Oct 2026 00:27:52 +0300 Subject: [PATCH] fix(release): tag and release even when npm is slow to serve a package `npm publish` had succeeded for every package, but the registry took longer than the five-minute wait to serve one (@cloudhal/cli in 0.3.8, @cloudhal/schedules in 0.3.10). The script threw, so the tag and the GitHub Release were skipped until a re-run (with a second approval). A package that npm accepted is published; the slow one is now a warning. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com> --- scripts/publish-ci.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/publish-ci.ts b/scripts/publish-ci.ts index a23902b2..61a30153 100644 --- a/scripts/publish-ci.ts +++ b/scripts/publish-ci.ts @@ -56,8 +56,11 @@ if (missing.length) { } for (let i = 0; i < 30 && (await unpublished(pkgs, onNpm)).length; i++) await new Promise((r) => setTimeout(r, 10_000)); + // `npm publish` succeeded for each, so the registry has them; it can take longer than five + // minutes to serve one (0.3.8, 0.3.10). That must not keep the tag and the release back. const left = await unpublished(pkgs, onNpm); - if (left.length) throw new Error(`npm does not serve yet: ${left.map((p) => p.name).join(", ")}`); + if (left.length) + console.warn(`npm does not serve yet: ${left.map((p) => p.name).join(", ")}; tagging anyway`); } else console.log(`npm already has every package at ${version}`); const tag = `v${version}`;