Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.41

Payload CMS Release: 3.0.0-beta.41

Pre Release

Tag Name: v3.0.0-beta.41

Release Date: 6/5/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.41 brings significant improvements with Next.js basePath support, UI enhancements, and an upgraded Lexical rich text editor. This release fixes several critical bugs including animated image resizing issues, column selector problems, and PostgreSQL migration file generation. Note that there are breaking changes related to PostgreSQL migrations and the Lexical editor upgrade that may require action from users.

Highlight of the Release

    • Added support for Next.js basePath configuration property
    • Exposed RowLabelProps for enhanced UI customization
    • Upgraded Lexical rich text editor from 0.15.0 to 0.16.0
    • Fixed issues with resizing animated images
    • Fixed column selector bug with disableListColumn fields
    • Fixed PostgreSQL migration file generation issues
    • Updated dependencies including file-type and date-fns v3

Migration Guide

PostgreSQL Migration Fix

If you are using db-postgres and have created the v2-v3-relationships migration released in v3.0.0-beta.39 from @payloadcms/db-postgres <= v3.0.0-beta.40, follow these steps:

  1. Delete the existing v2-v3-relationships migration file
  2. If changes were made to your config since the previous migration was made, revert those by checking out a previous commit in your version control
  3. Recreate the migration using:
    payload migrate:create --file @payloadcms/db-postgres/relationships-v2-v3
    
    This will generate the migration with the required snapshot .json file

Lexical Rich Text Editor Upgrade

If you are using Lexical directly in your project (e.g., for custom features):

  1. Review the Lexical 0.16.0 changelog: https://github.com/facebook/lexical/releases/tag/v0.16.0
  2. Update any custom code that might be affected by breaking changes in Lexical 0.16.0
  3. Test your custom features thoroughly after upgrading

Upgrade Recommendations

For Most Users

This beta release includes important bug fixes and features that improve the overall stability and functionality of PayloadCMS. We recommend upgrading if:

  • You're using Next.js with custom base paths
  • You've experienced issues with animated image resizing
  • You need the UI improvements for column selection
  • You want to benefit from the latest Lexical rich text editor features

For PostgreSQL Users

If you're using PostgreSQL with PayloadCMS, this upgrade is critical as it fixes important migration issues. Follow the migration guide carefully to ensure a smooth transition.

For Users with Custom Lexical Features

If you have custom Lexical features, review the Lexical 0.16.0 changelog before upgrading to identify any potential breaking changes that might affect your implementation.

Upgrade Steps

  1. Update your dependencies:

    npm install @payloadcms/[email protected]
    
  2. If using PostgreSQL, follow the migration guide to fix any migration issues

  3. Test thoroughly in a development environment before deploying to production

Bug Fixes

Admin UI Fixes

  • Fixed issue where fields with admin.disableListColumn property reappeared after toggling other fields in the column selector
  • Ensures fields with admin.disableListColumn set to true remain hidden under all circumstances

Image Processing

  • Fixed issues with resizing animated images (fixes #2181 and #6146)
  • Improves handling of GIFs and other animated image formats

Database and Migration Fixes

  • Fixed PostgreSQL migration file generation missing JSON schema output (fixes #6630)
  • Fixed issue where migration files could not be imported properly

Dependency Updates

  • Updated file-type dependency and fixed dependency version mismatches
  • Explicitly declared date-fns v3 as a dependency in translations package
  • Overridden ajv dependency version to 8.14.0 where possible to address known issues

New Features

Next.js Integration

  • Added support for Next.js basePath configuration property, allowing PayloadCMS to work seamlessly with Next.js applications that use custom base paths

UI Enhancements

  • Exposed RowLabelProps for greater UI customization flexibility
  • This allows developers to more easily customize row labels in the admin interface

Rich Text Editor Improvements

  • Upgraded Lexical rich text editor from version 0.15.0 to 0.16.0
  • Ported over relevant changes from the Lexical playground
  • Enhanced editing experience with latest Lexical features and improvements

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Dependency Optimizations

  • Removed unused css-minimizer-webpack-plugin from bundler-webpack
  • Updated and aligned dependency versions to reduce conflicts and improve compatibility

Rich Text Editor Performance

  • The upgrade to Lexical 0.16.0 includes various performance improvements from the Lexical team
  • Better handling of complex documents and editing operations

Impact Summary

PayloadCMS v3.0.0-beta.41 delivers significant improvements across multiple areas of the platform. The addition of Next.js basePath support enhances integration capabilities for developers using Next.js applications with custom base paths. UI developers benefit from exposed RowLabelProps and fixed column selector functionality, while content editors will appreciate the upgraded Lexical rich text editor and fixed image handling.

The release includes two notable breaking changes: one affecting PostgreSQL users who need to recreate migration files, and another for developers using custom Lexical features who may need to adapt to the 0.16.0 upgrade. These changes require attention but provide important fixes and improvements.

Overall, this beta release continues to refine PayloadCMS's functionality and stability as it moves toward a stable v3.0.0 release, with particular focus on improving developer experience, fixing critical bugs, and enhancing compatibility with modern web development stacks.

Full Release Notes

v3.0.0-beta.41 (2024-06-05)

Features

  • support Next.js basePath config property (#6628) (b2751f7)
  • ui: expose RowLabelProps (#6627) (1afd221)
  • richtext-lexical: upgrade lexical from 0.15.0 to 0.16.0 and port over relevant playground changes (#6620) (da35afb)

Bug Fixes

  • db-postgres: create predefined migration missing json schema output (#6641) (ff82bb5)
  • update file-type dependency and fix dependency version mismatch (#6638) (2077da8)
  • translations: explicitly declare date-fns v3 as a dependency (#6626) (aeb4df8)
  • resizing animated images (#6623) (bcd277e)
  • migration file cannot be imported (#6616) (cafc13a)

BREAKING CHANGES

  • db-postgres: create predefined migration missing json schema output (#6641) (ff82bb5)

Fixes #6630

This only applies to you if you using db-postgres and have created the
v2-v3-relationships migration released in
v3.0.0-beta.39
from @payloadcms/db-postgres <= v3.0.0-beta.40.

Steps to fix

  • Delete the existing v2-v3-relationships migration file.
  • If changes were made to your config since the previous migration was
    made, you will need to revert those by checking out a previous commit in
    your version control.
  • Recreate the migration using payload migrate:create --file @payloadcms/db-postgres/relationships-v2-v3 to make the migration with
    the snapshot .json file.
  • richtext-lexical: upgrade lexical from 0.15.0 to 0.16.0 and port over relevant playground changes (#6620) (da35afb)

BREAKING:

  • This upgrades the required version of lexical from 0.15.0 to 0.16.0.
    If you are using lexical directly in your project, possibly due to
    custom features, there might be breaking changes for you. Please consult
    the lexical 0.16.0 changelog:
    https://github.com/facebook/lexical/releases/tag/v0.16.0

Contributors

Statistics:

File Changed11
Line Additions216
Line Deletions42
Line Changes258
Total Commits6

User Affected:

  • Can now use PayloadCMS with Next.js basePath configuration
  • Better integration between PayloadCMS and Next.js applications

Contributors:

denolfeAlessioGrPatrikKozak