diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..f16ab3c63 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,19 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "@headstartwp/core": "1.2.0", + "@10up/react-hooks": "1.2.3", + "@headstartwp/next": "1.2.0", + "@10up/next-redis-cache-provider": "0.2.0", + "@10up/headless-docs": "1.0.0", + "@10up/wp-multisite-i18n-nextjs": "0.2.0", + "@10up/wp-multisite-nextjs": "0.2.0", + "@10up/wp-nextjs": "0.2.0", + "@10up/wp-nextjs-ts": "0.2.1-next.2", + "@headstartwp/headstartwp": "1.0.12" + }, + "changesets": [ + "wicked-bats-lay" + ] +} diff --git a/.changeset/wicked-bats-lay.md b/.changeset/wicked-bats-lay.md new file mode 100644 index 000000000..f22081fb6 --- /dev/null +++ b/.changeset/wicked-bats-lay.md @@ -0,0 +1,5 @@ +--- +"@10up/next-redis-cache-provider": major +--- + +Suport for >= Next.js 13.5 diff --git a/.gitpod.yml b/.gitpod.yml index 5ce6be58e..e3987e386 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,6 +1,15 @@ image: file: .gitpod.Dockerfile tasks: + - name: Start Redis Stack + init: | + docker-compose pull + command: | + alias redis-cli="docker exec -it redis-stack redis-cli" + echo "Use redis-cli to interact with Redis here." + docker-compose up -d + gp sync-done finished + openMode: split-left - name: Start dev server init: npm install command: npm run dev \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..0b2ee6ae0 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.9" +services: + redis: + container_name: redis-stack + image: redis/redis-stack:latest + ports: + - "6379:6379" \ No newline at end of file diff --git a/docs/package-lock.json b/docs/package-lock.json index 404455d76..f43c3bc27 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -6431,9 +6431,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", @@ -17659,9 +17659,9 @@ } }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==" }, "fork-ts-checker-webpack-plugin": { "version": "6.5.2", diff --git a/package-lock.json b/package-lock.json index 2ff0281c6..068f17926 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4267,13 +4267,14 @@ } }, "node_modules/@next/env": { - "version": "13.4.4", - "license": "MIT" + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.0.tgz", + "integrity": "sha512-Py8zIo+02ht82brwwhTg36iogzFqGLPXlRGKQw5s+qP/kMNc4MAyDeEwBKDijk6zTIbegEgu8Qy7C1LboslQAw==" }, "node_modules/@next/swc-darwin-arm64": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.4.tgz", - "integrity": "sha512-xfjgXvp4KalNUKZMHmsFxr1Ug+aGmmO6NWP0uoh4G3WFqP/mJ1xxfww0gMOeMeSq/Jyr5k7DvoZ2Pv+XOITTtw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.0.tgz", + "integrity": "sha512-nUDn7TOGcIeyQni6lZHfzNoo9S0euXnu0jhsbMOmMJUBfgsnESdjN97kM7cBqQxZa8L/bM9om/S5/1dzCrW6wQ==", "cpu": [ "arm64" ], @@ -4286,9 +4287,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.4.tgz", - "integrity": "sha512-ZY9Ti1hkIwJsxGus3nlubIkvYyB0gNOYxKrfsOrLEqD0I2iCX8D7w8v6QQZ2H+dDl6UT29oeEUdDUNGk4UEpfg==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.0.tgz", + "integrity": "sha512-1jgudN5haWxiAl3O1ljUS2GfupPmcftu2RYJqZiMJmmbBT5M1XDffjUtRUzP4W3cBHsrvkfOFdQ71hAreNQP6g==", "cpu": [ "x64" ], @@ -4301,9 +4302,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.4.tgz", - "integrity": "sha512-+KZnDeMShYkpkqAvGCEDeqYTRADJXc6SY1jWXz+Uo6qWQO/Jd9CoyhTJwRSxvQA16MoYzvILkGaDqirkRNctyA==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.0.tgz", + "integrity": "sha512-RHo7Tcj+jllXUbK7xk2NyIDod3YcCPDZxj1WLIYxd709BQ7WuRYl3OWUNG+WUfqeQBds6kvZYlc42NJJTNi4tQ==", "cpu": [ "arm64" ], @@ -4316,9 +4317,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.4.tgz", - "integrity": "sha512-evC1twrny2XDT4uOftoubZvW3EG0zs0ZxMwEtu/dDGVRO5n5pT48S8qqEIBGBUZYu/Xx4zzpOkIxx1vpWdE+9A==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.0.tgz", + "integrity": "sha512-v6kP8sHYxjO8RwHmWMJSq7VZP2nYCkRVQ0qolh2l6xroe9QjbgV8siTbduED4u0hlk0+tjS6/Tuy4n5XCp+l6g==", "cpu": [ "arm64" ], @@ -4331,11 +4332,12 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.4.4", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.0.tgz", + "integrity": "sha512-zJ2pnoFYB1F4vmEVlb/eSe+VH679zT1VdXlZKX+pE66grOgjmKJHKacf82g/sWE4MQ4Rk2FMBCRnX+l6/TVYzQ==", "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -4345,11 +4347,12 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "13.4.4", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.0.tgz", + "integrity": "sha512-rbaIYFt2X9YZBSbH/CwGAjbBG2/MrACCVu2X0+kSykHzHnYH5FjHxwXLkcoJ10cX0aWCEynpu+rP76x0914atg==", "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -4359,9 +4362,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.4.tgz", - "integrity": "sha512-FP8AadgSq4+HPtim7WBkCMGbhr5vh9FePXiWx9+YOdjwdQocwoCK5ZVC3OW8oh3TWth6iJ0AXJ/yQ1q1cwSZ3A==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.0.tgz", + "integrity": "sha512-o1N5TsYc8f/HpGt39OUQpQ9AKIGApd3QLueu7hXk//2xq5Z9OxmV6sQfNp8C7qYmiOlHYODOGqNNa0e9jvchGQ==", "cpu": [ "arm64" ], @@ -4374,9 +4377,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.4.tgz", - "integrity": "sha512-3WekVmtuA2MCdcAOrgrI+PuFiFURtSyyrN1I3UPtS0ckR2HtLqyqmS334Eulf15g1/bdwMteePdK363X/Y9JMg==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.0.tgz", + "integrity": "sha512-XXIuB1DBRCFwNO6EEzCTMHT5pauwaSj4SWs7CYnME57eaReAKBXCnkUE80p/pAZcewm7hs+vGvNqDPacEXHVkw==", "cpu": [ "ia32" ], @@ -4389,9 +4392,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.4.4", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.4.tgz", - "integrity": "sha512-AHRITu/CrlQ+qzoqQtEMfaTu7GHaQ6bziQln/pVWpOYC1wU+Mq6VQQFlsDtMCnDztPZtppAXdvvbNS7pcfRzlw==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.0.tgz", + "integrity": "sha512-9WEbVRRAqJ3YFVqEZIxUqkiO8l1nool1LmNxygr5HWF8AcSYsEpneUDhmjUVJEzO2A04+oPtZdombzzPPkTtgg==", "cpu": [ "x64" ], @@ -4499,8 +4502,9 @@ } }, "node_modules/@swc/helpers": { - "version": "0.5.1", - "license": "Apache-2.0", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", + "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", "dependencies": { "tslib": "^2.4.0" } @@ -7128,7 +7132,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001482", + "version": "1.0.30001579", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", + "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", "funding": [ { "type": "opencollective", @@ -7142,8 +7148,7 @@ "type": "github", "url": "https://github.com/sponsors/ai" } - ], - "license": "CC-BY-4.0" + ] }, "node_modules/capital-case": { "version": "1.0.4", @@ -15621,14 +15626,15 @@ "license": "ISC" }, "node_modules/nanoid": { - "version": "3.3.6", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -15679,37 +15685,37 @@ "license": "MIT" }, "node_modules/next": { - "version": "13.4.4", - "license": "MIT", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/next/-/next-14.1.0.tgz", + "integrity": "sha512-wlzrsbfeSU48YQBjZhDzOwhWhGsy+uQycR8bHAOt1LY1bn3zZEcDyHQOEoN3aWzQ8LHCAJ1nqrWCc9XF2+O45Q==", "dependencies": { - "@next/env": "13.4.4", - "@swc/helpers": "0.5.1", + "@next/env": "14.1.0", + "@swc/helpers": "0.5.2", "busboy": "1.6.0", - "caniuse-lite": "^1.0.30001406", - "postcss": "8.4.14", - "styled-jsx": "5.1.1", - "zod": "3.21.4" + "caniuse-lite": "^1.0.30001579", + "graceful-fs": "^4.2.11", + "postcss": "8.4.31", + "styled-jsx": "5.1.1" }, "bin": { "next": "dist/bin/next" }, "engines": { - "node": ">=16.8.0" + "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "13.4.4", - "@next/swc-darwin-x64": "13.4.4", - "@next/swc-linux-arm64-gnu": "13.4.4", - "@next/swc-linux-arm64-musl": "13.4.4", - "@next/swc-linux-x64-gnu": "13.4.4", - "@next/swc-linux-x64-musl": "13.4.4", - "@next/swc-win32-arm64-msvc": "13.4.4", - "@next/swc-win32-ia32-msvc": "13.4.4", - "@next/swc-win32-x64-msvc": "13.4.4" + "@next/swc-darwin-arm64": "14.1.0", + "@next/swc-darwin-x64": "14.1.0", + "@next/swc-linux-arm64-gnu": "14.1.0", + "@next/swc-linux-arm64-musl": "14.1.0", + "@next/swc-linux-x64-gnu": "14.1.0", + "@next/swc-linux-x64-musl": "14.1.0", + "@next/swc-win32-arm64-msvc": "14.1.0", + "@next/swc-win32-ia32-msvc": "14.1.0", + "@next/swc-win32-x64-msvc": "14.1.0" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", - "fibers": ">= 3.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" @@ -15718,9 +15724,6 @@ "@opentelemetry/api": { "optional": true }, - "fibers": { - "optional": true - }, "sass": { "optional": true } @@ -17078,7 +17081,9 @@ } }, "node_modules/postcss": { - "version": "8.4.14", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "funding": [ { "type": "opencollective", @@ -17087,11 +17092,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -18729,7 +18737,8 @@ }, "node_modules/source-map-js": { "version": "1.0.2", - "license": "BSD-3-Clause", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "engines": { "node": ">=0.10.0" } @@ -21473,13 +21482,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/zod": { - "version": "3.21.4", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "packages/core": { "name": "@headstartwp/core", "version": "1.2.0", @@ -22047,7 +22049,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", @@ -22076,7 +22078,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", @@ -22106,7 +22108,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", @@ -22135,7 +22137,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", diff --git a/packages/next-redis-cache-provider/CHANGELOG.md b/packages/next-redis-cache-provider/CHANGELOG.md index ee42698ca..0169f7e18 100644 --- a/packages/next-redis-cache-provider/CHANGELOG.md +++ b/packages/next-redis-cache-provider/CHANGELOG.md @@ -1,5 +1,11 @@ # @10up/next-redis-cache-provider +## 1.0.0-next.0 + +### Major Changes + +- 6956fbb8: Suport for >= Next.js 13.5 + ## 0.2.0 ### Minor Changes diff --git a/packages/next-redis-cache-provider/package.json b/packages/next-redis-cache-provider/package.json index 3a7e3b840..8e406775e 100644 --- a/packages/next-redis-cache-provider/package.json +++ b/packages/next-redis-cache-provider/package.json @@ -1,6 +1,6 @@ { "name": "@10up/next-redis-cache-provider", - "version": "0.2.0", + "version": "1.0.0-next.0", "description": "Redis cache provider for Next.js", "homepage": "https://github.com/10up/headstartwp/blob/develop/packages/next-redis-cache-provider/README.md", "license": "MIT", diff --git a/packages/next-redis-cache-provider/src/index.ts b/packages/next-redis-cache-provider/src/index.ts index 901c8805a..1a8671fe5 100644 --- a/packages/next-redis-cache-provider/src/index.ts +++ b/packages/next-redis-cache-provider/src/index.ts @@ -2,8 +2,8 @@ import { CacheHandler, CacheHandlerContext, CacheHandlerValue, + IncrementalCache, } from 'next/dist/server/lib/incremental-cache'; -import { IncrementalCacheValue } from 'next/dist/server/response-cache'; import Redis from 'ioredis'; import { CacheFs } from 'next/dist/shared/lib/utils'; import path from 'path'; @@ -87,6 +87,8 @@ export default class RedisCache implements CacheHandler { this.redisClient = this.getRedisClient(); } + resetRequestCache(): void {} + /** * Builds a Redis Client based on the environment variables * @@ -129,8 +131,11 @@ export default class RedisCache implements CacheHandler { } } - public async get(key: string, fetchCache?: boolean): Promise { - if (fetchCache) { + public async get( + ...args: Parameters + ): Promise { + const [key, ctx] = args; + if (ctx?.fetchIdx || ctx?.fetchUrl) { return null; } @@ -152,12 +157,10 @@ export default class RedisCache implements CacheHandler { return JSON.parse(value) as CacheHandlerValue; } - public async set( - key: string, - data: IncrementalCacheValue | null, - fetchCache?: boolean, - ): Promise { - if (!this.flushToDisk || !data || fetchCache) return; + public async set(...args: Parameters): Promise { + const [key, data, ctx] = args; + + if (!this.flushToDisk || !data || ctx.fetchCache) return; // get build id and connect to redis const [BUILD_ID] = await Promise.all([ diff --git a/projects/wp-multisite-i18n-nextjs/package.json b/projects/wp-multisite-i18n-nextjs/package.json index 7aaf6d7ea..26fb6a659 100644 --- a/projects/wp-multisite-i18n-nextjs/package.json +++ b/projects/wp-multisite-i18n-nextjs/package.json @@ -22,7 +22,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", diff --git a/projects/wp-multisite-nextjs/package.json b/projects/wp-multisite-nextjs/package.json index ae24d90ea..ee88038d3 100644 --- a/projects/wp-multisite-nextjs/package.json +++ b/projects/wp-multisite-nextjs/package.json @@ -22,7 +22,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", diff --git a/projects/wp-nextjs-ts/package.json b/projects/wp-nextjs-ts/package.json index 4e791b48a..f289f202a 100644 --- a/projects/wp-nextjs-ts/package.json +++ b/projects/wp-nextjs-ts/package.json @@ -22,7 +22,7 @@ "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0", diff --git a/projects/wp-nextjs/next.config.js b/projects/wp-nextjs/next.config.js index 409473160..a1a9f944c 100644 --- a/projects/wp-nextjs/next.config.js +++ b/projects/wp-nextjs/next.config.js @@ -32,8 +32,6 @@ if (process.env.NEXT_REDIS_URL || process.env.VIP_REDIS_PRIMARY) { // eslint-disable-next-line global-require const { initRedisClient } = require('@10up/next-redis-cache-provider'); initRedisClient(); - nextConfig.experimental = { - incrementalCacheHandlerPath: require.resolve('@10up/next-redis-cache-provider'), - }; + nextConfig.cacheHandler = require.resolve('@10up/next-redis-cache-provider'); } module.exports = withBundleAnalyzer(withHeadstartWPConfig(nextConfig)); diff --git a/projects/wp-nextjs/package.json b/projects/wp-nextjs/package.json index 9488b4c85..beb3b7022 100644 --- a/projects/wp-nextjs/package.json +++ b/projects/wp-nextjs/package.json @@ -16,14 +16,14 @@ "dependencies": { "@headstartwp/core": "^1.2.0", "@headstartwp/next": "^1.2.0", - "@10up/next-redis-cache-provider": "^0.2.0", + "@10up/next-redis-cache-provider": "^1.0.0-next.0", "@linaria/babel-preset": "^4.4.5", "@linaria/core": "^4.2.10", "@linaria/react": "^4.3.8", "@linaria/shaker": "^4.2.11", "@linaria/webpack-loader": "^4.1.17", "clsx": "^1.1.1", - "next": "^13.4.4", + "next": "^14.1.0", "nprogress": "^0.2.0", "prop-types": "^15.7.2", "react": "^18.2.0",