From b89889961950f1d52613dfe4caecd76fdef1a485 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Thu, 29 Feb 2024 12:20:03 +0000 Subject: [PATCH 1/4] Add Windows node reference. --- scripts/expo-upload-sourcemaps.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/expo-upload-sourcemaps.js b/scripts/expo-upload-sourcemaps.js index 11600a4465..c81f0dcc5c 100755 --- a/scripts/expo-upload-sourcemaps.js +++ b/scripts/expo-upload-sourcemaps.js @@ -180,7 +180,8 @@ for (const [assetGroupName, assets] of Object.entries(groupedAssets)) { } const isHermes = assets.find(asset => asset.endsWith('.hbc')); - execSync(`${sentryCliBin} sourcemaps upload ${isHermes ? '--debug-id-reference' : ''} ${assets.join(' ')}`, { + const windowsCallback = process.platform === "win32" ? 'node ' : ''; + execSync(`${windowsCallback}${sentryCliBin} sourcemaps upload ${isHermes ? '--debug-id-reference' : ''} ${assets.join(' ')}`, { env: { ...process.env, [SENTRY_PROJECT]: sentryProject, @@ -195,8 +196,7 @@ if (numAssetsUploaded === totalAssets) { console.log('✅ Uploaded bundles and sourcemaps to Sentry successfully.'); } else { console.warn( - `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${ - numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : '' + `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : '' }`, ); } From 17bd4e92eb7b9e1abec2cd62e20409b65ff58816 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Thu, 29 Feb 2024 12:25:17 +0000 Subject: [PATCH 2/4] changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca85f154c4..bb57c47337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixes +- expo-upload-sourcemaps now works on Windows ([#3643](https://github.com/getsentry/sentry-react-native/pull/3643)) - Option `enabled: false` ensures no events are sent ([#3606](https://github.com/getsentry/sentry-react-native/pull/3606)) - Ignore JSON response when retrieving source context from local Expo Dev Server ([#3611](https://github.com/getsentry/sentry-react-native/pull/3611)) From fbb2e187f8498fd796d201667d549803c559efa7 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Thu, 29 Feb 2024 12:49:11 +0000 Subject: [PATCH 3/4] Update scripts/expo-upload-sourcemaps.js --- scripts/expo-upload-sourcemaps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/expo-upload-sourcemaps.js b/scripts/expo-upload-sourcemaps.js index c81f0dcc5c..6378784fdc 100755 --- a/scripts/expo-upload-sourcemaps.js +++ b/scripts/expo-upload-sourcemaps.js @@ -196,7 +196,8 @@ if (numAssetsUploaded === totalAssets) { console.log('✅ Uploaded bundles and sourcemaps to Sentry successfully.'); } else { console.warn( - `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : '' + `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${ + numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : ''``` }`, ); } From a8d3d899e71818ec41498e6401cf7efb8d781219 Mon Sep 17 00:00:00 2001 From: LucasZF Date: Thu, 29 Feb 2024 12:49:26 +0000 Subject: [PATCH 4/4] Update scripts/expo-upload-sourcemaps.js --- scripts/expo-upload-sourcemaps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/expo-upload-sourcemaps.js b/scripts/expo-upload-sourcemaps.js index 6378784fdc..64cf243c26 100755 --- a/scripts/expo-upload-sourcemaps.js +++ b/scripts/expo-upload-sourcemaps.js @@ -197,7 +197,7 @@ if (numAssetsUploaded === totalAssets) { } else { console.warn( `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${ - numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : ''``` + numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : '' }`, ); }