From ef34373e273132a9117d2f542002e5db4b04293a Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Mon, 27 Apr 2026 11:38:33 +0200 Subject: [PATCH] fix(ci): Install both tarballs in validate job to satisfy cross-dep The validate job ran `npm install ` only. The published core package.json declares `@sentry/expo-upload-sourcemaps` at the same version as core (workspace:* is resolved at pack time). On a release branch the bumped version is not on the npm registry yet, so npm tried to fetch from registry and failed with ETARGET (e.g. when releasing 8.9.2: "No matching version found for @sentry/expo-upload-sourcemaps@8.9.2"). Install both tarballs together so the sister dep is satisfied from local. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/buildandtest.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index 25c6e8d048..bd47d0c1d4 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -210,11 +210,18 @@ jobs: - name: Install tarball into fresh project run: | set -e - TARBALL=$(find "$PWD/artifacts" -name 'sentry-react-native-*.tgz' -print -quit) + CORE_TARBALL=$(find "$PWD/artifacts" -name 'sentry-react-native-*.tgz' -print -quit) + EXPO_TARBALL=$(find "$PWD/artifacts" -name 'sentry-expo-upload-sourcemaps-*.tgz' -print -quit) + [ -n "$CORE_TARBALL" ] || { echo "::error::core tarball not found"; exit 1; } + [ -n "$EXPO_TARBALL" ] || { echo "::error::expo-upload-sourcemaps tarball not found"; exit 1; } mkdir -p /tmp/install-test cd /tmp/install-test npm init -y >/dev/null - npm install --no-save "$TARBALL" + # Install both local tarballs together so the @sentry/expo-upload-sourcemaps + # cross-dep is satisfied locally. On a release branch the bumped version + # is not on the npm registry yet (workspace:* resolves to the version + # we are about to publish), and a registry fetch would fail with ETARGET. + npm install --no-save "$EXPO_TARBALL" "$CORE_TARBALL" # workspace:* spec must have been resolved by yarn pack (#6037 regression) if grep -q 'workspace:' node_modules/@sentry/react-native/package.json; then echo "::error::published package.json still contains unresolved workspace: spec"