From dc64a3c620462828f396b41b6adc266c45fbda44 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Mon, 22 Sep 2025 13:39:41 -0700 Subject: [PATCH] fix(release): fix releasing npm packages with workspace deps --- scripts/release/sdk.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/release/sdk.ts b/scripts/release/sdk.ts index fbeb6ae637..11a6ea98e2 100644 --- a/scripts/release/sdk.ts +++ b/scripts/release/sdk.ts @@ -62,9 +62,13 @@ export async function publishSdk(opts: ReleaseOpts) { // Publish console.log(`==> Publishing to NPM: ${name}@${opts.version}`); - await $({ cwd: path })`pnpm install`; + + // Add --tag flag for release candidates + const isReleaseCandidate = opts.version.includes("-rc."); + const tag = isReleaseCandidate ? "rc" : "latest"; + await $({ - cwd: path, - })`pnpm npm publish --access public --tolerate-republish`; + stdio: "inherit", + })`pnpm --filter ${name} publish --access public --tag ${tag}`; } }