fix: resolve sentry-cli relative to react-native package#6242
fix: resolve sentry-cli relative to react-native package#6242shawnthye-guru wants to merge 2 commits into
Conversation
|
This PR has been automatically closed. The referenced issue does not show a discussion between you and a maintainer. To avoid wasted effort on both sides, please discuss your proposed approach in the issue first and wait for a maintainer to respond before opening a PR. Please review our contributing guidelines for more details. |
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
The executable bit was removed from this file. I think we need to restore 755
| const expoUploadSourcemapsScript = fs.readFileSync( | ||
| path.join(EXPO_UPLOAD_SOURCEMAPS_DIR, 'cli.js'), | ||
| 'utf8', | ||
| ); |
There was a problem hiding this comment.
This should make the linter happy
| const expoUploadSourcemapsScript = fs.readFileSync( | |
| path.join(EXPO_UPLOAD_SOURCEMAPS_DIR, 'cli.js'), | |
| 'utf8', | |
| ); | |
| const expoUploadSourcemapsScript = fs.readFileSync(path.join(EXPO_UPLOAD_SOURCEMAPS_DIR, 'cli.js'), 'utf8'); |
antonis
left a comment
There was a problem hiding this comment.
Thank you for your contribution @shawnthye-guru 🙇
Overall the PR looks good. I've only left a couple of comments.
Please also add a changelog entry to communicate the change. E.g. a fix entry like:
Resolve `sentry-cli` in isolated dependency layouts ([#6242](https://github.com/getsentry/sentry-react-native/pull/6242))
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 92d3ec5. Configure here.
Fixes #6241
Summary
@sentry/clifrom@sentry/react-native's package location in the Android Gradle integrationWhy
Package managers with isolated dependency layouts, such as pnpm, may not make
@sentry/clidirectly resolvable from the app's native project directory even though it is available as a dependency of@sentry/react-native. Resolving with{ paths: [require.resolve('@sentry/react-native/package.json')] }lets Node resolve the CLI from the React Native SDK dependency graph before falling back to the existing pnpm shim parsing.Validation
bash -n packages/core/scripts/sentry-xcode.shbash -n packages/core/scripts/sentry-xcode-debug-files.shgit diff --checksentry-clipath in a pnpm React Native app where plainrequire.resolve('@sentry/cli/package.json')failsPrior Art
This replaces #6240, which was auto-closed because it did not reference a GitHub issue.