Repository navigation
feat(cli): add source maps and Cloudflare to sentry wizard - #2529
Merged
Merged
Conversation
Start moving getsentry/sentry-wizard into the CLI as `sentry wizard`. This adds the command with the `@sentry/wizard` integrations and flags (`-i`, `--url`, `--org`, `--project`, `--saas`, `--spotlight`, and the rest), the shared wizard helpers, and the Next.js flow. The other integrations report that they are not available in this version yet. The wizard logs in with the CLI's own login: a stored `sentry auth login` session, an agent handoff, or the device flow, instead of the `account/settings/wizard/<hash>` browser flow. It then picks or creates the project, reads its DSN, and creates an org auth token for source map uploads. Telemetry goes through the CLI's client. `sentry init` stays the agent setup guide; its help now points to `sentry wizard` for the interactive setup. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Port `ast-utils` and `url` from getsentry/sentry-wizard into `src/lib/wizard/utils/`. The SvelteKit, Remix, React Router, Angular, Nuxt, source maps, Cloudflare, React Native and Android wizards all use them, so they land once here and the platform PRs that follow build on them in parallel. `ast-utils` edits recast ASTs, so recast and ast-types become direct dev dependencies; both already came in through magicast. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
`sentry wizard` logs in with the CLI's login, which has no sign-up or partner step, so `--signup`, `--promo-code` and `--coming-from` no longer do anything. Passing one now fails with a message that points to https://sentry.io/signup/ instead of being accepted silently. `promoCode` and `comingFrom` leave `WizardOptions`, the welcome banner and `setupCI`, which loses its Vercel partner branch. The help text and the docs say which `@sentry/wizard` flags were removed. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…st-helpers Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Port the source maps wizard (all build tools) and the Cloudflare Workers wizard from sentry-wizard 9.1.0 into `sentry wizard`, with their tests, and register `sourcemaps` and `cloudflare` in WIZARD_RUNNERS. The generated projects now use the v4 `sentry` CLI instead of sentry-cli v2: the wizard installs the `sentry` npm package and writes `sentry sourcemap inject/upload` and `sentry release create` scripts. `.sentryclirc` stays, since v4 still reads it. A self-hosted URL is passed in `SENTRY_URL`, which replaced the sentry-cli `--url` flag. `sourcemaps/ci.ts` gains the step that asks to run the `sentry:sourcemaps` script in CI. The Cloudflare test fixtures keep their upstream bytes, so the formatter, linter and test typecheck skip wizard fixtures. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…sourcemaps-cloudflare Picks up the removed sign-up and partner flags. The source maps and Cloudflare wizards no longer pass `promoCode` to `printWelcome`, and `setupCI` loses the `comingFrom` argument. The `sourcemaps/ci.ts` conflict is resolved to the shared version from #2525. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Generated `sentry` commands no longer pass the hidden `--org` and `--project` compat flags. The generic and Wrangler source maps flows merge `org` and `project` into the project's `.sentryclirc` `[defaults]`, next to the existing `[auth] token` and any other keys, and v4 reads them from there. Wrangler's `sentry:sourcemaps` script drops the `SENTRY_URL=` prefix and the flags from `sentry release create` and `sentry sourcemap upload`. The self-hosted URL is not written to the file. v4 only trusts a non-SaaS `[defaults] url` when the token's host or a stored login vouches for it, and a token from the same file does not, so the upload would be refused. Self-hosted users are told to set `SENTRY_URL` instead. `setupCI` gets the upload target, so the CI step lists `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, `SENTRY_PROJECT` and, for self-hosted, `SENTRY_URL`. Wrangler counts as a `sentry`-command tool there (its token lives in `.sentryclirc`), but skips the "run the script in CI" prompt, since its `post<deploy>` script already runs it. `sentry@^4` is installed as a devDependency. `sourcemaps/ci.ts`, `sourcemaps/tools/sentry-cli.ts`, `angular.ts`, `types.ts` and `abort-if-sportlight-not-supported.ts` now match #2525, apart from exporting `addOrgAndProjectToSentryCliRc` for Wrangler, the devDependency install, and the Wrangler CI case. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
The Cloudflare wizard fixtures are upstream sentry-wizard Worker sources that `wrap-worker` and `update-wrangler-config` tests read and compare as text. The test tsconfig excludes them, so the tsconfig policy check needs them in its list of files no type check covers on purpose.
- Skip the `.sentryclirc` URL check, like `sentry init`: the wizard picks its instance (`--url`, `--saas` or a prompt) before it logs in. - Use the stored login's instance for `sentryUrl` when none was chosen, and log in again when the stored login is for another instance. - Link self-hosted users to `/settings/<org>/auth-tokens/`. - Leave an unparseable MCP config alone (show the copy-paste fallback), and let a cancel inside the MCP setup stop the wizard. - Resolve `catalog:` and `catalog:default` against both pnpm default catalog forms. - Find an existing `SENTRY_AUTH_TOKEN` after the comment header of `.env.sentry-build-plugin`, so re-runs don't add a second one. - Run Windows formatters with Node in the standalone binary, where `process.execPath` is `sentry`. - Ask before updating an `@sentry/nextjs` listed in devDependencies, and treat an unknown SDK version as the `^11` the wizard installs. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…st-helpers Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
On self-hosted Sentry, the generic and Wrangler source maps flows now write `url` to `.sentryclirc` `[defaults]` next to `org` and `project`. v4 rejects that URL from the same file as the token today. The trust check fix is separate, and the generated script depends on it. The CI step on sentry.io now lists only `SENTRY_AUTH_TOKEN`. On self-hosted Sentry it also lists `SENTRY_ORG`, `SENTRY_PROJECT` and `SENTRY_URL`. The wizard docs fragment says the same. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Address review feedback on the shared wizard helpers: - Enable unicorn/no-array-for-each repo-wide and convert every .forEach call site to for...of, including getLastRequireIndex. - Add buildProjectIssuesUrl to lib/sentry-urls.ts, built on getOrgBaseUrl like buildEventSearchUrl, and delete the wizard-specific wizard/utils/url.ts. - Move findFile into lib/dsn/fs-utils.ts and build it on isRegularFile, so a directory or FIFO with a matching name is skipped. It is async now. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
`sentry wizard [<org>/<project>] [<integration>]` replaces the `@sentry/wizard` flags, with the target first like other commands. - The integration is a positional, one at a time. A bare integration id is never read as a target, and a single bare word is always read as an integration, so a project or org spelled like one is written `my-org/nextjs`, `nextjs/` or `/nextjs`. - The target parses with the CLI's org/project grammar and resolves after login with `resolveOrgOptionalTarget`, like other commands. Without one the org and project pickers run, with no detection. - `-f/--force` is the only flag. It sets both `forceInstall` and `ignoreGitChanges`. - The instance comes from `SENTRY_URL` or the stored login, so the SaaS/self-hosted prompt, `--url`, `--saas` and `skipRcUrlCheck` go. - Spotlight mode follows `SENTRY_SPOTLIGHT`, telemetry follows `isTelemetryEnabled()`, and debug output goes through the CLI logger (`--verbose`, `--log-level`). - Every other `@sentry/wizard` flag and `SENTRY_WIZARD_*` variable is gone, hidden ones included, with `disableTelemetryForRun` and `rejectRemovedFlags`. A test pins the wizard's own flags to `force`, and `check:env-coverage` (part of `ci:policy`) fails when any file under `src/` names `SENTRY_WIZARD_`. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Re-export buildProjectIssuesUrl from lib/sentry-web-urls.ts through withSentryBaseUrl(getApiBaseUrl()), like the other user-facing link builders, so self-hosted and regional logins get links on the host they are authenticated against. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…eat/cli-wizard-shared-ast-helpers Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…izard base Merges origin/feat/cli-wizard-shared-ast-helpers at f0a48de (#2520, the chart-app fix and #2519's positional rework) and fixes what it breaks: - `runWizard` no longer takes `debug`, so the redirect to another wizard drops it. - `wizard/utils/url.ts` is gone. The source maps outro links to the project's issues with `buildProjectIssuesUrl` from `lib/sentry-web-urls`. - `findFile` now comes from `lib/dsn/fs-utils` and is async, so the tsc, Vite and webpack tools await it. - The new `no-array-for-each` lint rule: two `forEach` loops become `for...of`. - The wizard docs fragment keeps the base's flag table and the source maps paragraph from this branch. Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
…emaps-cloudflare # Conflicts: # packages/cli/src/lib/wizard/run.ts # packages/cli/test/tsconfig.json
…emaps-cloudflare # Conflicts: # packages/cli/src/lib/wizard/run.ts # scripts/tsconfig-policy.test.mjs
The wizard installed `sentry@^4`, which matches no published version, so source map setup stopped after the SDK and config changes. Install the major of the running CLI instead (`sentry@0.x` today), with no shell metacharacters, since installPackage runs the package manager through a shell.
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9bb011e. Configure here.
The Wrangler flow still installed `sentry@^4`, which matches no published version, and `^` is a shell metacharacter for installPackage. Use SENTRY_CLI_PACKAGE_SPEC, as the generic flow does.
This was referenced Nov 28, 2026
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 1, 2026
…try#2584) Fixes getsentry#2576. Part of the v2/v3 → v4 parity work in getsentry#1965; found while porting the Wrangler source maps flow in getsentry#2529. ## What sentry-cli did In sentry-cli (v2 and v3, `sourcemaps upload`), `--strip-prefix` and `--strip-common-prefix` only touch the `sources` array inside each uploaded map. They never change the uploaded file names. The help text says so: "This will not modify the uploaded sources paths." The rules come from rust-sourcemap's `strip_prefixes` and `find_common_prefix`: - `--strip-prefix P` removes `P/` (a `/` is added if missing) from the start of each source. Sources that don't start with it stay as they are. It's a raw string match, with no path resolution. - A non-empty `sourceRoot` is folded into `sources` before stripping, and then dropped. URLs and sources starting with `/` keep their value. - `--strip-common-prefix` strips the common prefix of each map's **absolute** sources. Relative sources don't count, and a bare `/` prefix is ignored. For a regular map the prefix is computed before `sourceRoot` is applied. Index maps are flattened first, so one prefix covers every section. - Only the uploaded copy changes. The map on disk stays the same. ## What v4 did v4's strip flags only renamed the uploaded files. The only change it made to `sources` was turning backslashes into forward slashes. So maps whose sources are relative to the build output, like Wrangler's `../src/index.ts`, kept those paths in stack frames. ## What v4 does now `sourcemap upload` applies the rules above to the uploaded copy of every map: external maps, inline maps, and each section of an index map. The files on disk are left alone, and the existing file-name stripping stays. For example, `--strip-prefix ..` turns `../src/index.ts` into `src/index.ts`. ### Deliberate departures from sentry-cli - **`--no-rewrite`:** the strip flags rewrite `sources` with `--no-rewrite` too, in the uploaded copy only, so deployed files are untouched. sentry-cli rejected the strip flags together with `--no-rewrite`. This lets uploads of already-deployed output, like the wizard's Wrangler script, strip `sources`. - **Single absolute source:** `--strip-common-prefix` drops each source's file name before computing the common prefix, so it always stops at a directory. A map with one absolute source, such as `/home/ci/app/src/a.ts`, becomes `a.ts`. In sentry-cli the prefix was the whole path, so that source was left unchanged. - **Backslashes:** backslashes in `sources` become `/` before stripping, as inject already does when it rewrites a map. Sources like `C:\work\app\a.ts` can then be stripped. In sentry-cli the prefix always ends in `/`, so backslash paths never matched. This matters for maps that inject skips because they already carry a debug ID. - **`sourceRoot` and Windows drive paths:** when a map has a `sourceRoot`, it is not prepended to drive paths such as `C:/work/a.ts`, which now count as absolute like `/…` paths. sentry-cli only skipped sources starting with `/`, `http:` or `https:`, so it turned them into `<sourceRoot>/C:/work/a.ts` and the strip no longer matched. The flag help, the generated skill reference, and the v3 migration guide now describe this. Still not matched, and out of scope here: sentry-cli accepted `--strip-prefix` more than once and allowed it together with `--strip-common-prefix`. v4 takes one prefix, and the two flags are mutually exclusive. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A34a78084993e96d06f720b9139eeab5a --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A34a78084993e96d06f720b9139eeab5a) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A34a78084993e96d06f720b9139eeab5a/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 1, 2026
…y#2594) Fixes getsentry#2531 In human mode, the command wrapper (`writeFinalization` in `packages/cli/src/lib/command.ts`) wrote a command's returned hint to stdout whenever `--json` was off, even when stdout was not a TTY. Scripts that capture the output of `sentry release propose-version` got the version plus a "Detected from git HEAD" line, and worked around it by piping through `head -n 1`, which hides a failing exit code. Now the hint goes to stdout only when stdout is a TTY, and to stderr otherwise. The check reads `isTTY` on the context's stdout writer, as `sentry api` already does. It applies to every command that returns a hint, including pagination, dry-run, and cache-age footers. - Renderers with `finalize()`, such as the streaming log table, still close their output on stdout, but get no hint when piped. - Empty-state messages returned as hints, such as "No logs found", also go to stderr when stdout is piped, so piped stdout is empty when there is no data. - `--json` output is unchanged. - SDK calls in text mode capture stdout without `isTTY`, so their hints also leave the captured text. JSON-mode SDK calls are unaffected. The design doc, `packages/cli/AGENTS.md`, and the CLI docs describe the new rule. Once this ships, callers that use `head -n 1` can drop it: the `sentry wizard` port in getsentry#2529 and getsentry/sentry#132671. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A6121723da8076ff149d70475ddc80d62 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A6121723da8076ff149d70475ddc80d62) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A6121723da8076ff149d70475ddc80d62/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 1, 2026
…low (getsentry#2563) Follow-up to getsentry#2529 (merged): behaviour changes against upstream sentry-wizard 9.1.0. ## Behaviour changes against sentry-wizard 9.1.0 - **Cloudflare, missing `main` file (SHJ-RG7):** when Wrangler's `main` points to a file that doesn't exist, the wizard creates the starter worker there and wraps it. Upstream skipped setup silently and still reported success. - **Cloudflare, no `main` (YBF-MLA):** the starter worker written to `src/index.ts` is now wrapped with `Sentry.withSentry()`. Upstream wrote a plain worker with no Sentry. - **Cloudflare, existing `src/index.ts` with no `main`:** the existing file is wrapped instead of being overwritten by the starter worker. - **Cloudflare, empty `main` in `wrangler.json`:** treated as no `main`, so the starter worker goes to `src/index.ts`, which the config then points to. Upstream tried to wrap the project directory and pointed the config at a file it never created. - **Cloudflare, wrap message:** "Wrapped … with Sentry initialization" shows only when the wizard wrapped the worker. When Sentry is already set up, only the skip warning shows. When the entry point has no `export default`, the file is left unchanged and the manual wrap instructions show. Upstream reported the wrap in both cases, and added an unused Sentry import to a file with no default export. - **Cloudflare, `wrangler.toml` (WHX-UYU):** the copy-paste snippet includes `main = "src/index.ts"` when the wizard sets `main`. Upstream left it out. - **webpack, non-array `plugins` (UNB-FTW):** `plugins: existingPlugins` or `plugins: getPlugins()` becomes `[...existingPlugins, sentryWebpackPlugin(…)]`. Upstream replaced the value and dropped those plugins. `undefined` and `null` are still replaced. - **Wrangler, existing `post<deploy>` (5YD-7F8):** an existing `post<deploy>` script is kept, with `&& <pm> sentry:sourcemaps` added after it. Upstream overwrote it. It's left alone when it already runs `sentry:sourcemaps`. - **Wrangler, Yarn 2+ (RP5-3PG):** Yarn Berry doesn't run `post` scripts, so the upload is chained onto the deploy script (`&& yarn sentry:sourcemaps`). npm, pnpm, Yarn 1 and Bun keep the `post<deploy>` hook. When the wizard can't edit the deploy script, it leaves that script alone and ends the manual deploy command with the upload instead. - **Wrangler, no deploy script (5WP-827):** the wizard still writes `sentry:sourcemaps`, the `.sentryclirc` upload target and the auth token, then shows the deploy command to add. Upstream stopped before writing any of them and still reported success. - **Wrangler, wrapped commands (HJA-K3Y):** deploy scripts where `npx`, `pnpm`, `yarn` or `bunx` comes straight before `wrangler deploy` are now edited. Upstream accepted only a bare `wrangler deploy`. Any other form, such as runner flags (`-y`, `-C`, `--cwd`), `pnpm exec` / `dlx`, `bun x`, `wrangler@<version>`, `cross-env` or a leading `VAR=value`, gets the manual instructions. - **Wrangler, manual fallback:** when the wizard can't edit the deploy script, it shows `wrangler deploy` with the `--outdir`, `--var SENTRY_RELEASE:…` and `--upload-source-maps` flags. Upstream showed the unchanged script. - **Source maps, framework redirect (YSZ-BFQ):** the SvelteKit and React Native redirect is offered only when this CLI version has that wizard. Without it, the wizard shows the framework's guides and asks whether to continue or exit, instead of throwing `ValidationError` once the redirect is accepted. SvelteKit shows up again on its own once its runner lands. - **Cloudflare, missing `.js` or `.mjs` `main`:** the starter worker written there is plain JavaScript. Only TypeScript entry points get the typed starter. - **Wrangler, deploy text earlier in the script (EL5-RSX):** the flags go on the real `wrangler deploy` command, not on earlier text that matches it, such as `echo Running wrangler deploy`. Upstream edited the first match. - **Wrangler, rerun:** a deploy script that already sets `SENTRY_RELEASE` doesn't get a second `--var SENTRY_RELEASE:…`. Upstream added one on every run. - **Cloudflare, existing `compatibility_date`:** the Worker's date is kept, and today's date is only added when the config has none. The TOML snippet marks it "only if not set yet". Upstream always overwrote it with today's date. - **Wrangler, `pages deploy` and `versions deploy`:** these aren't treated as a Workers deploy, bare or through a runner, so they don't get the Workers-only flags that would break them. The wizard shows the manual instructions instead. Upstream edited a bare `wrangler pages deploy` or `wrangler versions deploy`. - **Wrangler, map `sources` paths:** the `sentry:sourcemaps` script passes `--strip-prefix ..`, so Wrangler's `../src/index.ts` sources upload as `src/index.ts`. It relies on getsentry#2584, which strips `sources` under `--no-rewrite` too. Upstream passed `--strip-prefix '<outDir>/..'`, which sentry-cli matched as a raw string, so it never matched those sources. ## Product calls - **Wrapping with `withSentry`:** follows the [Wrangler install guide](https://docs.sentry.io/platforms/javascript/guides/cloudflare/install/wrangler/) and the existing wrap path for configured entry points. - **`post<deploy>` hook, merged rather than overwritten:** the [Wrangler source maps guide](https://docs.sentry.io/platforms/javascript/guides/cloudflare/sourcemaps/uploading/wrangler/) uses a `postdeploy` hook, so that stays the default. An existing hook is kept, the way the other flows keep user scripts. - **`&&` chaining for Yarn 2+ only:** matches how the sentry-cli flow attaches `sentry:sourcemaps` to the build script. Other package managers keep the hook from the docs. - **Warn, not fail, with no deploy script:** matches the sentry-cli flow, which writes the script and config and then shows what to add by hand. - **Wrapped `npx` / `pnpm` / `yarn` / `bunx` deploy commands:** the new flags go after the `wrangler deploy` segment, as they do for a bare command. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A5cf1df7c30f084bc9d1e92f69ae9f377 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A5cf1df7c30f084bc9d1e92f69ae9f377) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A5cf1df7c30f084bc9d1e92f69ae9f377/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 1, 2026
…etsentry#2600) Refs getsentry#2531 The wrangler source maps wizard wrote `$(sentry release propose-version | head -n 1)` into the project's scripts, because `propose-version` printed a "Detected from ..." hint on stdout after the version. getsentry#2594 moved hints off piped stdout, so `$(sentry release propose-version)` now captures only the version. Without `head`, a failing `propose-version` no longer has its exit code hidden. Risk: the wizard port (getsentry#2529) and the hint fix ship together in cli 0.52. A project that keeps an older `sentry` package installed (it declines the wizard's update prompt) would still capture the hint in the release version. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A6121723da8076ff149d70475ddc80d62 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A6121723da8076ff149d70475ddc80d62) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A6121723da8076ff149d70475ddc80d62/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 1, 2026
…e source maps tools (getsentry#2607) Two follow-ups to getsentry#2529 that had to wait until getsentry#2525 merged, because both touch the shared source maps tools. ## Remix uses the Vite tool again With a `vite.config`, the Remix wizard only pointed at the manual source maps steps. The port did that because the source maps wizard's Vite setup wasn't in the CLI yet. It is now, so the Remix wizard calls `configureVitePlugin` as sentry-wizard 9.1.0 does, and shows the manual steps only when that fails. Projects without a Vite config keep the build script flow. ## `--force` reaches the source maps tool installs `sentry wizard --force` sets `forceInstall`, and the Cloudflare wizard and the Angular source maps setup already passed it to the package manager. The source maps wizard didn't: its tool setups installed the `sentry` CLI, including in the Wrangler flow, and the bundler plugins without the force flag. - `forceInstall` is a new optional field on the shared `SourceMapUploadToolConfigurationOptions` in `tools/types.ts`. `configureSentryCLI` drops its own copy of the field and uses the shared one. - `runSourcemapsWizard` passes it into the tool setup. - The Wrangler `sentry` install and `ensureBundlerPlugin` pass it to the package manager. Vite, webpack, Rollup and esbuild all install their plugin through `ensureBundlerPlugin`, and both of its installs pass it: the SDK update and `@sentry/bundler-plugins`. - The Remix Vite setup passes it too. **This departs from sentry-wizard 9.1.0**, which never passed `forceInstall` to the source maps tool setups. Not changed: the source maps wizard's minimum-SDK-version update, `ensureMinimumSdkVersionIsInstalled`, still installs without `forceInstall`. That install updates the SDK rather than a tool, and upstream didn't pass the flag there either. Fixes the Cursor Bugbot finding "Sourcemaps wizard drops forceInstall" on getsentry#2529. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A5cf1df7c30f084bc9d1e92f69ae9f377 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A5cf1df7c30f084bc9d1e92f69ae9f377) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A5cf1df7c30f084bc9d1e92f69ae9f377/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <126780+BYK@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Part of #1965 (tracking: #2511). Stacked on #2520.
Ports two sentry-wizard 9.1.0 (@069923d) flows into the
sentry wizardpicker:src/sourcemaps/→src/lib/wizard/sourcemaps/): every tool (webpack, Vite, Rollup, esbuild, tsc, Create React App, Angular, Wrangler, and the generic "I use another tool" flow), plusutils/vendor/is-unicorn-supported.ts, which now reads env vars throughgetEnv.src/cloudflare/→src/lib/wizard/cloudflare/).Both are registered in
WIZARD_RUNNERSwith the upstream entry points. The existingsourcemaps/ci.tsgains the upstream step that asks the user to run thesentry:sourcemapsscript in CI. There is no second copy of that file.The webpack, Vite and tsc tools and the Cloudflare config/worker edits still use magicast/recast. #2510 removes them after v4.
sentry-cli v2 → v4
Generated projects use the v4
sentryCLI from thesentrynpm package. They installsentry@<major>.xas a devDependency instead of@sentry/cli@^2. The wizard itself never needs asentry-clibinary:src/utils/bash.ts(theget-clidownload andsentry-cli --versioncheck) is not ported.sentry-cli sourcemaps inject/uploadsentry sourcemap inject/uploadsentry-cli releases propose-version/newsentry release propose-version/create--org <org> --project <project>[defaults]in.sentryclirc, orSENTRY_ORG/SENTRY_PROJECT--url <url>SENTRY_URL--strip-prefix 'dist/..'--no-rewriteThe generated commands don't use the hidden
--org/--projectcompat flags:org,projectand, on self-hosted Sentry,urlinto the project's.sentryclirc[defaults], next to the gitignored[auth] tokenthe wizard already writes. Other sections, keys and comments are kept. v4 reads them from there.url: this depends on a CLI fix that's in progress separately. Today v4 rejects a non-SaaS[defaults] urlthat sits in the same file as the token. The wizard also tells self-hosted users to setSENTRY_URLwherever the script runs.SENTRY_AUTH_TOKEN. On self-hosted Sentry, it also listsSENTRY_ORG,SENTRY_PROJECTandSENTRY_URL. Wrangler now counts as asentry-command tool there, since its token is in.sentryclirc, not.env.sentry-build-plugin. It skips the "run the script in CI" prompt because itspost<deploy>script already runs the upload.The
sentry-clitool id and file name stay, so telemetry tags still line up with sentry-wizard's.Overlap with the other wizard PRs
File paths match upstream, so this and the parallel ports reconcile with a merge.
sourcemaps/ci.ts,sourcemaps/tools/sentry-cli.ts,tools/angular.ts,tools/types.ts,utils/abort-if-sportlight-not-supported.ts, and thesentry-cli,ciandsentryclirc-filetests match its head. This PR supersedes these lines of it:tools/sentry-cli.ts:addOrgAndProjectToSentryCliRcis exported, so Wrangler writes[defaults]the same way.tools/sentry-cli.ts: thesentry@<major>.xinstall passesdevDependency: true. It's a build-time tool.ci.ts:"wrangler"joinsCLI_BASED_FLOW_TOOLS, and the npm-script CI step is skipped for it. The reasons are in the CI bullet above.tools/types.ts: adds theSourceMapUploadToolConfigurationFunctiontype that the bundler tools use.abort-if-sportlight-not-supported.ts. This PR takes feat(cli): add Nuxt and Angular to sentry wizard #2525's copy, whose JSDoc differs from feat(cli): add SvelteKit, Remix and React Router to sentry wizard #2526's by one line.Other differences from upstream
tools/nextjs.tsandtools/remix.tsare not ported. Nothing in 9.1.0 reaches them.runWizardinstead of spawning@sentry/wizard.$(…). Without this, rerunning the wizard would split inside the version pipe it adds.sentry release createno longer passes--project, so the project slug stays out ofpackage.json. It depends on release create sends no project unless --project is set #2534, which makesrelease createdefault to the resolved project.packages/cli/test/lib/wizard/**/fixtures/**, so the Cloudflare fixtures keep their exact upstream bytes.Follow-ups
remix/remix-wizard.tsthere writes.env.sentry-build-pluginand links to the manual steps, becauseconfigureVitePluginwasn't ported yet. Once both land, swap that back toconfigureVitePluginfromsourcemaps/tools/vite.ts. Its path and signature match upstream, so the change is one line.sentry release propose-version(| head -n 1), because a hint line follows the version on stdout. Tracked in Command hints print to stdout when output is piped #2531.Open questions
--strip-prefixstrips uploaded file paths, not the sources inside the maps. So v2's--strip-prefix 'dist/..'was dropped, and the upload relies on release and URL matching. Is that enough?The
sentry:sourcemapsnpm script is now justsentry sourcemap upload <path>, because the upload injects debug IDs itself.via @BYK.
--
View Session [Sentry]