Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.20

Payload CMS Release: 3.0.0-beta.20

Pre Release

Tag Name: v3.0.0-beta.20

Release Date: 4/29/2024

Payload CMS LogoPayload CMS

Payload CMS is a modern, self-hosted headless content management system built with TypeScript, Node.js, and MongoDB. It's designed specifically for developers who want full control over their content management system while maintaining a powerful admin interface for content editors.

TL;DR

PayloadCMS v3.0.0-beta.20 Release

This beta release includes significant updates to the rich text editor with Lexical upgrades (0.13.1 to 0.14.5), improved file handling, and numerous bug fixes. Key improvements include better form state handling, enhanced permissions for versions, and fixes for authentication routes. The release also adds documentation for new storage packages and email adapters, making PayloadCMS more flexible for different deployment environments.

Highlight of the Release

    • Upgraded Lexical rich text editor from 0.13.1 to 0.14.5
    • Fixed file uploads and external file URL handling
    • Added documentation for new storage packages and email adapters
    • Improved form state handling when conditions throw errors
    • Fixed bulk publishing from collection lists
    • Enhanced permissions for document versions

Migration Guide

Migrating to v3.0.0-beta.20

For @payloadcms/richtext-lexical Users

  1. Update Lexical Imports: If you import from Lexical core packages in your codebase, you'll need to change CJS-style imports to ESM-style imports:

    // Old (CJS-style)
    const { $createParagraphNode } = require('@lexical/rich-text');
    
    // New (ESM-style)
    import { $createParagraphNode } from '@lexical/rich-text';
    
  2. SerializedParagraphNode Changes: The SerializedParagraphNode now has a new required textFormat property. Make sure your code accounts for this when working with paragraph nodes.

  3. Review Lexical Changelog: Check the Lexical changelog for any other breaking changes that might affect your implementation.

General Updates

No other migration steps are required for general PayloadCMS usage. The other fixes and improvements in this release should work automatically after updating.

Upgrade Recommendations

For Production Applications

If you're using PayloadCMS in production, we recommend waiting for the final v3.0.0 release before upgrading, as this is still a beta version that may contain breaking changes.

For Development and Testing

This beta release contains significant improvements to the rich text editor and fixes several important bugs. If you're actively developing with PayloadCMS and especially if you're using the rich text editor with Lexical, upgrading to this beta is recommended to take advantage of these improvements.

How to Upgrade

To upgrade to v3.0.0-beta.20, run:

npm install [email protected]
# or
yarn add [email protected]
# or
pnpm add [email protected]

If you're using the richtext-lexical package, also update it:

npm install @payloadcms/[email protected]
# or
yarn add @payloadcms/[email protected]
# or
pnpm add @payloadcms/[email protected]

Bug Fixes

Form and Data Handling

  • Fixed version restoration functionality
  • Fixed bulk publishing from collection lists
  • Fixed formData handling on Vercel deployments
  • Fixed conditions throwing errors that break form state
  • Corrected createPayloadRequest routeParams

File and URL Handling

  • Fixed proper handling of external file URLs
  • Fixed file uploads with broken import paths
  • Fixed issue with duplicate ':' in email links

Authentication and Permissions

  • Fixed logout-inactivity route that was 404ing
  • Added validation to ensure user slug is an auth-enabled collection
  • Fixed permissions handling for document versions
  • Properly set document operation for globals

TypeScript and Dependencies

  • Fixed type errors for FeatureProviderServer with TypeScript strict mode
  • Deduplicated React dependencies
  • Fixed local request missing URL headers

New Features

Rich Text Editor Improvements

  • Lexical Upgrade: The rich text editor has been upgraded from Lexical 0.13.1 to 0.14.5, bringing numerous improvements and fixes
  • Upload Node Handling: Implemented click, delete, and backspace handling for upload nodes
  • List Item Indentation: Fixed preservation of bullet list item indentation on newline
  • Link Modal Behavior: Prevented link modal from showing if selection spans further than the link

Documentation and Testing

  • Added documentation for new packages:
    • email-nodemailer adapter
    • Various storage packages
    • Cloud storage plugin
  • Added test email adapter for improved testing workflows

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Build and Package Improvements

  • Added app-build-with-packed job to CI workflow
  • Updated pack-all-to-dest script for safer package details retrieval
  • Sorted package.json files for better maintainability
  • Converted all errors to named exports for better error handling
  • Adjusted node engines to account for node register requirements

Impact Summary

This release represents a significant step forward for PayloadCMS in the v3.0.0 beta cycle, with a focus on improving the rich text editing experience through Lexical upgrades. The breaking changes are limited to the @payloadcms/richtext-lexical package, requiring developers to update their import style from CJS to ESM and adapt to Lexical's own breaking changes.

The release addresses several important bugs related to form handling, file uploads, and authentication routes, making the CMS more stable and reliable. The addition of documentation for new storage packages and email adapters expands PayloadCMS's flexibility for different deployment environments.

For developers, the most impactful changes are the Lexical upgrades and the fixes for form state handling when conditions throw errors. Content editors will benefit from improved rich text editing capabilities and fixed bulk publishing functionality. Administrators will appreciate the enhanced permissions handling for document versions and fixed authentication routes.

Overall, this beta release brings PayloadCMS closer to a stable v3.0.0 release with important quality-of-life improvements and bug fixes across the board.

Full Release Notes

What's Changed

⚠ BREAKING CHANGES:

@payloadcms/richtext-lexical

Upgrade lexical from 0.13.1 to 0.14.5 and backport other changes by @AlessioGr in #6095

  • Lexical may introduce breaking changes in their updates. Please consult their changelog. One breaking change I noticed is that the SerializedParagraphNode now has a new, required textFormat property.
  • Now that lexical supports ESM, all CJS-style imports have been changed to ESM-style imports. You may have to do the same in your codebase if you import from lexical core packages

Full Changelog: v3.0.0-beta.18...v3.0.0-beta.20

Statistics:

File Changed300
Line Additions25,076
Line Deletions16,999
Line Changes42,075
Total Commits60

User Affected:

  • Need to update Lexical imports from CJS to ESM style if using richtext-lexical package
  • Benefit from improved file handling and formData support on Vercel
  • Access to new storage packages documentation
  • Better error handling for form conditions

Contributors:

denolfeDanRibbenspaulpopusJarrodMFleschjacobsfletchAlessioGrjmikrut