Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f9e2fb8
feat: Add `react-router` wizard
onurtemizkan Aug 28, 2025
b8c3744
Add unit tests
onurtemizkan Aug 28, 2025
a4b30d8
Add E2E test app
onurtemizkan Aug 28, 2025
5801dea
Make outputs consistent with the other wizards
onurtemizkan Aug 28, 2025
8fea304
Add `traceStep`s
onurtemizkan Sep 1, 2025
a8896b9
Fix message in help tests
onurtemizkan Sep 1, 2025
1de3c4a
Remove unnecessary unit tests
onurtemizkan Sep 1, 2025
2d1e7d8
Add `react-router` to e2e test matrix
onurtemizkan Sep 1, 2025
74bd0c9
Fix help message
onurtemizkan Sep 1, 2025
bee0c19
Remove vite plugin test
onurtemizkan Sep 1, 2025
b50a11b
Add more sdk-setup unit tests
onurtemizkan Sep 1, 2025
4d0229d
Add CHANGELOG entry
onurtemizkan Sep 1, 2025
30f64ff
Clean uo
onurtemizkan Sep 1, 2025
3d027ef
Use `reactRouterTracingIntegration` and remove unnecessary imports
onurtemizkan Sep 15, 2025
fbb9782
Remove remix-like hook arguments from `reactRouterTracingIntegration`
onurtemizkan Sep 16, 2025
e6beef7
Show code snippets instead of linking docs
onurtemizkan Sep 16, 2025
3ede0ad
Prompt to retry reveal if entry files are not found
onurtemizkan Sep 16, 2025
1568617
Fix tests
onurtemizkan Sep 16, 2025
10a452e
Clean up
onurtemizkan Sep 16, 2025
ca5d80c
Only show copy-paste instructions on the outer level
onurtemizkan Sep 16, 2025
a813188
Improve snippets, cover ts/tsx/mjs extensions
onurtemizkan Sep 17, 2025
f648ac7
Check if `isRouteErrorResponse` already exists before adding import
onurtemizkan Sep 17, 2025
92c5d37
Selectively add type import for `HandleErrorFunction`, check for pote…
onurtemizkan Sep 17, 2025
549798f
Move instrumentRoot logic to codemod
onurtemizkan Sep 17, 2025
2a7ff8a
Move handleError logic to codemod
onurtemizkan Sep 17, 2025
520d71f
Implement handleRequest logic via codemod
onurtemizkan Sep 18, 2025
3adfc5a
Remove custom express server tests
onurtemizkan Sep 18, 2025
16fa6a3
Clean up
onurtemizkan Sep 18, 2025
f33cf12
Fix duplicated `captureException`s in ErrorBoundary
onurtemizkan Sep 18, 2025
26c414c
Add `package.json` script updates
onurtemizkan Sep 18, 2025
040a908
Run prettier
onurtemizkan Sep 18, 2025
a50d5e0
Add client-entry codemod
onurtemizkan Sep 19, 2025
bf2cdce
Update e2e tests
onurtemizkan Sep 19, 2025
15c490b
Add unit tests for codemods
onurtemizkan Sep 19, 2025
a360411
Do not cover `handleError`s exported via object pattern
onurtemizkan Sep 19, 2025
558d120
Remove development debug logging
onurtemizkan Sep 19, 2025
8ecf432
Lint
onurtemizkan Sep 21, 2025
6ce8704
Add profiling and finalize
onurtemizkan Sep 30, 2025
563b39a
Remove leftover debug file
onurtemizkan Sep 30, 2025
4bf6454
Revert remix test updates
onurtemizkan Sep 30, 2025
b07fbaa
Fix CHANGELOG
onurtemizkan Sep 30, 2025
df54fb4
Refactor and finalize with a proper example page
onurtemizkan Oct 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ jobs:
- NextJS-14
- NextJS-15
- Remix
- React-Router
- React-Native
- Sveltekit-Hooks
- Sveltekit-Tracing
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- feat: Add wizard for react-router framework mode ([#1076](https://github.com/getsentry/sentry-wizard/pull/1076))
- feat(angular): Set `sendDefaultPii: true` by default ([#1057](https://github.com/getsentry/sentry-wizard/pull/1057))
- feat(nextjs): Update turbopack warning ([#1089](https://github.com/getsentry/sentry-wizard/pull/1089))
- feat(nextjs): Set `sendDefaultPii: true` by default ([#1052](https://github.com/getsentry/sentry-wizard/pull/1052))
Expand Down
106 changes: 106 additions & 0 deletions e2e-tests/test-applications/react-router-test-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Dependencies
node_modules/
/.pnp
.pnp.*

# Build outputs
/build
/dist
/.react-router

# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Coverage directory used by tools like istanbul
coverage/
*.lcov

# nyc test coverage
.nyc_output

# Dependency directories
node_modules/
jspm_packages/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Storybook build outputs
.out
.storybook-out

# Temporary folders
tmp/
temp/

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

43 changes: 43 additions & 0 deletions e2e-tests/test-applications/react-router-test-app/app/root.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router";

export default function App() {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body>
<div className="App">
<nav>
<ul>
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/about">About</a>
</li>
<li>
<a href="/contact">Contact</a>
</li>
</ul>
</nav>

<main>
<Outlet />
</main>
</div>
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { RouteConfig } from "@react-router/dev/routes";
import { index, route } from "@react-router/dev/routes";

export default [
index("routes/home.tsx"),
route("/about", "routes/about.tsx"),
route("/contact", "routes/contact.tsx"),
] satisfies RouteConfig;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function About() {
return (
<div>
<h1>About</h1>
<p>This is a test application for React Router.</p>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function Contact() {
return (
<div>
<h1>Contact</h1>
<p>Contact us for more information.</p>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function Home() {
return (
<div>
<h1>Home</h1>
<p>Welcome to the React Router test app!</p>
</div>
);
}
27 changes: 27 additions & 0 deletions e2e-tests/test-applications/react-router-test-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "react-router-test-app",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"build": "react-router build",
"dev": "react-router dev",
"start": "react-router-serve ./build/server/index.js",
"typecheck": "react-router typegen && tsc"
},
"dependencies": {
"@react-router/dev": "^7.8.2",
"@react-router/node": "^7.8.2",
"@react-router/serve": "^7.8.2",
"isbot": "^4.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router": "^7.8.2"
},
"devDependencies": {
"@types/react": "^18.3.9",
"@types/react-dom": "^18.3.0",
"typescript": "^5.6.2",
"vite": "^6.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { Config } from "@react-router/dev/config";

export default {
// Config options
} satisfies Config;
31 changes: 31 additions & 0 deletions e2e-tests/test-applications/react-router-test-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"include": [
"**/*.ts",
"**/*.tsx",
"**/.server/**/*.ts",
"**/.server/**/*.tsx",
"**/.client/**/*.ts",
"**/.client/**/*.tsx"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES6"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},

// React Router v7 specific options
"types": ["@react-router/dev"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { reactRouter } from "@react-router/dev/vite";
import { defineConfig } from "vite";

export default defineConfig({
plugins: [reactRouter()],
});
3 changes: 2 additions & 1 deletion e2e-tests/tests/help-message.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ describe('--help command', () => {
-i, --integration Choose the integration to setup
env: SENTRY_WIZARD_INTEGRATION
[choices: "reactNative", "flutter", "ios", "android", "cordova", "angular",
"electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps"]
"electron", "nextjs", "nuxt", "remix", "reactRouter", "sveltekit",
"sourcemaps"]
-p, --platform Choose platform(s)
env: SENTRY_WIZARD_PLATFORM
[array] [choices: "ios", "android"]
Expand Down
Loading
Loading