From 6d4bf108bb0c0e8cc195d4909acd94b1b5d0f19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Wed, 13 May 2026 03:52:10 +0000 Subject: [PATCH] fix(publish-all): regenerate lockfile before pack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After bumping versions, bun pm pack reads the old bun.lock and resolves workspace:* to stale versions. Now deletes bun.lock and runs bun install before the pack loop to ensure correct resolution. 小橘 --- scripts/publish-all.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/publish-all.sh b/scripts/publish-all.sh index 851a3cd..1601f58 100755 --- a/scripts/publish-all.sh +++ b/scripts/publish-all.sh @@ -1,6 +1,11 @@ #!/usr/bin/env bash # Publish all public @uncaged/* packages to Gitea npm registry. # +# PITFALL: After bumping versions in package.json, bun pm pack still reads the +# old bun.lock and resolves workspace:* to the previous (stale) versions. +# This script deletes bun.lock and runs bun install before packing to force +# correct resolution of workspace:* dependencies. +# # Usage: # ./scripts/publish-all.sh # Publish all packages # ./scripts/publish-all.sh --dry-run # Show what would be published @@ -95,6 +100,11 @@ for name in result: print(name_to_dir[name]) ") +# Regenerate lockfile so bun pm pack resolves workspace:* to freshly-bumped versions +cd "$MONOREPO_ROOT" +rm -f bun.lock +bun install + ok=0 fail=0