Migrate from @sentry/cli to the new getsentry/cli
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nodejs, shell, typescript
- Lĩnh vực
- build-system, cli, mobile-dev
Hướng nghiên cứu
The issue lists the specific files that invoke the CLI: scripts/update-cli.sh, packages/core/scripts/sentry-xcode.sh, packages/core/scripts/sentry-xcode-debug-files.sh, packages/core/sentry.gradle.kts, and the @sentry/expo-upload-sourcemaps package. Start by examining these files to understand how the old @sentry/cli is referenced and invoked. The main change is in sentry-xcode.sh line 64, where the argument passing needs to switch from a positional to --build-script. Test the changes by running the build scripts in a React Native project to ensure source map and debug file uploads still work.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Migrate the SDK's build-time tooling from the legacy @sentry/cli (currently 3.8.0) to the new getsentry/cli.
Motivation and Context
Today @sentry/react-native depends on @sentry/cli v3 directly, while @sentry/bundler-plugins still resolves @sentry/cli v2. Because these are two incompatible majors, npm/yarn cannot dedupe them and users get the CLI binary installed twice (once per major).
With v11 of the SDKs — and therefore the bundler plugin — we move to the new getsentry/cli, skipping v3 of the old CLI on the plugin side. Aligning the React Native SDK onto the same new CLI removes the duplicate binary and keeps the RN SDK and bundler plugin on a single, shared CLI.
Reported by a user hitting the double-install.
Scope / current CLI touchpoints
The CLI is invoked from build-time scripts, not the JS runtime:
scripts/update-cli.sh— pins the CLI version (packages/core, root,packages/expo-upload-sourcemaps).packages/core/scripts/sentry-xcode.sh—react-native xcode(source maps upload).packages/core/scripts/sentry-xcode-debug-files.sh—debug-files upload(dSYM,--include-sources).packages/core/sentry.gradle.kts— resolves/invokes the CLI for Android.@sentry/expo-upload-sourcemaps— bundled CLI for Expo.
Migration risks
Overall: medium-low. Distribution is one platform binary per npm install.
-
Binary distribution — the new CLI, like the old one, installs one platform binary through npm. No change in install footprint.
-
debug-files upload— supports dSYM and--include-sources. ✅ parity. -
react-native xcode/react-native gradle— both exist in the new CLI and mirror the legacy workflows. ✅ parity. -
⚠️ Xcode wrapper build-script argument (needs code change + testing) — the existing wrapper passes the RN build-script path as a trailing positional:
# packages/core/scripts/sentry-xcode.sh:64 REACT_NATIVE_XCODE_WITH_SENTRY="\"$SENTRY_CLI_EXECUTABLE\" react-native xcode $ARGS \"$REACT_NATIVE_XCODE\""The new command expects the build script via
--build-script; positionals are forwarded to the script instead. The wrapper must be adjusted and tested (default path + custom$1override, spaces in paths — see #6583).
Acceptance criteria
- RN SDK,
@sentry/expo-upload-sourcemaps, and the bundler plugin resolve to a single CLI — no duplicate binary install. - iOS source maps upload works (default and custom build-script path, paths with spaces).
- iOS debug-files (dSYM) upload works, including
--include-sources. - Android (
sentry.gradle.kts) upload works on both architectures. - Expo sourcemaps upload works.
-
SENTRY_DISABLE_AUTO_UPLOAD/SENTRY_ALLOW_FAILUREbehavior preserved. -
scripts/update-cli.sh/ version-pinning updated for the new CLI. - Update
LICENSEfiles similar to getsentry/sentry-javascript#24956
Next steps
Target: v11 (align with the bundler plugin's move to the new CLI).
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 371
- Merge trung bình
- 22 giờ 3 phút
- Pull request đã merge (30 ngày)
- 106
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của getsentry/sentry-react-native
-
React-Native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
getsentry/sentry-react-native#7073 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improvement React-Native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
getsentry/sentry-react-native#7055 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
React-Native Replays Task
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
getsentry/sentry-react-native#6680 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improvement React-Native
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getsentry/sentry-react-native#6143 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
React-Native Task User Feedbacks
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
getsentry/sentry-react-native#5932 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của getsentry/sentry-react-native
Issue tương tự
-
area:config bug priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Doezer/Questarr#1451 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
sidebandstudio/clawtrate#1156 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
WenyuChiou/agent-board#1993 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug design
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Colorado-Startups/coloradostartups.org#151 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jarrodwatts/claude-hud#883 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày