Home

>

Tools

>

Payload CMS

>

Releases

>

Release v2.0.10

Payload CMS Release: Release v2.0.10

Tag Name: v2.0.10

Release Date: 10/17/2023

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

Payload CMS v2.0.10 introduces flexibility in file uploads by making the filesRequired property optional, and fixes a critical bug in the user registration process. This release enhances developer experience with more forgiving file upload configurations while maintaining system stability.

Highlight of the Release

    • Optional file uploads with new filesRequired configuration
    • Fixed user registration bug related to missing transaction ID
    • Enhanced stability in the richtext-lexical component with additional safety checks
    • Added Payload as peer dependency to all adapters for better compatibility

Migration Guide

No migration is required for this release. The changes are backward compatible:

  • The filesRequired property defaults to true if not specified, maintaining the same behavior as previous versions
  • The user registration fix is applied automatically and requires no action from users

Upgrade Recommendations

This release is recommended for all users, especially those who:

  • Need optional file uploads in their content models
  • Are setting up new Payload instances where first-user registration is critical
  • Use the richtext-lexical component with potentially variable data formats

Upgrade is straightforward with no breaking changes:

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

Bug Fixes

User Registration Fix

Fixed an issue in the first user registration process where the verification update was missing a transaction ID and request object. This bug could cause registration failures or incomplete user records.

Richtext Editor Safety Checks

Added additional safety checks in the richtext-lexical component to handle incorrect data passed into the editor, preventing potential crashes or unexpected behavior when malformed content is provided.

New Features

Optional File Uploads

The filesRequired property is now optional for upload fields. This enhancement allows developers to configure file upload fields where files are not mandatory:

{
  name: 'optionalFile',
  type: 'upload',
  relationTo: 'media',
  filesRequired: false // Files are now optional
}

By default, Payload will still require files to be uploaded (maintaining backward compatibility), but you can now explicitly make uploads optional by setting filesRequired to false.

This feature provides greater flexibility when designing content models where file attachments should be optional rather than required.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were highlighted in this release.

Impact Summary

This release enhances Payload's flexibility with optional file uploads while fixing a critical bug in the user registration process. The addition of Payload as a peer dependency to all adapters improves package compatibility and dependency management.

The optional file uploads feature is particularly valuable for content models where attachments should be optional rather than mandatory, giving developers more control over their data requirements without custom workarounds.

The user registration fix ensures a smoother onboarding experience, especially for new Payload instances where the first admin user creation is a critical setup step.

Full Release Notes

2.0.10 (2023-10-17)

Features

Bug Fixes

  • Register first user verify update missing transaction id / req (#3665) (68c5a5751)

Statistics:

File Changed17
Line Additions80
Line Deletions23
Line Changes103
Total Commits13

User Affected:

  • Can now make file uploads optional by setting `filesRequired: false`
  • Benefit from more flexible file upload configurations
  • No longer encounter errors during first user registration due to missing transaction ID

Contributors:

denolfegeminigeekAlessioGrTomDo1234