@se-studio/ab-testing 17.0.7 → 18.0.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @se-studio/ab-testing
2
2
 
3
+ ## 18.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8e94be2: Support Next.js 16.3 while remaining compatible with Next.js 15.5 (peer `>=15.5.0 <17`). CMS webhooks call `revalidateTag(tag, { expire: 0 })` so published content is not served stale. Template apps use `proxy.ts` on Next 16. Not-found metadata uses `title.absolute` so layout `title.template` does not produce duplicated site names.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [8e94be2]
12
+ - @se-studio/core-ui@1.25.0
13
+
3
14
  ## 17.0.7
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -127,7 +127,7 @@ export function getAbTestStore(): IBlobStore<AbTest> {
127
127
  ### 2. Set Up the Middleware
128
128
 
129
129
  ```typescript
130
- // src/middleware.ts
130
+ // src/proxy.ts (Next 16) or src/middleware.ts (Next 15)
131
131
  import { createAbTestMiddleware } from '@se-studio/ab-testing/middleware';
132
132
  import { getAbTestStore } from './server/abTestStore';
133
133
  import { NextResponse } from 'next/server';
@@ -138,7 +138,7 @@ const abTestHandler = createAbTestMiddleware({
138
138
  cacheTtlMs: 60000, // 60 second cache
139
139
  });
140
140
 
141
- export async function middleware(request: NextRequest) {
141
+ export async function proxy(request: NextRequest) {
142
142
  // Skip static assets, API routes, etc.
143
143
  if (request.nextUrl.pathname.startsWith('/_next') ||
144
144
  request.nextUrl.pathname.startsWith('/api')) {
@@ -186,7 +186,7 @@ export const POST = createWebhookHandler({
186
186
  fetchPageTests,
187
187
  getStore: getAbTestStore,
188
188
  webhookSecret: process.env.CONTENTFUL_WEBHOOK_SECRET,
189
- revalidate: () => revalidateTag('PageTests'),
189
+ revalidate: () => revalidateTag('PageTests', { expire: 0 }),
190
190
  });
191
191
  ```
192
192
 
package/docs/llms.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @se-studio/ab-testing — LLM Reference
2
2
 
3
- Server-side A/B testing framework for Next.js App Router with Contentful CMS. Variants are assigned via cookies; decisions happen in Next.js middleware.
3
+ Server-side A/B testing framework for Next.js App Router with Contentful CMS. Variants are assigned via cookies; decisions happen in Next.js `proxy` (Next 16) or `middleware` (Next 15). Call `createAbTestMiddleware` / `createStaticAbTestMiddleware` from either file — the factory API is unchanged.
4
4
 
5
5
  ## Core Concepts
6
6
 
@@ -24,7 +24,7 @@ import type {
24
24
  ## Middleware Setup
25
25
 
26
26
  ```ts
27
- // middleware.ts
27
+ // src/proxy.ts (Next 16) or src/middleware.ts (Next 15)
28
28
  import { createAbTestMiddleware } from '@se-studio/ab-testing';
29
29
 
30
30
  const abTestMiddleware = createAbTestMiddleware({
@@ -33,7 +33,7 @@ const abTestMiddleware = createAbTestMiddleware({
33
33
  cookieMaxAge: 60 * 60 * 24 * 30, // optional, default: DEFAULT_COOKIE_MAX_AGE
34
34
  });
35
35
 
36
- export async function middleware(request: NextRequest) {
36
+ export async function proxy(request: NextRequest) {
37
37
  return abTestMiddleware(request);
38
38
  }
39
39
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/ab-testing",
3
- "version": "17.0.7",
3
+ "version": "18.0.0",
4
4
  "description": "Server-side A/B testing framework for Next.js applications with Contentful CMS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,18 +67,18 @@
67
67
  "url": "https://github.com/Something-Else-Studio/se-core-product/issues"
68
68
  },
69
69
  "peerDependencies": {
70
- "next": ">=15.5.0 <16",
70
+ "next": ">=15.5.0 <17",
71
71
  "react": "^19.0.0",
72
- "@se-studio/core-ui": "1.24.7"
72
+ "@se-studio/core-ui": "1.25.0"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@biomejs/biome": "^2.5.5",
76
76
  "@types/node": "^24.13.3",
77
77
  "@types/react": "^19.2.17",
78
- "next": "^15.5.21",
78
+ "next": "^16.3.1",
79
79
  "typescript": "^6.0.3",
80
80
  "vitest": "^4.1.10",
81
- "@se-studio/core-ui": "1.24.7"
81
+ "@se-studio/core-ui": "1.25.0"
82
82
  },
83
83
  "scripts": {
84
84
  "build": "tsc --project tsconfig.build.json",