Skip to content

docs(react-native): Use scoped npx call for expo sourcemap upload#17391

Merged
cleptric merged 2 commits intomasterfrom
antonis/rn-expo-sourcemap-scoped-npx
Apr 20, 2026
Merged

docs(react-native): Use scoped npx call for expo sourcemap upload#17391
cleptric merged 2 commits intomasterfrom
antonis/rn-expo-sourcemap-scoped-npx

Conversation

@antonis
Copy link
Copy Markdown
Contributor

@antonis antonis commented Apr 20, 2026

DESCRIBE YOUR PR

Changes the documented command for uploading Expo sourcemaps from npx sentry-expo-upload-sourcemaps dist to npx --package=@sentry/react-native -- sentry-expo-upload-sourcemaps dist.

The previous form resolves an unscoped package name on npm. Inside a project that has @sentry/react-native installed, npx uses the local node_modules/.bin entry and behaves correctly. But outside such a project (fresh shell, CI step that runs before install, copy-pasted tutorial command), npx falls through to the public registry — where the name is currently held by a third-party account (sentry-expo-upload-sourcemaps@5.24.1, published 2024-07-02). Its current payload is a benign wrapper.sh that forwards to our real binary, but it's a third-party entry point on the documented happy path.

The scoped form routes through @sentry/react-native, which is a locked npm scope — only Sentry org members can publish to it, so the registry fallback path cannot be intercepted. In-project behavior is unchanged because the local bin is still preferred.

A parallel exposure exists for Remix (sentry-upload-sourcemaps, same squatter); that doc update will be handled separately.

IS YOUR CHANGE URGENT?

  • None: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Invoke sentry-expo-upload-sourcemaps through @sentry/react-native so the
registry fallback cannot resolve to an unscoped package held by a third
party. In-project behavior is unchanged because the local node_modules/.bin
entry is still preferred.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Apr 20, 2026 0:22am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Apr 20, 2026 0:22am

Request Review

@codeowner-assignment codeowner-assignment Bot requested a review from a team April 20, 2026 12:09
The `--` was defensive but not needed: the command has no dashed args
to protect from npx flag parsing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@antonis antonis marked this pull request as ready for review April 20, 2026 12:13
@cleptric cleptric requested a review from a team April 20, 2026 12:14
@antonis antonis requested review from alwx and lucas-zimerman and removed request for a team April 20, 2026 12:20
Copy link
Copy Markdown
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cleptric cleptric merged commit 6237cec into master Apr 20, 2026
18 checks passed
@cleptric cleptric deleted the antonis/rn-expo-sourcemap-scoped-npx branch April 20, 2026 20:15
antonis added a commit that referenced this pull request Apr 23, 2026
… source maps (#17415)

## DESCRIBE YOUR PR

Updates the Expo source-maps upload guide to recommend the new scoped
CLI package:

```bash
SENTRY_AUTH_TOKEN=<token> \
npx @sentry/expo-upload-sourcemaps dist
```

This is the long-term form of the mitigation we started in #17391. That
PR routed the command through `--package=@sentry/react-native` to take
the unscoped registry name off the documented happy path; this PR
switches to the dedicated scoped package
`@sentry/expo-upload-sourcemaps`, which is shorter to type, cannot be
squatted (scope-protected), and is published and owned by Sentry.

An `<Alert>` block retains the previous `npx
--package=@sentry/react-native sentry-expo-upload-sourcemaps dist` form
for users on `@sentry/react-native` versions older than 8.9.0, where the
new package is not yet available. Both forms produce identical results.

## IS YOUR CHANGE URGENT?

- [x] None: Not urgent, can wait up to 1 week+

## ⚠️ Blocked on upstream

This PR should only merge **after** `@sentry/expo-upload-sourcemaps` is
published to npm. The first release is scheduled to ship with
`@sentry/react-native` 8.9.0 via
getsentry/sentry-react-native#6027. If this doc
lands before the package exists on the registry, users copy-pasting the
command will get `npm error 404 Not Found`.

## PRE-MERGE CHECKLIST

- [ ] `@sentry/expo-upload-sourcemaps` is live on npm (verify with `npm
view @sentry/expo-upload-sourcemaps version`)
- [ ] The version gate in the `<Alert>` (`8.9.0`) matches the actual
release version of `@sentry/react-native` that introduces the package;
update if the number shifts
- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot locked and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants