Skip to content
Draft
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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- next-app-15-0-3
- next-app-15-3-2
- next-app-15-4-7
- next-app-16-0-3


steps:
- name: Checkout code
Expand Down Expand Up @@ -76,6 +78,16 @@ jobs:
SKIP_BUILD: true
NEXT_TEST_APP: ${{ matrix.next-test-app }}

- name: Install Playwright browsers (Next 16 only)
if: matrix.next-test-app == 'next-app-16-0-3'
run: pnpm exec playwright install --with-deps

- name: Run Playwright E2E tests (Next 16 only)
if: matrix.next-test-app == 'next-app-16-0-3'
run: pnpm test:e2e
env:
PLAYWRIGHT_BASE_URL: http://localhost:3055

- name: Code Coverage Comments
if: github.event_name == 'pull_request'
uses: kcjpop/coverage-comments@v2.2
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ dist
coverage
.DS_Store
.idea
debug
debug
.last-run.json
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ Tested versions are:
- Nextjs 15.0.3 + redis client 4.7.0
- Nextjs 15.2.4 + redis client 4.7.0
- Nextjs 15.3.2 + redis client 4.7.0
- Nextjs 15.4.7 + redis client 4.7.0
- Nextjs 16.0.3 + redis client 4.7.0 (cacheComponents: false)

Currently PPR, 'use cache', cacheLife and cacheTag are not tested. Use these operations with caution and your own risk.
Currently PPR, 'use cache', cacheLife and cacheTag are not tested. Use these operations with caution and your own risk. [Cache Components](https://nextjs.org/docs/app/getting-started/cache-components) support is in development.

## Getting started

Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"test:ui": "vitest --ui --config vite.config.ts",
"test:unit": "vitest --config vite.config.ts src/**/*.test.ts src/**/*.test.tsx",
"test:integration": "vitest --config vite.config.ts ./test/integration/nextjs-cache-handler.integration.test.ts",
"prepare": "./scripts/prepare.sh"
"prepare": "./scripts/prepare.sh",
"test:browser": "vitest --config=vitest.browser.config.ts",
"test:e2e": "playwright test"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down Expand Up @@ -68,14 +70,15 @@
"devDependencies": {
"@commitlint/cli": "^19.6.0",
"@commitlint/config-conventional": "^19.6.0",
"@playwright/test": "^1.56.1",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.1",
"@semantic-release/npm": "^12.0.1",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@vitest/coverage-v8": "^2.1.5",
"@vitest/ui": "^2.1.5",
"@vitest/coverage-v8": "^4.0.13",
"@vitest/ui": "^4.0.13",
"eslint": "^9.15.0",
"lint-staged": "^15.2.10",
"node-fetch": "3",
Expand All @@ -84,10 +87,10 @@
"semantic-release": "^24.2.0",
"tsup": "^8.4.0",
"typescript": "^5.6.3",
"vitest": "^2.1.5"
"vitest": "^4.0.13"
},
"peerDependencies": {
"next": ">=15.0.3 <= 15.4.7",
"next": ">=15.0.3 <= 16.0.3",
"redis": "4.7.0"
},
"packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531"
Expand Down
9 changes: 9 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from '@playwright/test';

export default defineConfig({
testDir: 'tests',
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000',
trace: 'on-first-retry',
},
});
Loading