Skip to content

Commit 06839e8

Browse files
committed
feat: add support for Next.js 15.4.7
- Update peer dependency range to support Next.js versions up to 15.4.7 - Add new integration test app for Next.js 15.4.7 - Update dev server script to use 15.4.7 test app - Make status field optional in APP_PAGE cache handler type. We don't use that status anywhere.
1 parent 7622dd5 commit 06839e8

File tree

40 files changed

+11358
-10
lines changed

40 files changed

+11358
-10
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
},
88
"scripts": {
99
"dev": "pnpm test",
10-
"run-dev-server": "pnpm run-dev-server-15-3-2",
10+
"run-dev-server": "pnpm run-dev-server-15-4-7",
1111
"run-dev-server-15-3-2": "cd ./test/integration/next-app-15-3-2 && pnpm dev",
1212
"run-dev-server-15-0-3": "cd ./test/integration/next-app-15-0-3 && pnpm dev",
13+
"run-dev-server-15-4-7": "cd ./test/integration/next-app-15-4-7 && pnpm dev",
1314
"build": "tsup",
1415
"lint": "eslint -c eslint.config.mjs --fix",
1516
"format": "prettier --write 'src/**/*.ts' 'src/*.ts'",
@@ -86,7 +87,7 @@
8687
"vitest": "^2.1.5"
8788
},
8889
"peerDependencies": {
89-
"next": ">=15.0.3 <= 15.3.2",
90+
"next": ">=15.0.3 <= 15.4.7",
9091
"redis": "4.7.0"
9192
},
9293
"packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531"

pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/RedisStringsHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ export default class RedisStringsHandler {
538538
data:
539539
| {
540540
kind: 'APP_PAGE';
541-
status: number;
541+
status?: number;
542542
headers: {
543543
'x-nextjs-stale-time': string; // timestamp in ms
544544
'x-next-cache-tags': string; // comma separated paths (tags)

test/integration/next-app-15-0-3/pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration/next-app-15-3-2/pnpm-lock.yaml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
# or
12+
pnpm dev
13+
# or
14+
bun dev
15+
```
16+
17+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18+
19+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
20+
21+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
23+
## Learn More
24+
25+
To learn more about Next.js, take a look at the following resources:
26+
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
29+
30+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
31+
32+
## Deploy on Vercel
33+
34+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
35+
36+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
];
15+
16+
export default eslintConfig;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
cacheHandler: require.resolve('@trieb.work/nextjs-turbo-redis-cache'),
4+
};
5+
6+
module.exports = nextConfig;

0 commit comments

Comments
 (0)