Skip to content

Commit e01d0c0

Browse files
committed
fix: Migrate to next 15
- Update next to version 15 - Update payload to latest beta version - Update next-auth to latest beta version - Await headers and cookies (#3)
1 parent 094a0fc commit e01d0c0

File tree

10 files changed

+351
-635
lines changed

10 files changed

+351
-635
lines changed

dev/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { SignInWithAuthjsButton as SignInWithAuthjsButton_0 } from 'payload-authjs/components'
1+
import { SignInWithAuthjsButton as SignInWithAuthjsButton_06d0cb594d8f6ba2ac35015f930c882e } from 'payload-authjs/components'
22

33
export const importMap = {
4-
"payload-authjs/components#SignInWithAuthjsButton": SignInWithAuthjsButton_0
4+
"payload-authjs/components#SignInWithAuthjsButton": SignInWithAuthjsButton_06d0cb594d8f6ba2ac35015f930c882e
55
}

dev/src/payload-types.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export interface Config {
1111
users: UserAuthOperations;
1212
};
1313
collections: {
14-
examples: Example;
1514
users: User;
15+
examples: Example;
1616
'payload-locked-documents': PayloadLockedDocument;
1717
'payload-preferences': PayloadPreference;
1818
'payload-migrations': PayloadMigration;
@@ -44,16 +44,6 @@ export interface UserAuthOperations {
4444
password: string;
4545
};
4646
}
47-
/**
48-
* This interface was referenced by `Config`'s JSON-Schema
49-
* via the `definition` "examples".
50-
*/
51-
export interface Example {
52-
id: number;
53-
someField?: string | null;
54-
updatedAt: string;
55-
createdAt: string;
56-
}
5747
/**
5848
* This interface was referenced by `Config`'s JSON-Schema
5949
* via the `definition` "users".
@@ -90,20 +80,30 @@ export interface User {
9080
updatedAt: string;
9181
createdAt: string;
9282
}
83+
/**
84+
* This interface was referenced by `Config`'s JSON-Schema
85+
* via the `definition` "examples".
86+
*/
87+
export interface Example {
88+
id: number;
89+
someField?: string | null;
90+
updatedAt: string;
91+
createdAt: string;
92+
}
9393
/**
9494
* This interface was referenced by `Config`'s JSON-Schema
9595
* via the `definition` "payload-locked-documents".
9696
*/
9797
export interface PayloadLockedDocument {
9898
id: number;
9999
document?:
100-
| ({
101-
relationTo: 'examples';
102-
value: number | Example;
103-
} | null)
104100
| ({
105101
relationTo: 'users';
106102
value: string | User;
103+
} | null)
104+
| ({
105+
relationTo: 'examples';
106+
value: number | Example;
107107
} | null);
108108
globalSlug?: string | null;
109109
user: {

dev/src/payload.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default buildConfig({
1818
baseDir: path.resolve(dirname),
1919
},
2020
},
21-
collections: [Examples, Users],
21+
collections: [Users, Examples],
2222
secret: process.env.PAYLOAD_SECRET || "",
2323
typescript: {
2424
outputFile: path.resolve(dirname, "payload-types.ts"),
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,28 @@
5050
"author": "[email protected]",
5151
"license": "MIT",
5252
"peerDependencies": {
53-
"@payloadcms/next": "^3.0.0-beta.111",
54-
"@payloadcms/ui": "^3.0.0-beta.111",
55-
"next": "^15.0.0-canary.173",
56-
"next-auth": "^5.0.0-beta.22",
57-
"payload": "^3.0.0-beta.111"
53+
"@payloadcms/next": "^3.0.0-beta.120",
54+
"@payloadcms/ui": "^3.0.0-beta.120",
55+
"next": "^15.0.0",
56+
"next-auth": "^5.0.0-beta.25",
57+
"payload": "^3.0.0-beta.120"
5858
},
5959
"devDependencies": {
6060
"@nx/eslint": "19.7.2",
6161
"@nx/jest": "19.7.2",
6262
"@nx/js": "19.7.2",
6363
"@nx/next": "19.7.2",
64-
"@payloadcms/db-postgres": "3.0.0-beta.111",
64+
"@payloadcms/db-postgres": "3.0.0-beta.120",
6565
"@payloadcms/eslint-config": "^1",
66-
"@payloadcms/next": "3.0.0-beta.111",
67-
"@payloadcms/ui": "3.0.0-beta.111",
66+
"@payloadcms/next": "3.0.0-beta.120",
67+
"@payloadcms/ui": "3.0.0-beta.120",
6868
"@swc-node/register": "~1.10.9",
6969
"@swc/core": "~1.7.26",
7070
"@swc/helpers": "~0.5.13",
7171
"@swc/jest": "^0.2.36",
7272
"@types/jest": "^29.5.12",
7373
"@types/jsonwebtoken": "^9.0.6",
74-
"@types/react": "^18.3.5",
74+
"@types/react": "npm:[email protected]",
7575
"@typescript-eslint/eslint-plugin": "8.3.0",
7676
"@typescript-eslint/parser": "8.3.0",
7777
"cross-env": "^7.0.3",
@@ -83,20 +83,25 @@
8383
"eslint-plugin-prettier": "^5.2.1",
8484
"jest": "^29.7.0",
8585
"jsonwebtoken": "^9.0.2",
86-
"next": "^15.0.0-canary.173",
87-
"next-auth": "5.0.0-beta.22",
86+
"next": "15.0.2",
87+
"next-auth": "5.0.0-beta.25",
8888
"nodemailer": "^6.9.15",
8989
"nx": "19.7.2",
90-
"payload": "3.0.0-beta.111",
90+
"payload": "3.0.0-beta.120",
9191
"prettier": "^3.3.3",
92-
"react": "19.0.0-rc-3edc000d-20240926",
93-
"react-dom": "19.0.0-rc-3edc000d-20240926",
92+
"react": "19.0.0-rc-02c0e824-20241028",
93+
"react-dom": "19.0.0-rc-02c0e824-20241028",
9494
"sharp": "^0.33.5",
9595
"typescript": "^5.6.2"
9696
},
9797
"nx": {},
9898
"dependencies": {
99-
"@auth/core": "^0.34.2"
99+
"@auth/core": "^0.37.2"
100100
},
101-
"packageManager": "[email protected]"
101+
"packageManager": "[email protected]",
102+
"pnpm": {
103+
"overrides": {
104+
"@types/react": "npm:[email protected]"
105+
}
106+
}
102107
}

0 commit comments

Comments
 (0)