-
Notifications
You must be signed in to change notification settings - Fork 3.5k
chore: bump monorepo Next.js version to 16.2.0 #15992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a39c4e7
ce213b1
f7c34c5
c5420f8
09dc8a5
0e5cbed
7d9957b
fb69fb3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -414,24 +414,41 @@ export function FormsManagerProvider({ children }: FormsManagerProps) { | |
| if (missingFile || exceedsLimit || missingFilename) { | ||
| currentForms[i].formState.file.valid = false | ||
|
|
||
| // neeed to get the field state to extract count since field errors | ||
| // File/Blob objects cannot be serialized via the RSC flight protocol, | ||
| // so replace with a plain object before calling the server function. | ||
| const originalFileValue = currentForms[i].formState.file?.value | ||
| const formStateForServer = { ...currentForms[i].formState } | ||
| if (originalFileValue instanceof File) { | ||
| formStateForServer.file = { | ||
| ...formStateForServer.file, | ||
| value: { name: originalFileValue.name }, | ||
| } | ||
| } | ||
|
|
||
| // Need to get the field state to extract count since field errors | ||
| // are not returned when file is missing or exceeds limit | ||
| const { state: newState } = await getFormState({ | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New bug - Next.js now complains if we call a server action (getFormState) with a |
||
| collectionSlug, | ||
| docPermissions, | ||
| docPreferences: null, | ||
| formState: currentForms[i].formState, | ||
| formState: formStateForServer, | ||
| operation: 'update', | ||
| schemaPath: collectionSlug, | ||
| }) | ||
|
|
||
| currentForms[i] = { | ||
| errorCount: Object.values(newState).reduce( | ||
| (acc, value) => (value?.valid === false ? acc + 1 : acc), | ||
| 0, | ||
| ), | ||
| formID: currentForms[i].formID, | ||
| formState: newState, | ||
| if (newState) { | ||
| if (originalFileValue instanceof File && newState.file) { | ||
| newState.file = { ...newState.file, value: originalFileValue } | ||
| } | ||
|
|
||
| currentForms[i] = { | ||
| errorCount: Object.values(newState).reduce( | ||
| (acc, value) => (value?.valid === false ? acc + 1 : acc), | ||
| 0, | ||
| ), | ||
| formID: currentForms[i].formID, | ||
| formState: newState, | ||
| } | ||
| } | ||
|
|
||
| toast.error(nonFieldErrors[0]?.message) | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,14 +5,14 @@ import * as path from 'path' | |
| import { adminRoute } from 'shared.js' | ||
| import { fileURLToPath } from 'url' | ||
|
|
||
| import { login } from '../__helpers/e2e/auth/login.js' | ||
| import { | ||
| ensureCompilationIsDone, | ||
| initPageConsoleErrorCatch, | ||
| saveDocAndAssert, | ||
| // throttleTest, | ||
| } from '../__helpers/e2e/helpers.js' | ||
| import { AdminUrlUtil } from '../__helpers/shared/adminUrlUtil.js' | ||
| import { login } from '../__helpers/e2e/auth/login.js' | ||
| import { initPayloadE2ENoConfig } from '../__helpers/shared/initPayloadE2ENoConfig.js' | ||
| import { TEST_TIMEOUT_LONG } from '../playwright.config.js' | ||
|
|
||
|
|
@@ -131,7 +131,7 @@ test.describe('Admin Panel (Root)', () => { | |
| await expect(favicons.nth(0)).toHaveAttribute('sizes', '32x32') | ||
| await expect(favicons.nth(1)).toHaveAttribute('sizes', '32x32') | ||
| await expect(favicons.nth(1)).toHaveAttribute('media', '(prefers-color-scheme: dark)') | ||
| await expect(favicons.nth(1)).toHaveAttribute('href', /\/payload-favicon-light\.[a-z\d]+\.png/) | ||
| await expect(favicons.nth(1)).toHaveAttribute('href', /\/payload-favicon-light\.[a-z\d_]+\.png/) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file name now has an underscore |
||
| }) | ||
|
|
||
| test('config.admin.theme should restrict the theme', async () => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ const { | |
| part, | ||
| shard, | ||
| workers, | ||
| } = minimist(process.argv.slice(2)) | ||
| } = minimist(process.argv.slice(2), { alias: { g: 'grep' } }) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LLMs sometimes use -g instead of --grep, which did not work previously. Not worth a separate PR |
||
| const suiteName = args[0] | ||
|
|
||
| // Run all | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existing bug - fixes cryptic JSON.parse errors thrown in server console when uploading file without file name. Instead, we get a proper 400 error