@trieb.work/nextjs-turbo-redis-cache 1.15.0 → 1.15.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.
Files changed (246) hide show
  1. package/.cursor/skills/testing/SKILL.md +121 -0
  2. package/.github/workflows/ci.yml +155 -70
  3. package/ARCHITECTURE.md +431 -0
  4. package/CHANGELOG.md +7 -0
  5. package/README.md +72 -47
  6. package/dist/index.js +78 -14
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +78 -14
  9. package/dist/index.mjs.map +1 -1
  10. package/eslint.config.mjs +1 -1
  11. package/package.json +14 -16
  12. package/playwright.config.ts +5 -3
  13. package/src/CacheComponentsHandler.ts +57 -2
  14. package/src/SyncedMap.ts +62 -13
  15. package/test/README.md +179 -0
  16. package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/package.json +6 -6
  17. package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-15-4-11}/pnpm-lock.yaml +89 -105
  18. package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11}/package.json +3 -3
  19. package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11}/pnpm-lock.yaml +53 -53
  20. package/test/nextjs-test-projects/next-app-16-0-11-cache-components/package.json +28 -0
  21. package/test/nextjs-test-projects/next-app-16-0-11-cache-components/pnpm-lock.yaml +4206 -0
  22. package/test/nextjs-test-projects/next-app-16-2-6/eslint.config.mjs +18 -0
  23. package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6}/package.json +3 -3
  24. package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6}/pnpm-lock.yaml +54 -60
  25. package/test/nextjs-test-projects/next-app-16-2-6/postcss.config.mjs +7 -0
  26. package/test/nextjs-test-projects/next-app-16-2-6/src/app/favicon.ico +0 -0
  27. package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-2-6}/tsconfig.json +9 -2
  28. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/cache-handler.js +3 -0
  29. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/next.config.ts +13 -0
  30. package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-2-6-cache-components}/package.json +3 -3
  31. package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-2-6-cache-components}/pnpm-lock.yaml +54 -60
  32. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/cached-static-fetch/route.ts +19 -0
  33. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/cached-with-cachelife/route.ts +24 -0
  34. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/cached-with-tag/route.ts +21 -0
  35. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/revalidate-tag/route.ts +19 -0
  36. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/api/revalidated-fetch/route.ts +19 -0
  37. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/cachelife-short/page.tsx +110 -0
  38. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/page.tsx +90 -0
  39. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/runtime-data-suspense/page.tsx +127 -0
  40. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/stale-while-revalidate/page.tsx +130 -0
  41. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/tag-invalidation/page.tsx +127 -0
  42. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/cache-lab/use-cache-nondeterministic/page.tsx +110 -0
  43. package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/src/app/layout.tsx +0 -2
  44. package/test/nextjs-test-projects/next-app-16-2-6-cache-components/src/app/update-tag-test/page.tsx +22 -0
  45. package/{tests → test/playwright}/update-tag.spec.ts +1 -1
  46. package/test/{integration → vitest/integration}/build-id-prefix.integration.test.ts +2 -2
  47. package/test/{cache-components/cache-components.integration.spec.ts → vitest/integration/cache-components/cache-components.integration.test.ts} +7 -3
  48. package/test/{cache-components/redis-kill-reconnect.spec.ts → vitest/integration/cache-components/redis-kill-reconnect.test.ts} +28 -7
  49. package/test/vitest/integration/cache-components/redis-quit-vs-disconnect.test.ts +59 -0
  50. package/test/vitest/integration/cache-components/redis-subscriber-outage.test.ts +100 -0
  51. package/test/{cache-components → vitest/integration/cache-components}/scripts/redis-kill-reconnect.ts +31 -8
  52. package/test/vitest/integration/cache-components/scripts/redis-quit-vs-disconnect.ts +113 -0
  53. package/test/vitest/integration/cache-components/scripts/redis-subscriber-outage.ts +379 -0
  54. package/test/vitest/integration/cache-components/scripts/redis-test-helpers.ts +155 -0
  55. package/test/{integration → vitest/integration}/nextjs-cache-handler.integration.test.ts +15 -9
  56. package/test/vitest/unit/SyncedMap-reconnect-repro.test.ts +154 -0
  57. package/{src → test/vitest/unit}/index.test.ts +3 -3
  58. package/test/{cache-components/reconnect-socket-already-opened.spec.ts → vitest/unit/reconnect-socket-already-opened.test.ts} +1 -1
  59. package/{src → test/vitest/unit}/serializer.test.ts +7 -3
  60. package/{src → test/vitest/unit}/utils/prefix.test.ts +1 -1
  61. package/vite.config.ts +4 -3
  62. package/vitest.cache-components.config.ts +1 -1
  63. package/test/browser/update-tag.browser.test.ts +0 -41
  64. package/test/integration/next-app-15-0-3/next.config.js +0 -6
  65. package/test/integration/next-app-15-0-3/package-lock.json +0 -5833
  66. package/test/integration/next-app-15-0-3/pnpm-lock.yaml +0 -3710
  67. package/test/integration/next-app-15-3-2/next.config.js +0 -6
  68. package/test/integration/next-app-15-3-2/package.json +0 -33
  69. package/test/integration/next-app-15-3-2/pnpm-lock.yaml +0 -3720
  70. package/test/integration/next-app-15-3-2/postcss.config.mjs +0 -5
  71. package/test/integration/next-app-15-3-2/src/app/api/revalidateTag/route.ts +0 -15
  72. package/test/integration/next-app-15-4-7/eslint.config.mjs +0 -16
  73. package/test/integration/next-app-15-4-7/package-lock.json +0 -5969
  74. package/test/integration/next-app-15-4-7/package.json +0 -33
  75. package/test/integration/next-app-15-4-7/postcss.config.mjs +0 -5
  76. package/test/integration/next-app-15-4-7/src/app/api/revalidateTag/route.ts +0 -15
  77. package/test/integration/next-app-15-4-7/tsconfig.json +0 -27
  78. package/test/integration/next-app-16-0-3/src/app/api/cached-static-fetch/route.ts +0 -18
  79. package/test/integration/next-app-16-0-3/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -27
  80. package/test/integration/next-app-16-0-3/src/app/api/revalidatePath/route.ts +0 -15
  81. package/test/integration/next-app-16-0-3/src/app/api/revalidated-fetch/route.ts +0 -17
  82. package/test/integration/next-app-16-0-3/src/app/api/uncached-fetch/route.ts +0 -15
  83. package/test/integration/next-app-16-0-3/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -19
  84. package/test/integration/next-app-16-0-3/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -34
  85. package/test/integration/next-app-16-0-3/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
  86. package/test/integration/next-app-16-0-3/src/app/pages/no-fetch/default-page/page.tsx +0 -55
  87. package/test/integration/next-app-16-0-3/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -19
  88. package/test/integration/next-app-16-0-3/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -35
  89. package/test/integration/next-app-16-0-3/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
  90. package/test/integration/next-app-16-0-3/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -19
  91. package/test/integration/next-app-16-0-3/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -32
  92. package/test/integration/next-app-16-0-3/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
  93. package/test/integration/next-app-16-2-3/src/app/api/cached-static-fetch/route.ts +0 -18
  94. package/test/integration/next-app-16-2-3/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -27
  95. package/test/integration/next-app-16-2-3/src/app/api/revalidatePath/route.ts +0 -15
  96. package/test/integration/next-app-16-2-3/src/app/api/revalidated-fetch/route.ts +0 -17
  97. package/test/integration/next-app-16-2-3/src/app/api/uncached-fetch/route.ts +0 -15
  98. package/test/integration/next-app-16-2-3/src/app/globals.css +0 -26
  99. package/test/integration/next-app-16-2-3/src/app/layout.tsx +0 -59
  100. package/test/integration/next-app-16-2-3/src/app/page.tsx +0 -755
  101. package/test/integration/next-app-16-2-3/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -19
  102. package/test/integration/next-app-16-2-3/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -34
  103. package/test/integration/next-app-16-2-3/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
  104. package/test/integration/next-app-16-2-3/src/app/pages/no-fetch/default-page/page.tsx +0 -55
  105. package/test/integration/next-app-16-2-3/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -19
  106. package/test/integration/next-app-16-2-3/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -35
  107. package/test/integration/next-app-16-2-3/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
  108. package/test/integration/next-app-16-2-3/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -19
  109. package/test/integration/next-app-16-2-3/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -32
  110. package/test/integration/next-app-16-2-3/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -25
  111. package/test/integration/next-app-16-2-3/src/app/revalidation-interface.tsx +0 -267
  112. package/test/integration/next-app-16-2-3-cache-components/public/file.svg +0 -1
  113. package/test/integration/next-app-16-2-3-cache-components/public/globe.svg +0 -1
  114. package/test/integration/next-app-16-2-3-cache-components/public/next.svg +0 -1
  115. package/test/integration/next-app-16-2-3-cache-components/public/vercel.svg +0 -1
  116. package/test/integration/next-app-16-2-3-cache-components/public/window.svg +0 -1
  117. package/test/integration/next-app-customized/README.md +0 -36
  118. package/test/integration/next-app-customized/eslint.config.mjs +0 -16
  119. package/vitest.browser.config.ts +0 -10
  120. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/README.md +0 -0
  121. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/eslint.config.mjs +0 -0
  122. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-15-4-11}/next.config.js +0 -0
  123. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-15-4-11}/package-lock.json +0 -0
  124. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/postcss.config.mjs +0 -0
  125. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/public/file.svg +0 -0
  126. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/public/globe.svg +0 -0
  127. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/public/next.svg +0 -0
  128. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/public/vercel.svg +0 -0
  129. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/public/window.svg +0 -0
  130. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/api/cached-static-fetch/route.ts +0 -0
  131. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -0
  132. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/api/revalidatePath/route.ts +0 -0
  133. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/api/revalidateTag/route.ts +0 -0
  134. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/api/revalidated-fetch/route.ts +0 -0
  135. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/api/uncached-fetch/route.ts +0 -0
  136. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/globals.css +0 -0
  137. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/layout.tsx +0 -0
  138. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/page.tsx +0 -0
  139. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -0
  140. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -0
  141. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  142. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/no-fetch/default-page/page.tsx +0 -0
  143. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -0
  144. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -0
  145. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  146. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -0
  147. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -0
  148. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  149. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/src/app/revalidation-interface.tsx +0 -0
  150. /package/test/{integration/next-app-15-0-3 → nextjs-test-projects/next-app-15-4-11}/tsconfig.json +0 -0
  151. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-0-11}/README.md +0 -0
  152. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11}/eslint.config.mjs +0 -0
  153. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11}/next.config.ts +0 -0
  154. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11}/postcss.config.mjs +0 -0
  155. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/api/cached-static-fetch/route.ts +0 -0
  156. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -0
  157. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/api/revalidatePath/route.ts +0 -0
  158. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11}/src/app/api/revalidateTag/route.ts +0 -0
  159. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/api/revalidated-fetch/route.ts +0 -0
  160. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/api/uncached-fetch/route.ts +0 -0
  161. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11}/src/app/favicon.ico +0 -0
  162. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-0-11}/src/app/globals.css +0 -0
  163. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/layout.tsx +0 -0
  164. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-0-11}/src/app/page.tsx +0 -0
  165. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -0
  166. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -0
  167. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  168. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/no-fetch/default-page/page.tsx +0 -0
  169. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -0
  170. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -0
  171. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  172. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -0
  173. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -0
  174. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11}/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  175. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-0-11}/src/app/revalidation-interface.tsx +0 -0
  176. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11}/src/app/update-tag-test/page.tsx +0 -0
  177. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11}/tsconfig.json +0 -0
  178. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/README.md +0 -0
  179. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/cache-handler.js +0 -0
  180. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11-cache-components}/eslint.config.mjs +0 -0
  181. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/next.config.ts +0 -0
  182. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11-cache-components}/postcss.config.mjs +0 -0
  183. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/public/file.svg +0 -0
  184. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/public/globe.svg +0 -0
  185. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/public/next.svg +0 -0
  186. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/public/vercel.svg +0 -0
  187. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/public/window.svg +0 -0
  188. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/api/cached-static-fetch/route.ts +0 -0
  189. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/api/cached-with-cachelife/route.ts +0 -0
  190. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/api/cached-with-tag/route.ts +0 -0
  191. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/api/revalidate-tag/route.ts +0 -0
  192. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/api/revalidated-fetch/route.ts +0 -0
  193. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/cache-lab/cachelife-short/page.tsx +0 -0
  194. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/cache-lab/page.tsx +0 -0
  195. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/cache-lab/runtime-data-suspense/page.tsx +0 -0
  196. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/cache-lab/stale-while-revalidate/page.tsx +0 -0
  197. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/cache-lab/tag-invalidation/page.tsx +0 -0
  198. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/cache-lab/use-cache-nondeterministic/page.tsx +0 -0
  199. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/favicon.ico +0 -0
  200. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/globals.css +0 -0
  201. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/layout.tsx +0 -0
  202. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/page.tsx +0 -0
  203. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/revalidation-interface.tsx +0 -0
  204. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-0-11-cache-components}/src/app/update-tag-test/page.tsx +0 -0
  205. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-0-11-cache-components}/tsconfig.json +0 -0
  206. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-2-6}/README.md +0 -0
  207. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6}/next.config.ts +0 -0
  208. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/api/cached-static-fetch/route.ts +0 -0
  209. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts +0 -0
  210. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/api/revalidatePath/route.ts +0 -0
  211. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6}/src/app/api/revalidateTag/route.ts +0 -0
  212. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/api/revalidated-fetch/route.ts +0 -0
  213. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/api/uncached-fetch/route.ts +0 -0
  214. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-2-6}/src/app/globals.css +0 -0
  215. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/layout.tsx +0 -0
  216. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-2-6}/src/app/page.tsx +0 -0
  217. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/cached-static-fetch/default--force-dynamic-page/page.tsx +0 -0
  218. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/cached-static-fetch/revalidate15--default-page/page.tsx +0 -0
  219. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/cached-static-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  220. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/no-fetch/default-page/page.tsx +0 -0
  221. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/revalidated-fetch/default--force-dynamic-page/page.tsx +0 -0
  222. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/revalidated-fetch/revalidate15--default-page/page.tsx +0 -0
  223. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/revalidated-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  224. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/uncached-fetch/default--force-dynamic-page/page.tsx +0 -0
  225. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/uncached-fetch/revalidate15--default-page/page.tsx +0 -0
  226. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6}/src/app/pages/uncached-fetch/revalidate15--force-dynamic-page/page.tsx +0 -0
  227. /package/test/{integration/next-app-16-2-3-cache-components → nextjs-test-projects/next-app-16-2-6}/src/app/revalidation-interface.tsx +0 -0
  228. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6}/src/app/update-tag-test/page.tsx +0 -0
  229. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/README.md +0 -0
  230. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/eslint.config.mjs +0 -0
  231. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/postcss.config.mjs +0 -0
  232. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6-cache-components}/public/file.svg +0 -0
  233. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6-cache-components}/public/globe.svg +0 -0
  234. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6-cache-components}/public/next.svg +0 -0
  235. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6-cache-components}/public/vercel.svg +0 -0
  236. /package/test/{integration/next-app-15-4-7 → nextjs-test-projects/next-app-16-2-6-cache-components}/public/window.svg +0 -0
  237. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/src/app/favicon.ico +0 -0
  238. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/src/app/globals.css +0 -0
  239. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/src/app/page.tsx +0 -0
  240. /package/test/{integration/next-app-16-0-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/src/app/revalidation-interface.tsx +0 -0
  241. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-16-2-6-cache-components}/tsconfig.json +0 -0
  242. /package/test/{integration/next-app-16-2-3 → nextjs-test-projects/next-app-customized}/README.md +0 -0
  243. /package/test/{integration → nextjs-test-projects}/next-app-customized/customized-cache-handler.js +0 -0
  244. /package/test/{integration/next-app-15-3-2 → nextjs-test-projects/next-app-customized}/eslint.config.mjs +0 -0
  245. /package/test/{integration → nextjs-test-projects}/next-app-customized/next.config.js +0 -0
  246. /package/{tests → test/playwright}/cache-lab.spec.ts +0 -0
@@ -0,0 +1,121 @@
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.
@@ -8,31 +8,15 @@ on:
8
8
  branches:
9
9
  - main
10
10
 
11
- # Default-deny: every job inherits read-only access. Jobs that need more
12
- # elevate explicitly via their own `permissions:` block (see `build` below).
13
11
  permissions:
14
12
  contents: read
15
13
 
16
14
  jobs:
17
- build:
15
+ lint-and-unit:
18
16
  runs-on: ubuntu-latest
19
17
  permissions:
20
- contents: read # Required for actions/checkout
21
- pull-requests: write # Required for the coverage-comments action on PRs
22
- strategy:
23
- matrix:
24
- include:
25
- - next-test-app: next-app-15-0-3
26
- run-cache-components: false
27
- - next-test-app: next-app-15-3-2
28
- run-cache-components: false
29
- - next-test-app: next-app-15-4-7
30
- run-cache-components: false
31
- - next-test-app: next-app-16-0-3
32
- run-cache-components: true
33
- - next-test-app: next-app-16-2-3
34
- run-cache-components: true
35
-
18
+ contents: read
19
+ pull-requests: write
36
20
  steps:
37
21
  - name: Checkout code
38
22
  uses: actions/checkout@v6
@@ -47,8 +31,6 @@ jobs:
47
31
  cache: 'pnpm'
48
32
 
49
33
  - name: Install dependencies
50
- # --ignore-scripts blocks lifecycle scripts of all dependencies to mitigate
51
- # supply-chain attacks via compromised postinstall hooks.
52
34
  run: pnpm install --ignore-scripts
53
35
 
54
36
  - name: Run lint
@@ -57,6 +39,51 @@ jobs:
57
39
  - name: Build project
58
40
  run: pnpm build
59
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
+ steps:
69
+ - name: Checkout code
70
+ uses: actions/checkout@v6
71
+
72
+ - name: Install pnpm
73
+ run: corepack enable
74
+
75
+ - name: Setup Node.js
76
+ uses: actions/setup-node@v6
77
+ with:
78
+ node-version: '22'
79
+ cache: 'pnpm'
80
+
81
+ - name: Install dependencies
82
+ run: pnpm install --ignore-scripts
83
+
84
+ - name: Build project
85
+ run: pnpm build
86
+
60
87
  - name: Start Redis
61
88
  uses: supercharge/redis-github-action@1.8.0
62
89
  with:
@@ -69,63 +96,119 @@ jobs:
69
96
  - name: Configure Redis Keyspace Notifications
70
97
  run: redis-cli config set notify-keyspace-events Exe
71
98
 
72
- - name: Install Integration Test Project
73
- run: cd test/integration/${{ matrix.next-test-app }} && pnpm install
99
+ - name: Install test project
100
+ run: cd test/nextjs-test-projects/${{ matrix.next-test-app }} && pnpm install
74
101
 
75
- - name: Build Integration Test Project
76
- run: cd test/integration/${{ matrix.next-test-app }} && pnpm build
102
+ - name: Build test project
103
+ run: cd test/nextjs-test-projects/${{ matrix.next-test-app }} && pnpm build
77
104
 
78
- - name: Run tests
79
- run: pnpm test:ci
105
+ - name: Run integration tests
106
+ run: pnpm test:integration
80
107
  env:
81
108
  SKIP_BUILD: true
82
109
  NEXT_TEST_APP: ${{ matrix.next-test-app }}
83
110
 
84
- - name: Install Cache Components Integration Test Project
85
- if: matrix.run-cache-components
86
- run: cd test/integration/next-app-16-2-3-cache-components && pnpm install
111
+ integration-build-id-prefix:
112
+ runs-on: ubuntu-latest
113
+ needs: lint-and-unit
114
+ steps:
115
+ - name: Checkout code
116
+ uses: actions/checkout@v6
87
117
 
88
- - name: Build Cache Components Integration Test Project
89
- if: matrix.run-cache-components
90
- run: cd test/integration/next-app-16-2-3-cache-components && pnpm build
118
+ - name: Install pnpm
119
+ run: corepack enable
91
120
 
92
- - name: Run Cache Components integration tests
93
- if: matrix.run-cache-components
94
- run: pnpm test:cache-components
121
+ - name: Setup Node.js
122
+ uses: actions/setup-node@v6
123
+ with:
124
+ node-version: '22'
125
+ cache: 'pnpm'
95
126
 
96
- - name: Run Redis kill/restart E2E test (cache-components)
97
- if: matrix.run-cache-components
98
- run: pnpm vitest --run --config vitest.cache-components.config.ts test/cache-components/redis-kill-reconnect.spec.ts
127
+ - name: Install dependencies
128
+ run: pnpm install --ignore-scripts
99
129
 
100
- - name: Install Playwright browsers
101
- if: matrix.run-cache-components
102
- run: pnpm exec playwright install --with-deps
130
+ - name: Build project
131
+ run: pnpm build
103
132
 
104
- - name: Run Playwright E2E tests
105
- if: matrix.run-cache-components
106
- run: pnpm test:e2e
107
- env:
108
- PLAYWRIGHT_BASE_URL: http://localhost:3101
133
+ - name: Start Redis
134
+ uses: supercharge/redis-github-action@1.8.0
135
+ with:
136
+ redis-version: '7'
137
+ redis-port: 6379
109
138
 
110
- - name: Code Coverage Comments
111
- if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
112
- uses: kcjpop/coverage-comments@v2.2
139
+ - name: Install redis-cli
140
+ run: sudo apt-get update && sudo apt-get install -y redis-tools
141
+
142
+ - name: Configure Redis Keyspace Notifications
143
+ run: redis-cli config set notify-keyspace-events Exe
144
+
145
+ - name: Install test project
146
+ run: cd test/nextjs-test-projects/next-app-15-4-11 && pnpm install
147
+
148
+ - name: Build test project
149
+ run: cd test/nextjs-test-projects/next-app-15-4-11 && pnpm build
150
+
151
+ - name: Run BUILD_ID prefix integration test
152
+ run: pnpm test:integration:build-id-prefix
153
+
154
+ integration-cache-components:
155
+ runs-on: ubuntu-latest
156
+ needs: lint-and-unit
157
+ strategy:
158
+ matrix:
159
+ cache-components-app:
160
+ - next-app-16-0-11-cache-components
161
+ - next-app-16-2-6-cache-components
162
+ steps:
163
+ - name: Checkout code
164
+ uses: actions/checkout@v6
165
+
166
+ - name: Install pnpm
167
+ run: corepack enable
168
+
169
+ - name: Setup Node.js
170
+ uses: actions/setup-node@v6
113
171
  with:
114
- github-token: ${{ secrets.GITHUB_TOKEN }}
115
- coverage-file: './coverage/lcov.info'
172
+ node-version: '22'
173
+ cache: 'pnpm'
116
174
 
117
- - name: Dry run the release
118
- if: github.event_name == 'pull_request'
175
+ - name: Install dependencies
176
+ run: pnpm install --ignore-scripts
177
+
178
+ - name: Build project
179
+ run: pnpm build
180
+
181
+ - name: Start Redis
182
+ uses: supercharge/redis-github-action@1.8.0
183
+ with:
184
+ redis-version: '7'
185
+ redis-port: 6379
186
+
187
+ - name: Install redis-cli
188
+ run: sudo apt-get update && sudo apt-get install -y redis-tools
189
+
190
+ - name: Configure Redis Keyspace Notifications
191
+ run: redis-cli config set notify-keyspace-events Exe
192
+
193
+ - name: Install test project
194
+ run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm install
195
+
196
+ - name: Build test project
197
+ run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm build
198
+
199
+ - name: Run cache-components integration tests
200
+ run: pnpm test:integration:cache-components
119
201
  env:
120
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for Semantic Release
121
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # NPM token for publishing
122
- run: |
123
- npx semantic-release --dry-run
202
+ CACHE_COMPONENTS_APP: ${{ matrix.cache-components-app }}
124
203
 
125
- build-id-prefix:
204
+ e2e:
126
205
  runs-on: ubuntu-latest
127
- permissions:
128
- contents: read
206
+ needs: lint-and-unit
207
+ strategy:
208
+ matrix:
209
+ cache-components-app:
210
+ - next-app-16-0-11-cache-components
211
+ - next-app-16-2-6-cache-components
129
212
  steps:
130
213
  - name: Checkout code
131
214
  uses: actions/checkout@v6
@@ -142,9 +225,6 @@ jobs:
142
225
  - name: Install dependencies
143
226
  run: pnpm install --ignore-scripts
144
227
 
145
- - name: Run lint
146
- run: pnpm lint
147
-
148
228
  - name: Build project
149
229
  run: pnpm build
150
230
 
@@ -160,11 +240,16 @@ jobs:
160
240
  - name: Configure Redis Keyspace Notifications
161
241
  run: redis-cli config set notify-keyspace-events Exe
162
242
 
163
- - name: Install Integration Test Project
164
- run: cd test/integration/next-app-15-4-7 && pnpm install
243
+ - name: Install test project
244
+ run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm install
165
245
 
166
- - name: Build Integration Test Project
167
- run: cd test/integration/next-app-15-4-7 && pnpm build
246
+ - name: Build test project
247
+ run: cd test/nextjs-test-projects/${{ matrix.cache-components-app }} && pnpm build
168
248
 
169
- - name: Run BUILD_ID integration test
170
- run: pnpm test:integration:build-id-prefix
249
+ - name: Install Playwright browsers
250
+ run: pnpm exec playwright install --with-deps
251
+
252
+ - name: Run Playwright E2E tests
253
+ run: pnpm test:e2e
254
+ env:
255
+ PLAYWRIGHT_TEST_APP: ${{ matrix.cache-components-app }}