feat!: upgrade next, react and react-dom, move react/next dependency checker from payload to next package (#8323)

Fixes https://github.com/payloadcms/payload/issues/8013

**BREAKING:**
- Upgrades minimum supported @types/react version from
npm:types-react@19.0.0-rc.0 to npm:types-react@19.0.0-rc.1
- Upgrades minimum supported @types/react-dom version from
npm:types-react-dom@19.0.0-rc.0 to npm:types-react-dom@19.0.0-rc.1
- Upgrades minimum supported react and react-dom version from
19.0.0-rc-06d0b89e-20240801 to 19.0.0-rc-5dcb0097-20240918
- Upgrades minimum supported Next.js version from 15.0.0-canary.104 to
15.0.0-canary.160

---------

Co-authored-by: PatrikKozak <patrik@payloadcms.com>
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
This commit is contained in:
Alessio Gravili
2024-09-20 12:09:42 -04:00
committed by GitHub
parent d3b982f38d
commit 1afcaa30ed
42 changed files with 848 additions and 10860 deletions

View File

@@ -23,10 +23,10 @@
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"graphql": "^16.9.0", "graphql": "^16.9.0",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "3.0.0-beta.106", "payload": "3.0.0-beta.106",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801" "react-dom": "19.0.0-rc-5dcb0097-20240918"
}, },
"devDependencies": { "devDependencies": {
"@payloadcms/graphql": "3.0.0-beta.106", "@payloadcms/graphql": "3.0.0-beta.106",

2
next-env.d.ts vendored
View File

@@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information. // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

View File

@@ -103,7 +103,7 @@
"devDependencies": { "devDependencies": {
"@jest/globals": "29.7.0", "@jest/globals": "29.7.0",
"@libsql/client": "0.6.2", "@libsql/client": "0.6.2",
"@next/bundle-analyzer": "15.0.0-canary.104", "@next/bundle-analyzer": "15.0.0-canary.160",
"@payloadcms/db-postgres": "workspace:*", "@payloadcms/db-postgres": "workspace:*",
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@payloadcms/eslint-plugin": "workspace:*", "@payloadcms/eslint-plugin": "workspace:*",
@@ -117,8 +117,8 @@
"@types/minimist": "1.2.5", "@types/minimist": "1.2.5",
"@types/node": "22.5.4", "@types/node": "22.5.4",
"@types/prompts": "^2.4.5", "@types/prompts": "^2.4.5",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/semver": "^7.5.3", "@types/semver": "^7.5.3",
"@types/shelljs": "0.8.15", "@types/shelljs": "0.8.15",
"chalk": "^4.1.2", "chalk": "^4.1.2",
@@ -141,15 +141,15 @@
"lint-staged": "15.2.7", "lint-staged": "15.2.7",
"minimist": "1.2.8", "minimist": "1.2.8",
"mongodb-memory-server": "^9.0", "mongodb-memory-server": "^9.0",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"open": "^10.1.0", "open": "^10.1.0",
"p-limit": "^5.0.0", "p-limit": "^5.0.0",
"playwright": "1.46.0", "playwright": "1.46.0",
"playwright-core": "1.46.0", "playwright-core": "1.46.0",
"prettier": "3.3.3", "prettier": "3.3.3",
"prompts": "2.4.2", "prompts": "2.4.2",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"semver": "^7.5.4", "semver": "^7.5.4",
"sharp": "0.32.6", "sharp": "0.32.6",
@@ -163,8 +163,8 @@
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"packageManager": "pnpm@9.7.1", "packageManager": "pnpm@9.7.1",
"engines": { "engines": {
@@ -177,8 +177,8 @@
"domexception": "4" "domexception": "4"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"copyfiles": "$copyfiles", "copyfiles": "$copyfiles",
"cross-env": "$cross-env", "cross-env": "$cross-env",
"dotenv": "$dotenv", "dotenv": "$dotenv",
@@ -191,8 +191,8 @@
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
}, },
"workspaces:": [ "workspaces:": [
"packages/*", "packages/*",

View File

@@ -38,13 +38,13 @@
}, },
"devDependencies": { "devDependencies": {
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"publishConfig": { "publishConfig": {
"exports": { "exports": {
@@ -59,7 +59,7 @@
"types": "./dist/index.d.ts" "types": "./dist/index.d.ts"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -64,6 +64,14 @@
"lint:fix": "eslint . --fix", "lint:fix": "eslint . --fix",
"prepublishOnly": "pnpm clean && pnpm turbo build" "prepublishOnly": "pnpm clean && pnpm turbo build"
}, },
"lint-staged": {
"**/package.json": "sort-package-json",
"*.{md,mdx,yml,json}": "prettier --write",
"*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint --cache --fix"
]
},
"dependencies": { "dependencies": {
"@dnd-kit/core": "6.0.8", "@dnd-kit/core": "6.0.8",
"@payloadcms/graphql": "workspace:*", "@payloadcms/graphql": "workspace:*",
@@ -88,23 +96,23 @@
"@babel/preset-env": "^7.24.5", "@babel/preset-env": "^7.24.5",
"@babel/preset-react": "^7.24.1", "@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1", "@babel/preset-typescript": "^7.24.1",
"@next/eslint-plugin-next": "15.0.0-canary.104", "@next/eslint-plugin-next": "15.0.0-canary.160",
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/busboy": "1.5.4", "@types/busboy": "1.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/uuid": "10.0.0", "@types/uuid": "10.0.0",
"@types/ws": "^8.5.10", "@types/ws": "^8.5.10",
"babel-plugin-react-compiler": "0.0.0-experimental-48eb8f4-20240822", "babel-plugin-react-compiler": "0.0.0-experimental-24ec0eb-20240918",
"esbuild": "0.23.1", "esbuild": "0.23.1",
"esbuild-sass-plugin": "3.3.1", "esbuild-sass-plugin": "3.3.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-72f06b2-20240822", "eslint-plugin-react-compiler": "0.0.0-experimental-7670337-20240918",
"payload": "workspace:*", "payload": "workspace:*",
"swc-plugin-transform-remove-imports": "1.15.0" "swc-plugin-transform-remove-imports": "1.15.0"
}, },
"peerDependencies": { "peerDependencies": {
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "^15.0.0-canary.104", "next": "^15.0.0-canary.160",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"engines": { "engines": {
@@ -152,7 +160,7 @@
"types": "./dist/index.js" "types": "./dist/index.js"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -1,12 +1,12 @@
import type { AcceptedLanguages } from '@payloadcms/translations' import type { AcceptedLanguages } from '@payloadcms/translations'
import type { ImportMap, SanitizedConfig } from 'payload' import type { CustomVersionParser, ImportMap, SanitizedConfig } from 'payload'
import { rtlLanguages } from '@payloadcms/translations' import { rtlLanguages } from '@payloadcms/translations'
import { RootProvider } from '@payloadcms/ui' import { RootProvider } from '@payloadcms/ui'
import '@payloadcms/ui/scss/app.scss' import '@payloadcms/ui/scss/app.scss'
import { createClientConfig } from '@payloadcms/ui/utilities/createClientConfig' import { createClientConfig } from '@payloadcms/ui/utilities/createClientConfig'
import { headers as getHeaders, cookies as nextCookies } from 'next/headers.js' import { headers as getHeaders, cookies as nextCookies } from 'next/headers.js'
import { parseCookies } from 'payload' import { checkDependencies, parseCookies } from 'payload'
import React from 'react' import React from 'react'
import { getPayloadHMR } from '../../utilities/getPayloadHMR.js' import { getPayloadHMR } from '../../utilities/getPayloadHMR.js'
@@ -21,6 +21,23 @@ export const metadata = {
title: 'Next.js', title: 'Next.js',
} }
const customReactVersionParser: CustomVersionParser = (version) => {
const [mainVersion, ...preReleases] = version.split('-')
if (preReleases?.length === 3) {
// Needs different handling, as it's in a format like 19.0.0-rc-06d0b89e-20240801 format
const date = preReleases[2]
const parts = mainVersion.split('.').map(Number)
return { parts, preReleases: [date] }
}
const parts = mainVersion.split('.').map(Number)
return { parts, preReleases }
}
let checkedDependencies = false
export const RootLayout = async ({ export const RootLayout = async ({
children, children,
config: configPromise, config: configPromise,
@@ -30,6 +47,41 @@ export const RootLayout = async ({
readonly config: Promise<SanitizedConfig> readonly config: Promise<SanitizedConfig>
readonly importMap: ImportMap readonly importMap: ImportMap
}) => { }) => {
if (
process.env.NODE_ENV !== 'production' &&
process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&
!checkedDependencies
) {
// eslint-disable-next-line react-compiler/react-compiler
checkedDependencies = true
// First check if there are mismatching dependency versions of next / react packages
await checkDependencies({
dependencyGroups: [
{
name: 'react',
dependencies: ['react', 'react-dom'],
targetVersionDependency: 'react',
},
],
dependencyVersions: {
next: {
required: false,
version: '>=15.0.0-canary.160',
},
react: {
customVersionParser: customReactVersionParser,
required: false,
version: '>=19.0.0-rc-5dcb0097-20240918',
},
'react-dom': {
customVersionParser: customReactVersionParser,
required: false,
version: '>=19.0.0-rc-5dcb0097-20240918',
},
},
})
}
const config = await configPromise const config = await configPromise
const headers = getHeaders() const headers = getHeaders()

View File

@@ -49,7 +49,7 @@ export const getDocumentData = async (args: {
} catch (error) { } catch (error) {
console.error('Error getting document data', error) // eslint-disable-line no-console console.error('Error getting document data', error) // eslint-disable-line no-console
return { return {
data: {}, data: null,
formState: { formState: {
fields: { fields: {
initialValue: undefined, initialValue: undefined,

View File

@@ -28,7 +28,6 @@ export const buildVersionColumns = ({
const columns: Column[] = [ const columns: Column[] = [
{ {
Heading: <SortColumn Label={t('general:updatedAt')} name="updatedAt" />,
accessor: 'updatedAt', accessor: 'updatedAt',
active: true, active: true,
cellProps: { cellProps: {
@@ -56,9 +55,9 @@ export const buildVersionColumns = ({
}, },
}, },
}, },
Heading: <SortColumn Label={t('general:updatedAt')} name="updatedAt" />,
}, },
{ {
Heading: <SortColumn Label={t('version:versionID')} disable name="id" />,
accessor: 'id', accessor: 'id',
active: true, active: true,
cellProps: { cellProps: {
@@ -80,6 +79,7 @@ export const buildVersionColumns = ({
}, },
}, },
}, },
Heading: <SortColumn disable Label={t('version:versionID')} name="id" />,
}, },
] ]
@@ -88,7 +88,6 @@ export const buildVersionColumns = ({
(entityConfig?.versions?.drafts && entityConfig.versions.drafts?.autosave) (entityConfig?.versions?.drafts && entityConfig.versions.drafts?.autosave)
) { ) {
columns.push({ columns.push({
Heading: <SortColumn Label={t('version:status')} disable name="status" />,
accessor: '_status', accessor: '_status',
active: true, active: true,
cellProps: { cellProps: {
@@ -115,6 +114,7 @@ export const buildVersionColumns = ({
}, },
}, },
}, },
Heading: <SortColumn disable Label={t('version:status')} name="status" />,
}) })
} }

View File

@@ -85,7 +85,7 @@
}, },
"dependencies": { "dependencies": {
"@monaco-editor/react": "4.6.0", "@monaco-editor/react": "4.6.0",
"@next/env": "^15.0.0-canary.104", "@next/env": "^15.0.0-canary.160",
"@payloadcms/translations": "workspace:*", "@payloadcms/translations": "workspace:*",
"@types/busboy": "1.5.4", "@types/busboy": "1.5.4",
"ajv": "8.17.1", "ajv": "8.17.1",

View File

@@ -1,23 +1,6 @@
import type { CustomVersionParser } from './utilities/dependencies/dependencyChecker.js'
import { checkDependencies } from './utilities/dependencies/dependencyChecker.js' import { checkDependencies } from './utilities/dependencies/dependencyChecker.js'
import { PAYLOAD_PACKAGE_LIST } from './versions/payloadPackageList.js' import { PAYLOAD_PACKAGE_LIST } from './versions/payloadPackageList.js'
const customReactVersionParser: CustomVersionParser = (version) => {
const [mainVersion, ...preReleases] = version.split('-')
if (preReleases?.length === 3) {
// Needs different handling, as it's in a format like 19.0.0-rc-06d0b89e-20240801 format
const date = preReleases[2]
const parts = mainVersion.split('.').map(Number)
return { parts, preReleases: [date] }
}
const parts = mainVersion.split('.').map(Number)
return { parts, preReleases }
}
export async function checkPayloadDependencies() { export async function checkPayloadDependencies() {
const dependencies = [...PAYLOAD_PACKAGE_LIST] const dependencies = [...PAYLOAD_PACKAGE_LIST]
@@ -33,27 +16,6 @@ export async function checkPayloadDependencies() {
dependencies, dependencies,
targetVersionDependency: 'payload', targetVersionDependency: 'payload',
}, },
{
name: 'react',
dependencies: ['react', 'react-dom'],
targetVersionDependency: 'react',
},
], ],
dependencyVersions: {
next: {
required: false,
version: '>=15.0.0-canary.104',
},
react: {
customVersionParser: customReactVersionParser,
required: false,
version: '>=19.0.0-rc-06d0b89e-20240801',
},
'react-dom': {
customVersionParser: customReactVersionParser,
required: false,
version: '>=19.0.0-rc-06d0b89e-20240801',
},
},
}) })
} }

View File

@@ -64,6 +64,7 @@ import { consoleEmailAdapter } from './email/consoleEmailAdapter.js'
import { fieldAffectsData } from './fields/config/types.js' import { fieldAffectsData } from './fields/config/types.js'
import localGlobalOperations from './globals/operations/local/index.js' import localGlobalOperations from './globals/operations/local/index.js'
import { checkDependencies } from './utilities/dependencies/dependencyChecker.js' import { checkDependencies } from './utilities/dependencies/dependencyChecker.js'
import flattenFields from './utilities/flattenTopLevelFields.js'
import { getLogger } from './utilities/logger.js' import { getLogger } from './utilities/logger.js'
import { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit.js' import { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit.js'
import { traverseFields } from './utilities/traverseFields.js' import { traverseFields } from './utilities/traverseFields.js'
@@ -133,6 +134,8 @@ export type TypedAuthOperations = ResolveAuthOperationsType<GeneratedTypes>
const filename = fileURLToPath(import.meta.url) const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename) const dirname = path.dirname(filename)
let checkedDependencies = false
/** /**
* @description Payload * @description Payload
*/ */
@@ -434,8 +437,10 @@ export class BasePayload {
async init(options: InitOptions): Promise<Payload> { async init(options: InitOptions): Promise<Payload> {
if ( if (
process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'production' &&
process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&
!checkedDependencies
) { ) {
checkedDependencies = true
await checkPayloadDependencies() await checkPayloadDependencies()
} }
@@ -1029,6 +1034,10 @@ export {
deepMergeWithReactComponents, deepMergeWithReactComponents,
deepMergeWithSourceArrays, deepMergeWithSourceArrays,
} from './utilities/deepMerge.js' } from './utilities/deepMerge.js'
export {
checkDependencies,
type CustomVersionParser,
} from './utilities/dependencies/dependencyChecker.js'
export { getDependencies } from './utilities/dependencies/getDependencies.js' export { getDependencies } from './utilities/dependencies/getDependencies.js'
export { export {
findUp, findUp,
@@ -1052,7 +1061,6 @@ export { traverseFields } from './utilities/traverseFields.js'
export type { TraverseFieldsCallback } from './utilities/traverseFields.js' export type { TraverseFieldsCallback } from './utilities/traverseFields.js'
export { buildVersionCollectionFields } from './versions/buildCollectionFields.js' export { buildVersionCollectionFields } from './versions/buildCollectionFields.js'
export { buildVersionGlobalFields } from './versions/buildGlobalFields.js' export { buildVersionGlobalFields } from './versions/buildGlobalFields.js'
export { checkDependencies }
export { versionDefaults } from './versions/defaults.js' export { versionDefaults } from './versions/defaults.js'
export { deleteCollectionVersions } from './versions/deleteCollectionVersions.js' export { deleteCollectionVersions } from './versions/deleteCollectionVersions.js'
export { enforceMaxVersions } from './versions/enforceMaxVersions.js' export { enforceMaxVersions } from './versions/enforceMaxVersions.js'

View File

@@ -135,7 +135,9 @@ export const saveVersion = async ({
if (publishSpecificLocale && snapshot) { if (publishSpecificLocale && snapshot) {
const snapshotData = deepCopyObjectSimple(snapshot) const snapshotData = deepCopyObjectSimple(snapshot)
if (snapshotData._id) {delete snapshotData._id} if (snapshotData._id) {
delete snapshotData._id
}
snapshotData._status = 'draft' snapshotData._status = 'draft'

View File

@@ -61,16 +61,16 @@
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/escape-html": "^1.0.4", "@types/escape-html": "^1.0.4",
"@types/express": "^4.17.21", "@types/express": "^4.17.21",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"publishConfig": { "publishConfig": {
"exports": { "exports": {
@@ -96,7 +96,7 @@
}, },
"homepage:": "https://payloadcms.com", "homepage:": "https://payloadcms.com",
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -51,8 +51,8 @@
"devDependencies": { "devDependencies": {
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
@@ -76,7 +76,7 @@
}, },
"homepage:": "https://payloadcms.com", "homepage:": "https://payloadcms.com",
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -56,14 +56,14 @@
"devDependencies": { "devDependencies": {
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"publishConfig": { "publishConfig": {
"exports": { "exports": {
@@ -89,7 +89,7 @@
}, },
"homepage:": "https://payloadcms.com", "homepage:": "https://payloadcms.com",
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -49,8 +49,8 @@
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/jest": "29.5.12", "@types/jest": "29.5.12",
"@types/node": "22.5.4", "@types/node": "22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"jest": "^29.7.0", "jest": "^29.7.0",
@@ -60,8 +60,8 @@
}, },
"peerDependencies": { "peerDependencies": {
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"publishConfig": { "publishConfig": {
"exports": { "exports": {
@@ -76,7 +76,7 @@
}, },
"homepage:": "https://payloadcms.com", "homepage:": "https://payloadcms.com",
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -63,14 +63,14 @@
"devDependencies": { "devDependencies": {
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@payloadcms/next": "workspace:*", "@payloadcms/next": "workspace:*",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"publishConfig": { "publishConfig": {
"exports": { "exports": {
@@ -101,7 +101,7 @@
}, },
"homepage:": "https://payloadcms.com", "homepage:": "https://payloadcms.com",
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -65,8 +65,8 @@
"@payloadcms/next": "workspace:*", "@payloadcms/next": "workspace:*",
"@types/express": "^4.17.9", "@types/express": "^4.17.9",
"@types/lodash.get": "^4.4.7", "@types/lodash.get": "^4.4.7",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/uuid": "10.0.0", "@types/uuid": "10.0.0",
"payload": "workspace:*" "payload": "workspace:*"
}, },
@@ -97,7 +97,7 @@
}, },
"homepage:": "https://payloadcms.com", "homepage:": "https://payloadcms.com",
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -82,13 +82,13 @@
"@types/escape-html": "1.0.4", "@types/escape-html": "1.0.4",
"@types/json-schema": "7.0.15", "@types/json-schema": "7.0.15",
"@types/node": "22.5.4", "@types/node": "22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"babel-plugin-react-compiler": "0.0.0-experimental-48eb8f4-20240822", "babel-plugin-react-compiler": "0.0.0-experimental-48eb8f4-20240822",
"babel-plugin-transform-remove-imports": "^1.8.0", "babel-plugin-transform-remove-imports": "^1.8.0",
"esbuild": "0.23.1", "esbuild": "0.23.1",
"esbuild-sass-plugin": "3.3.1", "esbuild-sass-plugin": "3.3.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-72f06b2-20240822", "eslint-plugin-react-compiler": "0.0.0-experimental-7670337-20240918",
"payload": "workspace:*", "payload": "workspace:*",
"swc-plugin-transform-remove-imports": "1.15.0" "swc-plugin-transform-remove-imports": "1.15.0"
}, },
@@ -108,8 +108,8 @@
"@payloadcms/next": "workspace:*", "@payloadcms/next": "workspace:*",
"lexical": "0.17.0", "lexical": "0.17.0",
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"engines": { "engines": {
"node": "^18.20.2 || >=20.9.0" "node": "^18.20.2 || >=20.9.0"
@@ -142,7 +142,7 @@
"types": "./dist/index.d.ts" "types": "./dist/index.d.ts"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -39,13 +39,16 @@ import { recurseNodeTree } from './utilities/recurseNodeTree.js'
import { richTextValidateHOC } from './validate/index.js' import { richTextValidateHOC } from './validate/index.js'
let defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null let defaultSanitizedServerEditorConfig: SanitizedServerEditorConfig = null
let checkedDependencies = false
export function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider { export function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapterProvider {
return async ({ config, isRoot, parentIsLocalized }) => { return async ({ config, isRoot, parentIsLocalized }) => {
if ( if (
process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'production' &&
process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&
!checkedDependencies
) { ) {
checkedDependencies = true
await checkDependencies({ await checkDependencies({
dependencyGroups: [ dependencyGroups: [
{ {

View File

@@ -52,13 +52,13 @@
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/is-hotkey": "^0.1.10", "@types/is-hotkey": "^0.1.10",
"@types/node": "22.5.4", "@types/node": "22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"engines": { "engines": {
"node": "^18.20.2 || >=20.9.0" "node": "^18.20.2 || >=20.9.0"
@@ -86,7 +86,7 @@
"types": "./dist/index.d.ts" "types": "./dist/index.d.ts"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -50,8 +50,8 @@
"devDependencies": { "devDependencies": {
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@swc/core": "1.7.10", "@swc/core": "1.7.10",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"dotenv": "16.4.5", "dotenv": "16.4.5",
"prettier": "3.3.3", "prettier": "3.3.3",
"typescript": "5.6.2" "typescript": "5.6.2"
@@ -83,7 +83,7 @@
"types": "./dist/exports/index.d.ts" "types": "./dist/exports/index.d.ts"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -90,7 +90,7 @@
"react-datepicker": "6.9.0", "react-datepicker": "6.9.0",
"react-image-crop": "10.1.8", "react-image-crop": "10.1.8",
"react-select": "5.8.0", "react-select": "5.8.0",
"scheduler": "0.25.0-rc-f994737d14-20240522", "scheduler": "0.0.0-experimental-5dcb0097-20240918",
"sonner": "^1.5.0", "sonner": "^1.5.0",
"ts-essentials": "10.0.2", "ts-essentials": "10.0.2",
"use-context-selector": "2.0.0", "use-context-selector": "2.0.0",
@@ -105,21 +105,21 @@
"@hyrious/esbuild-plugin-commonjs": "^0.2.4", "@hyrious/esbuild-plugin-commonjs": "^0.2.4",
"@payloadcms/eslint-config": "workspace:*", "@payloadcms/eslint-config": "workspace:*",
"@types/body-scroll-lock": "^3.1.0", "@types/body-scroll-lock": "^3.1.0",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-datepicker": "6.2.0", "@types/react-datepicker": "6.2.0",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"@types/uuid": "10.0.0", "@types/uuid": "10.0.0",
"babel-plugin-react-compiler": "0.0.0-experimental-48eb8f4-20240822", "babel-plugin-react-compiler": "0.0.0-experimental-24ec0eb-20240918",
"esbuild": "0.23.1", "esbuild": "0.23.1",
"esbuild-sass-plugin": "3.3.1", "esbuild-sass-plugin": "3.3.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-72f06b2-20240822", "eslint-plugin-react-compiler": "0.0.0-experimental-7670337-20240918",
"payload": "workspace:*" "payload": "workspace:*"
}, },
"peerDependencies": { "peerDependencies": {
"next": "^15.0.0-canary.104", "next": "^15.0.0-canary.160",
"payload": "workspace:*", "payload": "workspace:*",
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801", "react": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918",
"react-dom": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801" "react-dom": "^19.0.0 || ^19.0.0-rc-5dcb0097-20240918"
}, },
"engines": { "engines": {
"node": "^18.20.2 || >=20.9.0" "node": "^18.20.2 || >=20.9.0"
@@ -201,7 +201,7 @@
"types": "./dist/exports/client/index.d.ts" "types": "./dist/exports/client/index.d.ts"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -11,12 +11,12 @@ import { SelectCell } from './Select/index.js'
import { TextareaCell } from './Textarea/index.js' import { TextareaCell } from './Textarea/index.js'
export const cellComponents = { export const cellComponents = {
File: FileCell,
array: ArrayCell, array: ArrayCell,
blocks: BlocksCell, blocks: BlocksCell,
checkbox: CheckboxCell, checkbox: CheckboxCell,
code: CodeCell, code: CodeCell,
date: DateCell, date: DateCell,
File: FileCell,
join: RelationshipCell, join: RelationshipCell,
json: JSONCell, json: JSONCell,
radio: SelectCell, radio: SelectCell,

View File

@@ -12,8 +12,8 @@ import { DateTimeField } from './DateTime/index.js'
import { EmailField } from './Email/index.js' import { EmailField } from './Email/index.js'
import { GroupField } from './Group/index.js' import { GroupField } from './Group/index.js'
import { HiddenField } from './Hidden/index.js' import { HiddenField } from './Hidden/index.js'
import { JSONField } from './JSON/index.js'
import { JoinField } from './Join/index.js' import { JoinField } from './Join/index.js'
import { JSONField } from './JSON/index.js'
import { NumberField } from './Number/index.js' import { NumberField } from './Number/index.js'
import { PasswordField } from './Password/index.js' import { PasswordField } from './Password/index.js'
import { PointField } from './Point/index.js' import { PointField } from './Point/index.js'

1071
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -21,18 +21,18 @@
"@payloadcms/richtext-lexical": "beta", "@payloadcms/richtext-lexical": "beta",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"sharp": "0.32.6" "sharp": "0.32.6"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"engines": { "engines": {
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -21,18 +21,18 @@
"@payloadcms/richtext-lexical": "beta", "@payloadcms/richtext-lexical": "beta",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"sharp": "0.32.6" "sharp": "0.32.6"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"engines": { "engines": {
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -26,8 +26,8 @@
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"autoprefixer": "^10.0.1", "autoprefixer": "^10.0.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.53", "eslint-config-next": "15.0.0-canary.53",
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" /> /// <reference types="next/image-types/global" />
// NOTE: This file should not be edited // NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information. // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

View File

@@ -40,12 +40,12 @@
"jsonwebtoken": "9.0.2", "jsonwebtoken": "9.0.2",
"lexical": "0.17.0", "lexical": "0.17.0",
"lucide-react": "^0.378.0", "lucide-react": "^0.378.0",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"payload-admin-bar": "^1.0.6", "payload-admin-bar": "^1.0.6",
"prism-react-renderer": "^2.3.1", "prism-react-renderer": "^2.3.1",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"react-hook-form": "7.45.4", "react-hook-form": "7.45.4",
"sharp": "0.32.6", "sharp": "0.32.6",
"tailwind-merge": "^2.3.0", "tailwind-merge": "^2.3.0",
@@ -58,12 +58,12 @@
"@types/escape-html": "^1.0.2", "@types/escape-html": "^1.0.2",
"@types/jsonwebtoken": "^9.0.6", "@types/jsonwebtoken": "^9.0.6",
"@types/node": "22.5.4", "@types/node": "22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.19",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"postcss": "^8.4.38", "postcss": "^8.4.38",
"prettier": "^3.0.3", "prettier": "^3.0.3",
"tailwindcss": "^3.4.3", "tailwindcss": "^3.4.3",
@@ -74,12 +74,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -21,18 +21,18 @@
"@payloadcms/richtext-lexical": "beta", "@payloadcms/richtext-lexical": "beta",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"sharp": "0.32.6" "sharp": "0.32.6"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"engines": { "engines": {
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -21,18 +21,18 @@
"@payloadcms/richtext-lexical": "beta", "@payloadcms/richtext-lexical": "beta",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"sharp": "0.32.6" "sharp": "0.32.6"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"engines": { "engines": {
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -22,17 +22,17 @@
"@payloadcms/storage-vercel-blob": "beta", "@payloadcms/storage-vercel-blob": "beta",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801" "react-dom": "19.0.0-rc-5dcb0097-20240918"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"engines": { "engines": {
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -21,18 +21,18 @@
"@payloadcms/richtext-lexical": "beta", "@payloadcms/richtext-lexical": "beta",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"graphql": "^16.8.1", "graphql": "^16.8.1",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "beta", "payload": "beta",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"sharp": "0.32.6" "sharp": "0.32.6"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.5.4", "@types/node": "^22.5.4",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "15.0.0-canary.104", "eslint-config-next": "15.0.0-canary.160",
"typescript": "5.6.2" "typescript": "5.6.2"
}, },
"engines": { "engines": {
@@ -40,12 +40,12 @@
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }

View File

@@ -91,7 +91,7 @@ test.describe('Admin Panel (Root)', () => {
test('ui - should render default payload favicons', async () => { test('ui - should render default payload favicons', async () => {
await page.goto(url.admin) await page.goto(url.admin)
const favicons = page.locator('link[rel="icon"]') const favicons = page.locator('link[rel="icon"][type="image/png"]')
await expect(favicons).toHaveCount(2) await expect(favicons).toHaveCount(2)
await expect(favicons.nth(0)).toHaveAttribute('sizes', '32x32') await expect(favicons.nth(0)).toHaveAttribute('sizes', '32x32')
await expect(favicons.nth(1)).toHaveAttribute('sizes', '32x32') await expect(favicons.nth(1)).toHaveAttribute('sizes', '32x32')

View File

@@ -309,7 +309,8 @@ export function initPageConsoleErrorCatch(page: Page) {
!msg.text().includes('did not match. Server:') && !msg.text().includes('did not match. Server:') &&
!msg.text().includes('the server responded with a status of') && !msg.text().includes('the server responded with a status of') &&
!msg.text().includes('Failed to fetch RSC payload for') && !msg.text().includes('Failed to fetch RSC payload for') &&
!msg.text().includes('Error: NEXT_NOT_FOUND') !msg.text().includes('Error: NEXT_NOT_FOUND') &&
!msg.text().includes('Error getting document data')
) { ) {
// "Failed to fetch RSC payload for" happens seemingly randomly. There are lots of issues in the next.js repository for this. Causes e2e tests to fail and flake. Will ignore for now // "Failed to fetch RSC payload for" happens seemingly randomly. There are lots of issues in the next.js repository for this. Causes e2e tests to fail and flake. Will ignore for now
// the the server responded with a status of error happens frequently. Will ignore it for now. // the the server responded with a status of error happens frequently. Will ignore it for now.

View File

@@ -62,7 +62,7 @@ export class NextRESTClient {
constructor(config: SanitizedConfig) { constructor(config: SanitizedConfig) {
this.config = config this.config = config
if (config?.serverURL) this.serverURL = config.serverURL if (config?.serverURL) {this.serverURL = config.serverURL}
this._GET = createGET(config) this._GET = createGET(config)
this._POST = createPOST(config) this._POST = createPOST(config)
this._DELETE = createDELETE(config) this._DELETE = createDELETE(config)
@@ -151,33 +151,6 @@ export class NextRESTClient {
return this._GRAPHQL_POST(request) return this._GRAPHQL_POST(request)
} }
async PATCH(path: ValidPath, options: FileArg & RequestInit & RequestOptions): Promise<Response> {
const { slug, params, url } = this.generateRequestParts(path)
const { query, ...rest } = options
const queryParams = generateQueryString(query, params)
const request = new Request(`${url}${queryParams}`, {
...rest,
headers: this.buildHeaders(options),
method: 'PATCH',
})
return this._PATCH(request, { params: { slug } })
}
async POST(
path: ValidPath,
options: FileArg & RequestInit & RequestOptions = {},
): Promise<Response> {
const { slug, params, url } = this.generateRequestParts(path)
const queryParams = generateQueryString({}, params)
const request = new Request(`${url}${queryParams}`, {
...options,
headers: this.buildHeaders(options),
method: 'POST',
})
return this._POST(request, { params: { slug } })
}
async login({ async login({
slug, slug,
credentials, credentials,
@@ -206,4 +179,31 @@ export class NextRESTClient {
return result return result
} }
async PATCH(path: ValidPath, options: FileArg & RequestInit & RequestOptions): Promise<Response> {
const { slug, params, url } = this.generateRequestParts(path)
const { query, ...rest } = options
const queryParams = generateQueryString(query, params)
const request = new Request(`${url}${queryParams}`, {
...rest,
headers: this.buildHeaders(options),
method: 'PATCH',
})
return this._PATCH(request, { params: { slug } })
}
async POST(
path: ValidPath,
options: FileArg & RequestInit & RequestOptions = {},
): Promise<Response> {
const { slug, params, url } = this.generateRequestParts(path)
const queryParams = generateQueryString({}, params)
const request = new Request(`${url}${queryParams}`, {
...options,
headers: this.buildHeaders(options),
method: 'POST',
})
return this._POST(request, { params: { slug } })
}
} }

View File

@@ -40,7 +40,7 @@ export const reorderColumns = async (
}) })
.boundingBox() .boundingBox()
if (!fromBoundingBox || !toBoundingBox) return if (!fromBoundingBox || !toBoundingBox) {return}
// drag the "from" column to the left of the "to" column // drag the "from" column to the left of the "to" column
await page.mouse.move(fromBoundingBox.x + 2, fromBoundingBox.y + 2, { steps: 10 }) await page.mouse.move(fromBoundingBox.x + 2, fromBoundingBox.y + 2, { steps: 10 })

View File

@@ -22,6 +22,7 @@ const { beforeAll, afterAll, describe } = test
const lockedDocumentCollection = 'payload-locked-documents' const lockedDocumentCollection = 'payload-locked-documents'
let page: Page let page: Page
let globalUrl: AdminUrlUtil
let postsUrl: AdminUrlUtil let postsUrl: AdminUrlUtil
let pagesUrl: AdminUrlUtil let pagesUrl: AdminUrlUtil
let payload: PayloadTestSDK<Config> let payload: PayloadTestSDK<Config>
@@ -32,6 +33,7 @@ describe('locked documents', () => {
testInfo.setTimeout(TEST_TIMEOUT) testInfo.setTimeout(TEST_TIMEOUT)
;({ payload, serverURL } = await initPayloadE2ENoConfig({ dirname })) ;({ payload, serverURL } = await initPayloadE2ENoConfig({ dirname }))
globalUrl = new AdminUrlUtil(serverURL, 'menu')
postsUrl = new AdminUrlUtil(serverURL, 'posts') postsUrl = new AdminUrlUtil(serverURL, 'posts')
pagesUrl = new AdminUrlUtil(serverURL, 'pages') pagesUrl = new AdminUrlUtil(serverURL, 'pages')
@@ -821,10 +823,10 @@ describe('locked documents', () => {
}) })
test('should not show lock on document card in dashboard view if locked by current user', async () => { test('should not show lock on document card in dashboard view if locked by current user', async () => {
await page.goto(postsUrl.edit('menu')) await page.goto(globalUrl.global('menu'))
await page.waitForURL(postsUrl.edit('menu')) await page.waitForURL(globalUrl.global('menu'))
const textInput = page.locator('#field-text') const textInput = page.locator('#field-globalText')
await textInput.fill('this is a global menu text field') await textInput.fill('this is a global menu text field')
await page.reload() await page.reload()

View File

@@ -57,9 +57,9 @@
"@payloadcms/translations": "workspace:*", "@payloadcms/translations": "workspace:*",
"@payloadcms/ui": "workspace:*", "@payloadcms/ui": "workspace:*",
"@sentry/react": "^7.77.0", "@sentry/react": "^7.77.0",
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0", "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1",
"babel-plugin-react-compiler": "0.0.0-experimental-48eb8f4-20240822", "babel-plugin-react-compiler": "0.0.0-experimental-24ec0eb-20240918",
"comment-json": "^4.2.3", "comment-json": "^4.2.3",
"create-payload-app": "workspace:*", "create-payload-app": "workspace:*",
"dotenv": "16.4.5", "dotenv": "16.4.5",
@@ -70,11 +70,11 @@
"http-status": "1.6.2", "http-status": "1.6.2",
"jwt-decode": "4.0.0", "jwt-decode": "4.0.0",
"lexical": "0.17.0", "lexical": "0.17.0",
"next": "15.0.0-canary.104", "next": "15.0.0-canary.160",
"payload": "workspace:*", "payload": "workspace:*",
"qs-esm": "7.0.2", "qs-esm": "7.0.2",
"react": "19.0.0-rc-06d0b89e-20240801", "react": "19.0.0-rc-5dcb0097-20240918",
"react-dom": "19.0.0-rc-06d0b89e-20240801", "react-dom": "19.0.0-rc-5dcb0097-20240918",
"server-only": "^0.0.1", "server-only": "^0.0.1",
"slate": "0.91.4", "slate": "0.91.4",
"tempy": "^1.0.1", "tempy": "^1.0.1",
@@ -84,7 +84,7 @@
"uuid": "10.0.0" "uuid": "10.0.0"
}, },
"overrides": { "overrides": {
"@types/react": "npm:types-react@19.0.0-rc.0", "@types/react": "npm:types-react@19.0.0-rc.1",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0" "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1"
} }
} }