github payloadcms/payload v4.0.0-beta.10

latest release: v3.94.0
pre-release2 hours ago

v4.0.0-beta.10 (2026-11-17)

๐Ÿš€ Features

๐Ÿ› Bug Fixes

  • defer localized slugs until required fields are translated (#19349) (f3fc675)
  • run onInit when retrying failed initialization (#19619) (c468a73)
  • accept cookie auth on cross-site top-level navigations (#19329) (72707a0)
  • sanitize and normalize cookie prefixes (#19588) (56033d9)
  • db-postgres: reuse transactions for document lock checks (#19551) (cf8272c)
  • deps: require Next.js 16.4.5 and bump to 16.4.6 (#19672) (8af5639)
  • deps: bump csv-parse from 5.6.0 to 7.0.2 (#19352) (c690bb5)
  • drizzle: point field breaks version creation on update with postgres (#19332) (47076b6)
  • plugin-multi-tenant: keep sole tenant filter clearable (#19367) (259d7fd)
  • richtext-lexical: render explicit text direction in HTML and JSX converters (#19651) (769a04a)
  • richtext-lexical: stop hardcoding ltr direction in buildEditorState (#19630) (82278cd)
  • ui: consolidate all form request types into a single queue (#19203) (20ac538)
  • ui: prevent relationship list filter selection flicker (#19549) (676e178)
  • ui: skip document preference requests without a key (#19584) (1aa49be)

๐Ÿ›  Refactors

  • ui: separate root from nested theme providers (#19564) (cb04990)

๐Ÿงช Tests

โš™๏ธ CI

โš ๏ธ BREAKING CHANGES

  • sanitize and normalize cookie prefixes (#19588) (56033d9)

    Projects explicitly configuring an empty prefix or invalid cookie-name
    characters are affected.

    • cookiePrefix: '' now uses payload, changing the auth cookie name
      from -token to payload-token.
    • Users with existing -token sessions must sign in again.
    • Integrations that reference -token directly must use
      payload-token.
    • Prefixes containing whitespace or other invalid cookie-name characters
      now throw InvalidConfiguration. Update them to a valid prefix before
      starting Payload.
  • deps: require Next.js 16.4.5 and bump to 16.4.6 (#19672) (8af5639)

    Apps using Next.js below 16.4.5 must update Next.js.

     "dependencies": {
    -  "next": "16.4.1"
    +  "next": "16.4.6"
     }
  • richtext-lexical: render explicit text direction in HTML and JSX converters (#19651) (769a04a)

    Content saved before Lexical 0.35, or created with the old
    buildEditorState, may carry an accidental direction: 'ltr', which
    now renders as dir="ltr". This targets 4.0 only, and is documented in
    the v4 migration guide with a snippet to clear stale directions. It is
    intentionally not configurable: the fix for a wrong direction belongs in
    the data, not in the converters. It won't be ported to 3.x.

  • ui: separate root from nested theme providers (#19564) (cb04990)

    Custom theme controls now get their scope from the provider and hook.
    Remove the options argument from both setters:

    -setTheme('dark', { scoped: true })
    +setTheme('dark')
    
    -setHighContrastMode(true, { scoped: true })
    +setHighContrastMode(true)

    Use useRootTheme for root preference controls inside overrides and all
    setTheme('auto') calls:

    -const { autoMode, setTheme, theme } = useTheme()
    +const { autoMode, setTheme, theme } = useRootTheme()
  • ui: consolidate all form request types into a single queue (#19203) (20ac538)

    The useQueue hook existed prior to this PR, but it's now instantiated
    once for all request types within the form.

    Custom components that call queueTask directly need to pass the task
    as an option. Task errors are no longer caught and logged by the queue;
    they reject the returned promise, so handle them at the call site:

      const { queueTask } = useQueue()
    
    - queueTask(async () => {
    -   await fetch('/api/posts')
    - })
    + queueTask({
    +   task: async () => {
    +     await fetch('/api/posts')
    +   },
    + }).catch((err) => {
    +   console.error(err)
    + })

    The queueTask method now accepts a priority and returns either a
    completed result or a superseded status:

    const { queueTask } = useQueue()
    
    const loadPosts = async () => {
      const result = await queueTask({
        priority: 0, // Lower numbers take precedence
        task: async () => {
          const response = await fetch('/api/posts')
          return response.json()
        },
      })
    
      if (result.status === 'completed') {
        return result.value
      }
    }

    This hook is also now marked as internal.

๐Ÿค Contributors

Don't miss a new payload release

NewReleases is sending notifications on new releases.