From 642ef2877207136c6d0c3ee881ce9efabff564e0 Mon Sep 17 00:00:00 2001 From: Copilot Date: Thu, 7 May 2026 21:49:55 +0300 Subject: [PATCH] fix: pin SDK dependency to insider version during publish The insider CLI published with \@bradygaster/squad-sdk: >=0.9.0\ which causes npm to resolve the stable SDK (0.9.4) instead of the matching insider SDK (0.9.6-insider.1). This happens because npm semver ranges do not match prerelease versions. The fix pins the CLI's SDK dependency to the exact insider version during the publish workflow, ensuring users get the correct SDK with all new exports (e.g. resolveSquadState from PR #1004). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/squad-insider-publish.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/squad-insider-publish.yml b/.github/workflows/squad-insider-publish.yml index c31399cb9..e980371f5 100644 --- a/.github/workflows/squad-insider-publish.yml +++ b/.github/workflows/squad-insider-publish.yml @@ -138,6 +138,12 @@ jobs: for (const p of paths) { const pkg = JSON.parse(fs.readFileSync(p, 'utf8')); pkg.version = '${VERSION}'; + // Pin CLI's SDK dependency to the exact insider version so npm + // resolves the prerelease SDK instead of falling back to latest stable. + if (p.includes('squad-cli') && pkg.dependencies && pkg.dependencies['@bradygaster/squad-sdk']) { + pkg.dependencies['@bradygaster/squad-sdk'] = '${VERSION}'; + console.log(' pinned @bradygaster/squad-sdk dep → ' + '${VERSION}'); + } fs.writeFileSync(p, JSON.stringify(pkg, null, 2) + '\n'); console.log(p + ' → ' + '${VERSION}'); }