Skip to content

fix: resolve sentry-cli relative to react-native package#6240

Closed
shawnthye-guru wants to merge 1 commit into
getsentry:mainfrom
shawnthye-guru:fix/sentry-cli-relative-resolution
Closed

fix: resolve sentry-cli relative to react-native package#6240
shawnthye-guru wants to merge 1 commit into
getsentry:mainfrom
shawnthye-guru:fix/sentry-cli-relative-resolution

Conversation

@shawnthye-guru
Copy link
Copy Markdown

Summary

  • resolve @sentry/cli from @sentry/react-native's package location in the Android Gradle integration
  • use the same dependency-relative resolver in both iOS Xcode upload scripts
  • add a focused test that guards the resolver expression across Android and iOS scripts

Why

Package managers with isolated dependency layouts, such as pnpm, may not make @sentry/cli directly 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.sh
  • bash -n packages/core/scripts/sentry-xcode-debug-files.sh
  • git diff --check
  • verified the new resolver returns the pnpm store sentry-cli path in a pnpm React Native app where plain require.resolve('@sentry/cli/package.json') fails

@sdk-maintainer-bot
Copy link
Copy Markdown

This PR has been automatically closed. All non-maintainer contributions must reference an existing GitHub issue.

Next steps:

  1. Find or open an issue describing the problem or feature
  2. Discuss the approach with a maintainer in the issue
  3. Once a maintainer has acknowledged your proposed approach, open a new PR referencing the issue

Please review our contributing guidelines for more details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix: resolve sentry-cli relative to react-native package by shawnthye-guru in #6240
  • fix: Bump tmp to 0.2.7 to resolve path traversal vulnerability by antonis in #6233
  • feat(logs): Add enableAutoConsoleLogs option to opt out of console capture by alwx in #6235
  • chore(deps): update JavaScript SDK to v10.55.0 by github-actions in #6222
  • chore(deps): update Sentry Android Gradle Plugin to v6.9.0 by github-actions in #6230
  • refactor(android): Convert sentry.gradle to Kotlin DSL (sentry.gradle.kts) by antonis in #6119

🤖 This preview updates automatically when you update the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant