@trieb.work/nextjs-turbo-redis-cache 1.17.0 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -24
- package/dist/index.d.mts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +291 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +288 -115
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -6
- package/.cursor/skills/testing/SKILL.md +0 -121
- package/.github/workflows/ci.yml +0 -309
- package/.github/workflows/pages.yml +0 -38
- package/.github/workflows/release.yml +0 -207
- package/.prettierrc.json +0 -6
- package/.vscode/settings.json +0 -10
- package/ARCHITECTURE.md +0 -431
- package/CHANGELOG.md +0 -411
- package/commitlint.config.cjs +0 -4
- package/docker/redis.conf +0 -1
- package/docs/index.html +0 -140
- package/docs/robots.txt +0 -4
- package/docs/sitemap.xml +0 -8
- package/docs/styles.css +0 -141
- package/eslint.config.mjs +0 -26
- package/hooks/commit-msg +0 -10
- package/hooks/pre-commit +0 -11
- package/playwright.config.ts +0 -18
- package/release.config.cjs +0 -31
- package/scripts/prepare.sh +0 -7
- package/scripts/setup-git.sh +0 -8
- package/scripts/setup-repo-name.sh +0 -17
- package/scripts/vitest-run-staged.cjs +0 -44
- package/src/CacheComponentsHandler.ts +0 -567
- package/src/CachedHandler.ts +0 -53
- package/src/DeduplicatedRequestHandler.ts +0 -110
- package/src/RedisStringsHandler.ts +0 -937
- package/src/SyncedMap.ts +0 -482
- package/src/ZodHandler.ts +0 -45
- package/src/index.ts +0 -16
- package/src/serializer.ts +0 -59
- package/src/utils/debug.ts +0 -30
- package/src/utils/json.ts +0 -49
- package/src/utils/prefix.ts +0 -44
- package/test/README.md +0 -194
- package/test/nextjs-test-projects/next-app-15-4-11/README.md +0 -36
- package/test/nextjs-test-projects/next-app-15-4-11/eslint.config.mjs +0 -16
- package/test/nextjs-test-projects/next-app-15-4-11/next.config.js +0 -9
- package/test/nextjs-test-projects/next-app-15-4-11/package-lock.json +0 -5969
- package/test/nextjs-test-projects/next-app-15-4-11/package.json +0 -29
- package/test/nextjs-test-projects/next-app-15-4-11/pnpm-lock.yaml +0 -3726
- package/test/nextjs-test-projects/next-app-15-4-11/postcss.config.mjs +0 -5
- package/test/nextjs-test-projects/next-app-15-4-11/public/file.svg +0 -1
- package/test/nextjs-test-projects/next-app-15-4-11/public/globe.svg +0 -1
- package/test/nextjs-test-projects/next-app-15-4-11/public/next.svg +0 -1
- package/test/nextjs-test-projects/next-app-15-4-11/public/vercel.svg +0 -1
- package/test/nextjs-test-projects/next-app-15-4-11/public/window.svg +0 -1
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/api/cached-static-fetch/route.ts +0 -18
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -27
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/api/revalidatePath/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/api/revalidateTag/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/api/revalidated-fetch/route.ts +0 -17
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/api/uncached-fetch/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/layout.tsx +0 -59
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -34
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/no-fetch/default-page/page.tsx +0 -55
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -35
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -32
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-15-4-11/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-15-4-11/tsconfig.json +0 -27
- package/test/nextjs-test-projects/next-app-16-0-11/README.md +0 -36
- package/test/nextjs-test-projects/next-app-16-0-11/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-app-16-0-11/next.config.ts +0 -10
- package/test/nextjs-test-projects/next-app-16-0-11/package.json +0 -28
- package/test/nextjs-test-projects/next-app-16-0-11/pnpm-lock.yaml +0 -4163
- package/test/nextjs-test-projects/next-app-16-0-11/postcss.config.mjs +0 -7
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/api/cached-static-fetch/route.ts +0 -18
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -27
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/api/revalidatePath/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/api/revalidateTag/route.ts +0 -20
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/api/revalidated-fetch/route.ts +0 -17
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/api/uncached-fetch/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/favicon.ico +0 -0
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/layout.tsx +0 -59
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -34
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/no-fetch/default-page/page.tsx +0 -55
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -35
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -32
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-16-0-11/src/app/update-tag-test/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-0-11/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/README.md +0 -36
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/cache-handler.js +0 -3
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/next.config.ts +0 -13
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/package.json +0 -28
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/pnpm-lock.yaml +0 -4206
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/postcss.config.mjs +0 -7
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/public/file.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/public/globe.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/public/next.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/public/vercel.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/public/window.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/api/cached-static-fetch/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/api/cached-with-cachelife/route.ts +0 -24
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/api/cached-with-tag/route.ts +0 -21
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/api/revalidate-tag/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/api/revalidated-fetch/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/cache-lab/cachelife-short/page.tsx +0 -110
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/cache-lab/page.tsx +0 -90
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/cache-lab/runtime-data-suspense/page.tsx +0 -127
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/cache-lab/stale-while-revalidate/page.tsx +0 -130
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/cache-lab/tag-invalidation/page.tsx +0 -127
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/cache-lab/use-cache-nondeterministic/page.tsx +0 -110
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/favicon.ico +0 -0
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/layout.tsx +0 -57
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/src/app/update-tag-test/page.tsx +0 -22
- package/test/nextjs-test-projects/next-app-16-0-11-cache-components/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-app-16-2-6/README.md +0 -36
- package/test/nextjs-test-projects/next-app-16-2-6/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-app-16-2-6/next.config.ts +0 -7
- package/test/nextjs-test-projects/next-app-16-2-6/package.json +0 -28
- package/test/nextjs-test-projects/next-app-16-2-6/pnpm-lock.yaml +0 -4165
- package/test/nextjs-test-projects/next-app-16-2-6/postcss.config.mjs +0 -7
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/api/cached-static-fetch/route.ts +0 -18
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -27
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/api/revalidatePath/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/api/revalidateTag/route.ts +0 -20
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/api/revalidated-fetch/route.ts +0 -17
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/api/uncached-fetch/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/favicon.ico +0 -0
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/layout.tsx +0 -59
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -34
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/no-fetch/default-page/page.tsx +0 -55
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -35
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -32
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-16-2-6/src/app/update-tag-test/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-2-6/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/README.md +0 -36
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/cache-handler.js +0 -3
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/next.config.ts +0 -13
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/package.json +0 -28
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/pnpm-lock.yaml +0 -4165
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/postcss.config.mjs +0 -7
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/public/file.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/public/globe.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/public/next.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/public/vercel.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/public/window.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/cached-static-fetch/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/cached-with-cachelife/route.ts +0 -24
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/cached-with-tag/route.ts +0 -21
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/revalidate-tag/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/revalidated-fetch/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/cachelife-short/page.tsx +0 -110
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/page.tsx +0 -90
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/runtime-data-suspense/page.tsx +0 -127
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/stale-while-revalidate/page.tsx +0 -130
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/tag-invalidation/page.tsx +0 -127
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/use-cache-nondeterministic/page.tsx +0 -110
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/favicon.ico +0 -0
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/layout.tsx +0 -57
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/update-tag-test/page.tsx +0 -22
- package/test/nextjs-test-projects/next-app-16-2-6-cache-components/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-app-16-3-0/README.md +0 -36
- package/test/nextjs-test-projects/next-app-16-3-0/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-app-16-3-0/next.config.ts +0 -7
- package/test/nextjs-test-projects/next-app-16-3-0/package.json +0 -28
- package/test/nextjs-test-projects/next-app-16-3-0/pnpm-lock.yaml +0 -4284
- package/test/nextjs-test-projects/next-app-16-3-0/postcss.config.mjs +0 -7
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/cached-static-fetch/route.ts +0 -18
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -27
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/revalidatePath/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/revalidateTag/route.ts +0 -20
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/revalidated-fetch/route.ts +0 -17
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/api/uncached-fetch/route.ts +0 -15
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/favicon.ico +0 -0
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/layout.tsx +0 -59
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -34
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/no-fetch/default-page/page.tsx +0 -55
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -35
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -19
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -32
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-16-3-0/src/app/update-tag-test/page.tsx +0 -25
- package/test/nextjs-test-projects/next-app-16-3-0/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/README.md +0 -36
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/cache-handler.js +0 -3
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/next.config.ts +0 -13
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/package.json +0 -28
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/pnpm-lock.yaml +0 -4284
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/postcss.config.mjs +0 -7
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/file.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/globe.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/next.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/vercel.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/public/window.svg +0 -1
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/cached-static-fetch/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/cached-with-cachelife/route.ts +0 -24
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/cached-with-tag/route.ts +0 -21
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/revalidate-tag/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/api/revalidated-fetch/route.ts +0 -19
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/cachelife-short/page.tsx +0 -110
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/page.tsx +0 -90
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/runtime-data-suspense/page.tsx +0 -127
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/stale-while-revalidate/page.tsx +0 -130
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/tag-invalidation/page.tsx +0 -127
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/cache-lab/use-cache-nondeterministic/page.tsx +0 -110
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/favicon.ico +0 -0
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/globals.css +0 -26
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/layout.tsx +0 -57
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/page.tsx +0 -755
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/revalidation-interface.tsx +0 -267
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/src/app/update-tag-test/page.tsx +0 -22
- package/test/nextjs-test-projects/next-app-16-3-0-cache-components/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-app-customized/README.md +0 -36
- package/test/nextjs-test-projects/next-app-customized/customized-cache-handler.js +0 -34
- package/test/nextjs-test-projects/next-app-customized/eslint.config.mjs +0 -16
- package/test/nextjs-test-projects/next-app-customized/next.config.js +0 -6
- package/test/nextjs-test-projects/next-pages-16-2-6/README.md +0 -16
- package/test/nextjs-test-projects/next-pages-16-2-6/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-pages-16-2-6/next.config.ts +0 -7
- package/test/nextjs-test-projects/next-pages-16-2-6/package.json +0 -26
- package/test/nextjs-test-projects/next-pages-16-2-6/pnpm-lock.yaml +0 -3896
- package/test/nextjs-test-projects/next-pages-16-2-6/src/pages/api/revalidate.ts +0 -24
- package/test/nextjs-test-projects/next-pages-16-2-6/src/pages/index.tsx +0 -11
- package/test/nextjs-test-projects/next-pages-16-2-6/src/pages/isr/[slug].tsx +0 -49
- package/test/nextjs-test-projects/next-pages-16-2-6/src/pages/static-forever.tsx +0 -20
- package/test/nextjs-test-projects/next-pages-16-2-6/tsconfig.json +0 -34
- package/test/nextjs-test-projects/next-pages-16-3-0/README.md +0 -16
- package/test/nextjs-test-projects/next-pages-16-3-0/eslint.config.mjs +0 -18
- package/test/nextjs-test-projects/next-pages-16-3-0/next.config.ts +0 -7
- package/test/nextjs-test-projects/next-pages-16-3-0/package.json +0 -26
- package/test/nextjs-test-projects/next-pages-16-3-0/pnpm-lock.yaml +0 -3939
- package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/api/revalidate.ts +0 -24
- package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/index.tsx +0 -11
- package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/isr/[slug].tsx +0 -49
- package/test/nextjs-test-projects/next-pages-16-3-0/src/pages/static-forever.tsx +0 -20
- package/test/nextjs-test-projects/next-pages-16-3-0/tsconfig.json +0 -34
- package/test/playwright/cache-lab.spec.ts +0 -157
- package/test/playwright/update-tag.spec.ts +0 -33
- package/test/vitest/integration/build-id-prefix.integration.test.ts +0 -102
- package/test/vitest/integration/cache-components/cache-components.integration.test.ts +0 -231
- package/test/vitest/integration/cache-components/redis-kill-reconnect.test.ts +0 -65
- package/test/vitest/integration/cache-components/redis-quit-vs-disconnect.test.ts +0 -59
- package/test/vitest/integration/cache-components/redis-subscriber-outage.test.ts +0 -100
- package/test/vitest/integration/cache-components/scripts/redis-kill-reconnect.ts +0 -243
- package/test/vitest/integration/cache-components/scripts/redis-quit-vs-disconnect.ts +0 -113
- package/test/vitest/integration/cache-components/scripts/redis-subscriber-outage.ts +0 -379
- package/test/vitest/integration/cache-components/scripts/redis-test-helpers.ts +0 -155
- package/test/vitest/integration/nextjs-cache-handler.integration.test.ts +0 -945
- package/test/vitest/integration/pages-router.integration.test.ts +0 -420
- package/test/vitest/unit/SyncedMap-reconnect-repro.test.ts +0 -154
- package/test/vitest/unit/index.test.ts +0 -173
- package/test/vitest/unit/pages-router-kinds.test.ts +0 -292
- package/test/vitest/unit/reconnect-socket-already-opened.test.ts +0 -117
- package/test/vitest/unit/serializer.test.ts +0 -182
- package/test/vitest/unit/utils/prefix.test.ts +0 -115
- package/tsconfig.json +0 -18
- package/tsup.config.ts +0 -14
- package/vite.config.ts +0 -34
- package/vitest.cache-components.config.ts +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trieb.work/nextjs-turbo-redis-cache",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.1",
|
|
4
4
|
"homepage": "https://trwk.de/case-studies/nextjs-turbo-redis-cache",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
"require": "./dist/index.js",
|
|
33
33
|
"import": "./dist/index.mjs"
|
|
34
34
|
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"README.md",
|
|
38
|
+
"LICENSE"
|
|
39
|
+
],
|
|
35
40
|
"keywords": [
|
|
36
41
|
"nextjs",
|
|
37
42
|
"redis",
|
|
@@ -78,10 +83,8 @@
|
|
|
78
83
|
"@commitlint/cli": "^19.6.0",
|
|
79
84
|
"@commitlint/config-conventional": "^19.6.0",
|
|
80
85
|
"@playwright/test": "^1.62.0",
|
|
81
|
-
"@semantic-release/
|
|
82
|
-
"@semantic-release/
|
|
83
|
-
"@semantic-release/github": "^12.0.2",
|
|
84
|
-
"@semantic-release/npm": "^13.1.3",
|
|
86
|
+
"@semantic-release/github": "12.0.9",
|
|
87
|
+
"@semantic-release/npm": "13.1.5",
|
|
85
88
|
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
86
89
|
"@typescript-eslint/parser": "^8.15.0",
|
|
87
90
|
"@vitest/coverage-v8": "^4.0.13",
|
|
@@ -91,7 +94,7 @@
|
|
|
91
94
|
"node-fetch": "3",
|
|
92
95
|
"prettier": "^3.3.3",
|
|
93
96
|
"redis": "4.7.0",
|
|
94
|
-
"semantic-release": "
|
|
97
|
+
"semantic-release": "25.0.9",
|
|
95
98
|
"tsup": "^8.4.0",
|
|
96
99
|
"tsx": "^4.21.0",
|
|
97
100
|
"typescript": "^5.6.3",
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: testing
|
|
3
|
-
description: >-
|
|
4
|
-
Run tests and add Next.js version coverage for the cache handler. Use when
|
|
5
|
-
running tests, adding a new Next.js version to the test matrix, creating test
|
|
6
|
-
apps, or debugging CI failures.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Testing
|
|
10
|
-
|
|
11
|
-
## Running Tests
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# Unit tests (fast, no Redis needed)
|
|
15
|
-
pnpm test:unit
|
|
16
|
-
pnpm test:unit:watch # watch mode
|
|
17
|
-
pnpm test:unit:coverage # with coverage
|
|
18
|
-
|
|
19
|
-
# Integration tests (needs Redis + pre-built Next.js app)
|
|
20
|
-
pnpm test:integration
|
|
21
|
-
pnpm test:integration:build-id-prefix
|
|
22
|
-
pnpm test:integration:cache-components
|
|
23
|
-
|
|
24
|
-
# E2E / Playwright for cached components (needs Redis, auto-starts Next.js app)
|
|
25
|
-
pnpm test:e2e
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Test Structure
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
test/
|
|
32
|
-
├── playwright/ # E2E (Playwright browser tests)
|
|
33
|
-
├── vitest/
|
|
34
|
-
│ ├── unit/ # Unit tests (no external deps)
|
|
35
|
-
│ └── integration/ # Integration tests (Redis + Next.js)
|
|
36
|
-
│ └── cache-components/
|
|
37
|
-
└── nextjs-test-projects/ # Shared Next.js app fixtures
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
For details on each layer, see `test/README.md`.
|
|
41
|
-
|
|
42
|
-
## Adding a New Next.js Version
|
|
43
|
-
|
|
44
|
-
### 1. Standard Integration Test App
|
|
45
|
-
|
|
46
|
-
For testing the core cache handler against a new Next.js version (e.g. 16.5.0):
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
cp -r test/nextjs-test-projects/next-app-16-2-6 test/nextjs-test-projects/next-app-16-5-0
|
|
50
|
-
rm -rf test/nextjs-test-projects/next-app-16-5-0/{node_modules,.next,pnpm-lock.yaml}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Edit `test/nextjs-test-projects/next-app-16-5-0/package.json`:
|
|
54
|
-
|
|
55
|
-
- Change `"name"` to `"next-app-16-5-0"`
|
|
56
|
-
- Change `"next"` version to `"16.5.0"`
|
|
57
|
-
- Change `"eslint-config-next"` version to `"16.5.0"`
|
|
58
|
-
|
|
59
|
-
Then add the app to the CI integration matrix in `.github/workflows/ci.yml`:
|
|
60
|
-
|
|
61
|
-
```yaml
|
|
62
|
-
# In the `integration` job → strategy.matrix.next-test-app
|
|
63
|
-
- next-app-16-5-0
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 2. Cache Components Test App (Next.js 16+ only)
|
|
67
|
-
|
|
68
|
-
If the new version supports `use cache` / `cacheTag` / `cacheLife`:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
cp -r test/nextjs-test-projects/next-app-16-2-6-cache-components test/nextjs-test-projects/next-app-16-5-0-cache-components
|
|
72
|
-
rm -rf test/nextjs-test-projects/next-app-16-5-0-cache-components/{node_modules,.next,pnpm-lock.yaml}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Edit the `package.json`:
|
|
76
|
-
|
|
77
|
-
- Change `"name"` to `"next-app-16-5-0-cache-components"`
|
|
78
|
-
- Change `"next"` to `"16.5.0"`
|
|
79
|
-
- Change `"eslint-config-next"` to `"16.5.0"`
|
|
80
|
-
|
|
81
|
-
Then add it to both CI matrix jobs in `.github/workflows/ci.yml`:
|
|
82
|
-
|
|
83
|
-
```yaml
|
|
84
|
-
# In `integration-cache-components` → strategy.matrix.cache-components-app
|
|
85
|
-
- next-app-16-5-0-cache-components
|
|
86
|
-
|
|
87
|
-
# In `e2e` → strategy.matrix.cache-components-app
|
|
88
|
-
- next-app-16-5-0-cache-components
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### 3. Checklist After Adding
|
|
92
|
-
|
|
93
|
-
- [ ] `package.json` has correct Next.js version + matching `eslint-config-next`
|
|
94
|
-
- [ ] `"@trieb.work/nextjs-turbo-redis-cache": "file:../../../"` path is correct
|
|
95
|
-
- [ ] No leftover `node_modules/`, `.next/`, or `pnpm-lock.yaml` from the copy
|
|
96
|
-
- [ ] CI matrix updated (integration and/or cache-components + e2e)
|
|
97
|
-
- [ ] `test/README.md` → "Next.js Test Projects" table updated
|
|
98
|
-
- [ ] Run `cd test/nextjs-test-projects/next-app-16-5-0 && pnpm install && pnpm build` to verify it builds
|
|
99
|
-
|
|
100
|
-
### 4. Removing a Version
|
|
101
|
-
|
|
102
|
-
Remove the folder, remove it from the CI matrix entries, and update `test/README.md`.
|
|
103
|
-
|
|
104
|
-
## Environment Variables
|
|
105
|
-
|
|
106
|
-
| Variable | Default | Purpose |
|
|
107
|
-
| ---------------------- | ---------------------------------- | ----------------------------------------- |
|
|
108
|
-
| `NEXT_TEST_APP` | `next-app-15-4-11` | Which app for `pnpm test:integration` |
|
|
109
|
-
| `CACHE_COMPONENTS_APP` | `next-app-16-2-6-cache-components` | Which app for cache-components tests |
|
|
110
|
-
| `PLAYWRIGHT_TEST_APP` | `next-app-16-2-6-cache-components` | Which app Playwright starts |
|
|
111
|
-
| `PLAYWRIGHT_BASE_URL` | `http://localhost:3101` | Override to use an already-running server |
|
|
112
|
-
| `SKIP_BUILD` | — | Skip Next.js build in integration tests |
|
|
113
|
-
| `DEBUG_INTEGRATION` | — | Print child process output |
|
|
114
|
-
|
|
115
|
-
## Writing New Tests
|
|
116
|
-
|
|
117
|
-
- **Unit tests**: Add `*.test.ts` in `test/vitest/unit/`. No Redis, no Next.js. Use mocks.
|
|
118
|
-
- **Integration tests**: Add `*.test.ts` in `test/vitest/integration/`. Spawn Next.js, use `fetch()`, check Redis.
|
|
119
|
-
- **E2E tests**: Add `*.spec.ts` in `test/playwright/`. Use Playwright browser automation.
|
|
120
|
-
|
|
121
|
-
Unit tests use `.test.ts` extension. Playwright tests use `.spec.ts` extension.
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
pull_request:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
lint-and-unit:
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
permissions:
|
|
18
|
-
contents: read
|
|
19
|
-
pull-requests: write
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout code
|
|
22
|
-
uses: actions/checkout@v6
|
|
23
|
-
|
|
24
|
-
- name: Install pnpm
|
|
25
|
-
run: corepack enable
|
|
26
|
-
|
|
27
|
-
- name: Setup Node.js
|
|
28
|
-
uses: actions/setup-node@v6
|
|
29
|
-
with:
|
|
30
|
-
node-version: '22'
|
|
31
|
-
cache: 'pnpm'
|
|
32
|
-
|
|
33
|
-
- name: Install dependencies
|
|
34
|
-
run: pnpm install --ignore-scripts
|
|
35
|
-
|
|
36
|
-
- name: Run lint
|
|
37
|
-
run: pnpm lint
|
|
38
|
-
|
|
39
|
-
- name: Build project
|
|
40
|
-
run: pnpm build
|
|
41
|
-
|
|
42
|
-
- name: Run unit tests
|
|
43
|
-
run: pnpm test:unit:coverage
|
|
44
|
-
|
|
45
|
-
- name: Code Coverage Comments
|
|
46
|
-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
|
47
|
-
uses: kcjpop/coverage-comments@v2.2
|
|
48
|
-
with:
|
|
49
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
50
|
-
coverage-file: './coverage/lcov.info'
|
|
51
|
-
|
|
52
|
-
- name: Dry run the release
|
|
53
|
-
if: github.event_name == 'pull_request'
|
|
54
|
-
env:
|
|
55
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
56
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
57
|
-
run: npx semantic-release --dry-run
|
|
58
|
-
|
|
59
|
-
integration:
|
|
60
|
-
runs-on: ubuntu-latest
|
|
61
|
-
needs: lint-and-unit
|
|
62
|
-
strategy:
|
|
63
|
-
matrix:
|
|
64
|
-
next-test-app:
|
|
65
|
-
- next-app-15-4-11
|
|
66
|
-
- next-app-16-0-11
|
|
67
|
-
- next-app-16-2-6
|
|
68
|
-
- next-app-16-3-0
|
|
69
|
-
steps:
|
|
70
|
-
- name: Checkout code
|
|
71
|
-
uses: actions/checkout@v6
|
|
72
|
-
|
|
73
|
-
- name: Install pnpm
|
|
74
|
-
run: corepack enable
|
|
75
|
-
|
|
76
|
-
- name: Setup Node.js
|
|
77
|
-
uses: actions/setup-node@v6
|
|
78
|
-
with:
|
|
79
|
-
node-version: '22'
|
|
80
|
-
cache: 'pnpm'
|
|
81
|
-
|
|
82
|
-
- name: Install dependencies
|
|
83
|
-
run: pnpm install --ignore-scripts
|
|
84
|
-
|
|
85
|
-
- name: Build project
|
|
86
|
-
run: pnpm build
|
|
87
|
-
|
|
88
|
-
- name: Start Redis
|
|
89
|
-
uses: supercharge/redis-github-action@1.8.0
|
|
90
|
-
with:
|
|
91
|
-
redis-version: '7'
|
|
92
|
-
redis-port: 6379
|
|
93
|
-
|
|
94
|
-
- name: Install redis-cli
|
|
95
|
-
run: sudo apt-get update && sudo apt-get install -y redis-tools
|
|
96
|
-
|
|
97
|
-
- name: Configure Redis Keyspace Notifications
|
|
98
|
-
run: redis-cli config set notify-keyspace-events Exe
|
|
99
|
-
|
|
100
|
-
- name: Install test project
|
|
101
|
-
run: cd test/nextjs-test-projects/${{ matrix.next-test-app }} && pnpm install
|
|
102
|
-
|
|
103
|
-
- name: Build test project
|
|
104
|
-
run: cd test/nextjs-test-projects/${{ matrix.next-test-app }} && pnpm build
|
|
105
|
-
|
|
106
|
-
- name: Run integration tests
|
|
107
|
-
run: pnpm test:integration
|
|
108
|
-
env:
|
|
109
|
-
SKIP_BUILD: true
|
|
110
|
-
NEXT_TEST_APP: ${{ matrix.next-test-app }}
|
|
111
|
-
|
|
112
|
-
integration-pages:
|
|
113
|
-
runs-on: ubuntu-latest
|
|
114
|
-
needs: lint-and-unit
|
|
115
|
-
strategy:
|
|
116
|
-
matrix:
|
|
117
|
-
pages-test-app:
|
|
118
|
-
- next-pages-16-2-6
|
|
119
|
-
- next-pages-16-3-0
|
|
120
|
-
steps:
|
|
121
|
-
- name: Checkout code
|
|
122
|
-
uses: actions/checkout@v6
|
|
123
|
-
|
|
124
|
-
- name: Install pnpm
|
|
125
|
-
run: corepack enable
|
|
126
|
-
|
|
127
|
-
- name: Setup Node.js
|
|
128
|
-
uses: actions/setup-node@v6
|
|
129
|
-
with:
|
|
130
|
-
node-version: '22'
|
|
131
|
-
cache: 'pnpm'
|
|
132
|
-
|
|
133
|
-
- name: Install dependencies
|
|
134
|
-
run: pnpm install --ignore-scripts
|
|
135
|
-
|
|
136
|
-
- name: Build project
|
|
137
|
-
run: pnpm build
|
|
138
|
-
|
|
139
|
-
- name: Start Redis
|
|
140
|
-
uses: supercharge/redis-github-action@1.8.0
|
|
141
|
-
with:
|
|
142
|
-
redis-version: '7'
|
|
143
|
-
redis-port: 6379
|
|
144
|
-
|
|
145
|
-
- name: Install redis-cli
|
|
146
|
-
run: sudo apt-get update && sudo apt-get install -y redis-tools
|
|
147
|
-
|
|
148
|
-
- name: Configure Redis Keyspace Notifications
|
|
149
|
-
run: redis-cli config set notify-keyspace-events Exe
|
|
150
|
-
|
|
151
|
-
- name: Install test project
|
|
152
|
-
run: cd test/nextjs-test-projects/${{ matrix.pages-test-app }} && pnpm install
|
|
153
|
-
|
|
154
|
-
- name: Build test project
|
|
155
|
-
run: cd test/nextjs-test-projects/${{ matrix.pages-test-app }} && pnpm build
|
|
156
|
-
|
|
157
|
-
- name: Run Pages Router integration tests
|
|
158
|
-
run: pnpm test:integration:pages
|
|
159
|
-
env:
|
|
160
|
-
SKIP_BUILD: true
|
|
161
|
-
NEXT_PAGES_TEST_APP: ${{ matrix.pages-test-app }}
|
|
162
|
-
|
|
163
|
-
integration-build-id-prefix:
|
|
164
|
-
runs-on: ubuntu-latest
|
|
165
|
-
needs: lint-and-unit
|
|
166
|
-
steps:
|
|
167
|
-
- name: Checkout code
|
|
168
|
-
uses: actions/checkout@v6
|
|
169
|
-
|
|
170
|
-
- name: Install pnpm
|
|
171
|
-
run: corepack enable
|
|
172
|
-
|
|
173
|
-
- name: Setup Node.js
|
|
174
|
-
uses: actions/setup-node@v6
|
|
175
|
-
with:
|
|
176
|
-
node-version: '22'
|
|
177
|
-
cache: 'pnpm'
|
|
178
|
-
|
|
179
|
-
- name: Install dependencies
|
|
180
|
-
run: pnpm install --ignore-scripts
|
|
181
|
-
|
|
182
|
-
- name: Build project
|
|
183
|
-
run: pnpm build
|
|
184
|
-
|
|
185
|
-
- name: Start Redis
|
|
186
|
-
uses: supercharge/redis-github-action@1.8.0
|
|
187
|
-
with:
|
|
188
|
-
redis-version: '7'
|
|
189
|
-
redis-port: 6379
|
|
190
|
-
|
|
191
|
-
- name: Install redis-cli
|
|
192
|
-
run: sudo apt-get update && sudo apt-get install -y redis-tools
|
|
193
|
-
|
|
194
|
-
- name: Configure Redis Keyspace Notifications
|
|
195
|
-
run: redis-cli config set notify-keyspace-events Exe
|
|
196
|
-
|
|
197
|
-
- name: Install test project
|
|
198
|
-
run: cd test/nextjs-test-projects/next-app-15-4-11 && pnpm install
|
|
199
|
-
|
|
200
|
-
- name: Build test project
|
|
201
|
-
run: cd test/nextjs-test-projects/next-app-15-4-11 && pnpm build
|
|
202
|
-
|
|
203
|
-
- name: Run BUILD_ID prefix integration test
|
|
204
|
-
run: pnpm test:integration:build-id-prefix
|
|
205
|
-
|
|
206
|
-
integration-cache-components:
|
|
207
|
-
runs-on: ubuntu-latest
|
|
208
|
-
needs: lint-and-unit
|
|
209
|
-
strategy:
|
|
210
|
-
matrix:
|
|
211
|
-
cache-components-app:
|
|
212
|
-
- next-app-16-0-11-cache-components
|
|
213
|
-
- next-app-16-2-6-cache-components
|
|
214
|
-
- next-app-16-3-0-cache-components
|
|
215
|
-
steps:
|
|
216
|
-
- name: Checkout code
|
|
217
|
-
uses: actions/checkout@v6
|
|
218
|
-
|
|
219
|
-
- name: Install pnpm
|
|
220
|
-
run: corepack enable
|
|
221
|
-
|
|
222
|
-
- name: Setup Node.js
|
|
223
|
-
uses: actions/setup-node@v6
|
|
224
|
-
with:
|
|
225
|
-
node-version: '22'
|
|
226
|
-
cache: 'pnpm'
|
|
227
|
-
|
|
228
|
-
- name: Install dependencies
|
|
229
|
-
run: pnpm install --ignore-scripts
|
|
230
|
-
|
|
231
|
-
- name: Build project
|
|
232
|
-
run: pnpm build
|
|
233
|
-
|
|
234
|
-
- name: Start Redis
|
|
235
|
-
uses: supercharge/redis-github-action@1.8.0
|
|
236
|
-
with:
|
|
237
|
-
redis-version: '7'
|
|
238
|
-
redis-port: 6379
|
|
239
|
-
|
|
240
|
-
- name: Install redis-cli
|
|
241
|
-
run: sudo apt-get update && sudo apt-get install -y redis-tools
|
|
242
|
-
|
|
243
|
-
- name: Configure Redis Keyspace Notifications
|
|
244
|
-
run: redis-cli config set notify-keyspace-events Exe
|
|
245
|
-
|
|
246
|
-
- name: Install test project
|
|
247
|
-
run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm install
|
|
248
|
-
|
|
249
|
-
- name: Build test project
|
|
250
|
-
run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm build
|
|
251
|
-
|
|
252
|
-
- name: Run cache-components integration tests
|
|
253
|
-
run: pnpm test:integration:cache-components
|
|
254
|
-
env:
|
|
255
|
-
CACHE_COMPONENTS_APP: ${{ matrix.cache-components-app }}
|
|
256
|
-
|
|
257
|
-
e2e:
|
|
258
|
-
runs-on: ubuntu-latest
|
|
259
|
-
needs: lint-and-unit
|
|
260
|
-
strategy:
|
|
261
|
-
matrix:
|
|
262
|
-
cache-components-app:
|
|
263
|
-
- next-app-16-0-11-cache-components
|
|
264
|
-
- next-app-16-2-6-cache-components
|
|
265
|
-
- next-app-16-3-0-cache-components
|
|
266
|
-
steps:
|
|
267
|
-
- name: Checkout code
|
|
268
|
-
uses: actions/checkout@v6
|
|
269
|
-
|
|
270
|
-
- name: Install pnpm
|
|
271
|
-
run: corepack enable
|
|
272
|
-
|
|
273
|
-
- name: Setup Node.js
|
|
274
|
-
uses: actions/setup-node@v6
|
|
275
|
-
with:
|
|
276
|
-
node-version: '22'
|
|
277
|
-
cache: 'pnpm'
|
|
278
|
-
|
|
279
|
-
- name: Install dependencies
|
|
280
|
-
run: pnpm install --ignore-scripts
|
|
281
|
-
|
|
282
|
-
- name: Build project
|
|
283
|
-
run: pnpm build
|
|
284
|
-
|
|
285
|
-
- name: Start Redis
|
|
286
|
-
uses: supercharge/redis-github-action@1.8.0
|
|
287
|
-
with:
|
|
288
|
-
redis-version: '7'
|
|
289
|
-
redis-port: 6379
|
|
290
|
-
|
|
291
|
-
- name: Install redis-cli
|
|
292
|
-
run: sudo apt-get update && sudo apt-get install -y redis-tools
|
|
293
|
-
|
|
294
|
-
- name: Configure Redis Keyspace Notifications
|
|
295
|
-
run: redis-cli config set notify-keyspace-events Exe
|
|
296
|
-
|
|
297
|
-
- name: Install test project
|
|
298
|
-
run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm install
|
|
299
|
-
|
|
300
|
-
- name: Build test project
|
|
301
|
-
run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm build
|
|
302
|
-
|
|
303
|
-
- name: Install Playwright browsers
|
|
304
|
-
run: pnpm exec playwright install --with-deps
|
|
305
|
-
|
|
306
|
-
- name: Run Playwright E2E tests
|
|
307
|
-
run: pnpm test:e2e
|
|
308
|
-
env:
|
|
309
|
-
PLAYWRIGHT_TEST_APP: ${{ matrix.cache-components-app }}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
name: Deploy GitHub Pages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
pages: write
|
|
12
|
-
id-token: write
|
|
13
|
-
|
|
14
|
-
concurrency:
|
|
15
|
-
group: pages
|
|
16
|
-
cancel-in-progress: true
|
|
17
|
-
|
|
18
|
-
jobs:
|
|
19
|
-
deploy:
|
|
20
|
-
runs-on: ubuntu-latest
|
|
21
|
-
environment:
|
|
22
|
-
name: github-pages
|
|
23
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
24
|
-
steps:
|
|
25
|
-
- name: Checkout code
|
|
26
|
-
uses: actions/checkout@v6
|
|
27
|
-
|
|
28
|
-
- name: Setup Pages
|
|
29
|
-
uses: actions/configure-pages@v5
|
|
30
|
-
|
|
31
|
-
- name: Upload static site artifact
|
|
32
|
-
uses: actions/upload-pages-artifact@v4
|
|
33
|
-
with:
|
|
34
|
-
path: docs
|
|
35
|
-
|
|
36
|
-
- name: Deploy to GitHub Pages
|
|
37
|
-
id: deployment
|
|
38
|
-
uses: actions/deploy-pages@v4
|