Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 11 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ jobs:
runs-on: ubuntu-latest

strategy:
# Let every runtime report rather than cancelling its siblings on the
# first failure -- but the job itself must still fail the run.
fail-fast: false
matrix:
include:
- node: 18
npm: 9
# Next.js 16 (used by the examples) requires node >= 20.9, so 20 is
# the floor. 22 and 24 are the maintained LTS lines.
- node: 20
npm: 10
- node: 21
- node: 22
npm: 10

continue-on-error: true
- node: 24
npm: 11

steps:
- name: Checkout
Expand Down Expand Up @@ -67,6 +70,9 @@ jobs:
- name: Test
run: npm run test

- name: Test examples
run: npm run test:examples
Comment thread
brianr marked this conversation as resolved.

install:
runs-on: ubuntu-latest

Expand Down
4 changes: 0 additions & 4 deletions examples/nextjs-approuter/.eslintrc.json

This file was deleted.

9 changes: 9 additions & 0 deletions examples/nextjs-approuter/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';

// Next 16 removed `next lint`, so ESLint runs directly against this flat
// config. `eslint-config-next/core-web-vitals` already brings the TypeScript
// setup and the `.next`/`out`/`build` ignores with it.
/** @type {import('eslint').Linter.Config[]} */
const config = [...nextCoreWebVitals];

export default config;
12 changes: 12 additions & 0 deletions examples/nextjs-approuter/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const nextJest = require('next/jest');

const createJestConfig = nextJest({ dir: './' });

/** @type {import('jest').Config} */
const jestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
testEnvironment: 'jest-environment-jsdom',
testMatch: ['<rootDir>/src/__tests__/**/*.test.tsx'],
};

module.exports = createJestConfig(jestConfig);
1 change: 1 addition & 0 deletions examples/nextjs-approuter/jest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/jest-dom';
11 changes: 10 additions & 1 deletion examples/nextjs-approuter/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
import { fileURLToPath } from 'url';
import path from 'path';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {
// This example lives inside the @rollbar/react repo, so Next.js would
// otherwise infer the repo root as the workspace root.
outputFileTracingRoot: __dirname,
};

export default nextConfig;
Loading
Loading