Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

fix: allow npm scan delay before verifying publication

Tw9383084c930bbd
diff --git a/.agents/skills/release/SKILL.md b/.agents/skills/release/SKILL.md
index 3a9703b5..6a05b370 100644
--- a/.agents/skills/release/SKILL.md
+++ b/.agents/skills/release/SKILL.md
@@ -128,6 +128,7 @@ Apply with a notes file to avoid shell escaping: `gh release edit VX.Y.Z --title
- npm package settings should use the strict publishing option: require two-factor authentication and disallow tokens. Trusted Publishing still works with this setting.
- If local fallback is unavoidable, prefer `npm exec --yes [email protected] -- npm publish --registry=https://registry.npmjs.org` so `prepublishOnly` can find the pinned pnpm version.
- Do not reply to GitHub issues or close them as released until `npm view [email protected] version` returns the expected version. `npm view pake-cli version` alone is not enough because `latest` can point at a different commit than the fix under review.
+- npm scans newly published packages before making them installable, typically for about five minutes and sometimes over 15 minutes ([npm announcement](https://github.blog/changelog/2026-07-28-npm-publish-time-malware-scanning-and-dual-use-metadata/)). The workflow allows 20 minutes for visibility. A successful publish followed by a verification timeout does not authorize republishing: inspect the registry and install the exact version once it becomes available, then report publish and verification outcomes separately.
- A `workflow_dispatch` run executes on a branch. For npm-only publishing, pass the exact `main` commit as `expected_sha` and a successful Quality run for that SHA as `quality_run_id`; the workflow rejects mismatches. Do not treat `headBranch`, run title, or compare UI as proof of the published source.
- If CI creates `chore: update contributors [skip ci]` after the tag is pushed, fast-forward local `main` after the release. Do not retag just to include generated contributor art.
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
index 6db03f60..9a80dbf6 100644
--- a/.github/workflows/npm-publish.yml
+++ b/.github/workflows/npm-publish.yml
@@ -109,13 +109,15 @@ jobs:
- name: Verify published version
run: |
VERSION="$(node -p "require('./package.json').version")"
- for attempt in {1..12}; do
+ # npm scans new versions before exposing them, typically for several
+ # minutes and sometimes longer than 15 minutes. Do not republish.
+ for attempt in {1..120}; do
PUBLISHED="$(npm view "pake-cli@${VERSION}" version --registry=https://registry.npmjs.org 2>/dev/null || true)"
if [ "$PUBLISHED" = "$VERSION" ]; then
echo "Published pake-cli@${VERSION}"
exit 0
fi
- echo "Waiting for npm registry to expose pake-cli@${VERSION} (attempt ${attempt}/12)"
+ echo "Waiting for npm registry to expose pake-cli@${VERSION} (attempt ${attempt}/120)"
sleep 10
done
echo "pake-cli@${VERSION} was not visible in npm registry after publish"