Next.js 15 Update (#26)

* Update Next.js and React versions in all packages
* Replace onRedirect function with next/link in BillingSessionStatus, since it's no longer cached by default
* Remove unused revalidatePath import in billing return page, since it's no longer cached by default
* Add Turbopack module aliases to improve development server speed
* Converted new Dynamic APIs to be Promise-based
* Adjust mobile layout
* Use ENABLE_REACT_COMPILER to enable the React Compiler in Next.js 15
* Report Errors using the new onRequestError hook
This commit is contained in:
Giancarlo Buomprisco
2024-10-22 08:39:21 +02:00
committed by GitHub
parent 93cb011260
commit 5b9285a575
109 changed files with 5143 additions and 5545 deletions

View File

@@ -19,7 +19,7 @@
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/wordpress": "workspace:^",
"@types/node": "^22.5.5"
"@types/node": "^22.7.8"
},
"eslintConfig": {
"root": true,

View File

@@ -16,7 +16,7 @@
"./route-handler": "./src/keystatic-route-handler.ts"
},
"dependencies": {
"@keystatic/core": "0.5.33",
"@keystatic/core": "0.5.38",
"@keystatic/next": "^5.0.1",
"@markdoc/markdoc": "^0.4.0"
},
@@ -26,9 +26,9 @@
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:^",
"@types/node": "^22.5.5",
"@types/react": "^18.3.10",
"react": "18.3.1",
"@types/node": "^22.7.8",
"@types/react": "^18.3.11",
"react": "19.0.0-rc-69d4b800-20241021",
"zod": "^3.23.8"
},
"eslintConfig": {

View File

@@ -1 +1 @@
export * from './create-keystatic-cms';
export * from './create-keystatic-cms';

View File

@@ -11,19 +11,21 @@ type ZodOutputFor<T> = z.ZodType<T, z.ZodTypeDef, unknown>;
* The previous environment variable `KEYSTATIC_STORAGE_KIND` is deprecated - as Keystatic may need this to be available in the client-side.
*
*/
const STORAGE_KIND = process.env.NEXT_PUBLIC_KEYSTATIC_STORAGE_KIND ??
/* @deprecated */
process.env.KEYSTATIC_STORAGE_KIND ??
'local';
const STORAGE_KIND =
process.env.NEXT_PUBLIC_KEYSTATIC_STORAGE_KIND ??
/* @deprecated */
process.env.KEYSTATIC_STORAGE_KIND ??
'local';
/**
* @name REPO
* @description The repository to use for the GitHub storage.
* This can be provided through the `NEXT_PUBLIC_KEYSTATIC_STORAGE_REPO` environment variable. The previous environment variable `KEYSTATIC_STORAGE_REPO` is deprecated.
*/
const REPO = process.env.NEXT_PUBLIC_KEYSTATIC_STORAGE_REPO ??
/* @deprecated */
process.env.KEYSTATIC_STORAGE_REPO;
const REPO =
process.env.NEXT_PUBLIC_KEYSTATIC_STORAGE_REPO ??
/* @deprecated */
process.env.KEYSTATIC_STORAGE_REPO;
const BRANCH_PREFIX = process.env.KEYSTATIC_STORAGE_BRANCH_PREFIX;
const PATH_PREFIX = process.env.KEYSTATIC_PATH_PREFIX;
@@ -43,9 +45,11 @@ const local = z.object({
*/
const cloud = z.object({
kind: z.literal('cloud'),
project: z.string({
description: `The Keystatic Cloud project. Please provide the value through the "KEYSTATIC_STORAGE_PROJECT" environment variable.`,
}).min(1),
project: z
.string({
description: `The Keystatic Cloud project. Please provide the value through the "KEYSTATIC_STORAGE_PROJECT" environment variable.`,
})
.min(1),
branchPrefix: z.string().optional(),
pathPrefix: z.string().optional(),
}) satisfies ZodOutputFor<CloudConfig['storage']>;
@@ -72,4 +76,4 @@ export const KeystaticStorage = z.union([local, cloud, github]).parse({
repo: REPO,
branchPrefix: BRANCH_PREFIX,
pathPrefix: PATH_PREFIX,
});
});

View File

@@ -1,2 +1,2 @@
export * from './cms-client';
export * from './cms.type';
export * from './cms.type';

View File

@@ -20,8 +20,8 @@
"@kit/prettier-config": "workspace:*",
"@kit/tsconfig": "workspace:*",
"@kit/ui": "workspace:^",
"@types/node": "^22.5.5",
"@types/react": "^18.3.10",
"@types/node": "^22.7.8",
"@types/react": "^18.3.11",
"wp-types": "^4.66.1"
},
"eslintConfig": {

View File

@@ -1 +1 @@
export * from './wp-client';
export * from './wp-client';