Commit f0231b1
SDK-613: upgrade Next.js examples to 15.5.25 and add test coverage
The two Next.js examples were pinned to next@14.2.15, which is what the
Dependabot alert on this repo flags. Move both to next@15.5.25 (latest
fully-patched 15.x); `npm audit` no longer reports any advisory against
Next.js itself in either example.
15.x rather than 16.x: Next 16 requires node ^20.9 || >=22, which would
break the node 18 and node 21 legs of the CI matrix, and it removes
`next lint`, which both examples still use.
Alongside the bump:
- react/react-dom and their types move to 19, matching what Next 15's
App Router expects; @rollbar/react already declares 19.x support.
- Add `outputFileTracingRoot` to both next configs so Next 15 stops
inferring the repo root as the workspace root (multiple lockfiles).
- Add `target: ES2017` to the app-router tsconfig, as Next 15 requires
for top-level await.
Test coverage for the upgrade — both examples now run jest via
`next/jest`, so the suites exercise the real SWC/Next transform:
- pages router: `_app` renders the page with a Rollbar instance in
context, and a throwing page renders the ErrorBoundary fallback and
reports through `rollbar.critical` with the configured message, extra
and callback; the home page renders (covers next/font/local and
next/image under Next 15).
- app router: the async `RootLayout` server component wraps the document
in the Rollbar Provider, `next_error_handler/error.tsx` reports the
error via `useRollbar` and resets, and the `ErrorBoundary` page renders.
Wired up as `npm run test:examples` (skips examples without a `test:ci`
script) and run as a new CI step.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent ad60d11 commit f0231b1
20 files changed
Lines changed: 13840 additions & 4540 deletions
File tree
- .github/workflows
- examples
- nextjs-approuter
- src/__tests__
- nextjs
- src/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
0 commit comments