From 976db5f25b34ae87fa3441b2c7f842fd1681c588 Mon Sep 17 00:00:00 2001 From: Rui Liang Date: Wed, 16 Sep 2026 20:58:14 +0800 Subject: [PATCH] fix(publish): tolerate E403 from npm access set npm restricts access management with automation tokens; publish --access public already makes packages public, so the extra access call is best-effort. --- scripts/publish.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/publish.mjs b/scripts/publish.mjs index 5a880aa..5733467 100644 --- a/scripts/publish.mjs +++ b/scripts/publish.mjs @@ -99,7 +99,13 @@ function isPublished(name, version) { } function ensurePublicAccess(name) { - run("npm", ["access", "set", "status=public", name]); + // Best-effort: npm publish --access public already makes the package public, + // and npm now returns E403 for access management with automation tokens. + try { + run("npm", ["access", "set", "status=public", name]); + } catch (error) { + console.warn(`Warning: could not set public access for ${name} (continuing): ${error.message.split("\n")[0]}`); + } } const packageVersions = new Map();