Skip to content

Commit

Permalink
feat(sourcemaps): Remove NextJS and Remix flows from sourcemaps wizard (
Browse files Browse the repository at this point in the history
#849)

These frameworks have their own wizards, being able to run them from the
sourcemaps wizard is not a flow we intend to suggest to users.
  • Loading branch information
andreiborza authored Mar 11, 2025
1 parent bb590bb commit 35fe14d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 41 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Changelog

## Unreleased

- feat: Add `coming-from` parameter ([#837](https://github.com/getsentry/sentry-wizard/pull/837))
- feat(deps): Bump axios from 1.7.4 to 1.8.2 ([#844](https://github.com/getsentry/sentry-wizard/pull/844))
- ref: Reword Replay feature selection ([#847](https://github.com/getsentry/sentry-wizard/pull/847))
- feat(sourcemaps): Remove NextJS and Remix flows from sourcemaps wizard ([#849](https://github.com/getsentry/sentry-wizard/pull/849))

The NextJS and Remix flows have been removed when running the wizard with `npx @sentry/wizard -i sourcemaps`.
Please use `npx @sentry/wizard -i nextjs` and `npx @sentry/wizard -i remix` instead.

## 4.2.0

Expand Down
46 changes: 7 additions & 39 deletions src/sourcemaps/sourcemaps-wizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ import { checkIfMoreSuitableWizardExistsAndAskForRedirect } from './utils/other-
import { configureAngularSourcemapGenerationFlow } from './tools/angular';
import type { SupportedTools } from './utils/detect-tool';
import { detectUsedTool } from './utils/detect-tool';
import { configureNextJsSourceMapsUpload } from './tools/nextjs';
import { configureRemixSourceMapsUpload } from './tools/remix';
import { detectPackageManger } from '../utils/package-manager';
import { getIssueStreamUrl } from '../utils/url';

Expand Down Expand Up @@ -79,15 +77,6 @@ You can turn this off by running the wizard with the '--disable-telemetry' flag.
const { selfHosted, selectedProject, sentryUrl, authToken } =
await getOrAskForProjectData(options);

const wizardOptionsWithPreSelectedProject = {
...options,
preSelectedProject: {
project: selectedProject,
authToken,
selfHosted,
},
};

const selectedTool = await traceStep('select-tool', askForUsedBundlerTool);

Sentry.setTag('selected-tool', selectedTool);
Expand All @@ -101,17 +90,13 @@ You can turn this off by running the wizard with the '--disable-telemetry' flag.
}

await traceStep('tool-setup', () =>
startToolSetupFlow(
selectedTool,
{
orgSlug: selectedProject.organization.slug,
projectSlug: selectedProject.slug,
selfHosted,
url: sentryUrl,
authToken,
},
wizardOptionsWithPreSelectedProject,
),
startToolSetupFlow(selectedTool, {
orgSlug: selectedProject.organization.slug,
projectSlug: selectedProject.slug,
selfHosted,
url: sentryUrl,
authToken,
}),
);

await traceStep('ci-setup', () => configureCI(selectedTool, authToken));
Expand Down Expand Up @@ -140,16 +125,6 @@ async function askForUsedBundlerTool(): Promise<SupportedTools> {
value: 'create-react-app',
hint: 'Select this option if you set up your app with Create React App.',
},
{
label: 'Next.js',
value: 'nextjs',
hint: 'Select this option if you want to set up source maps in a Next.js project.',
},
{
label: 'Remix',
value: 'remix',
hint: 'Select this option if you want to set up source maps in a Remix project.',
},
{
label: 'Webpack',
value: 'webpack',
Expand Down Expand Up @@ -196,7 +171,6 @@ async function askForUsedBundlerTool(): Promise<SupportedTools> {
async function startToolSetupFlow(
selctedTool: SupportedTools,
options: SourceMapUploadToolConfigurationOptions,
wizardOptions: WizardOptions,
): Promise<void> {
switch (selctedTool) {
case 'webpack':
Expand All @@ -223,12 +197,6 @@ async function startToolSetupFlow(
configureAngularSourcemapGenerationFlow,
);
break;
case 'nextjs':
await configureNextJsSourceMapsUpload(options, wizardOptions);
break;
case 'remix':
await configureRemixSourceMapsUpload(options, wizardOptions);
break;
default:
await configureSentryCLI(options);
break;
Expand Down
2 changes: 0 additions & 2 deletions src/sourcemaps/utils/detect-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ export type SupportedTools =
export const TOOL_PACKAGE_MAP: Record<string, SupportedTools> = {
'@angular/core': 'angular',
'create-react-app': 'create-react-app',
next: 'nextjs',
webpack: 'webpack',
vite: 'vite',
esbuild: 'esbuild',
rollup: 'rollup',
typescript: 'tsc',
remix: 'remix',
};

export async function detectUsedTool(): Promise<SupportedTools> {
Expand Down

0 comments on commit 35fe14d

Please sign in to comment.