3.42.0

Tag Name: v3.42.0

Release Date: 6/9/2025

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.42.0 brings significant improvements to the rich text editor performance, adds Bangla translations, and enhances the import/export plugin with custom CSV transformation capabilities. This release also fixes several bugs in the rich text editors, improves documentation, and adds automatic creation of missing importmap files. Developers will benefit from better typing performance in the Lexical rich text editor and more robust handling of text state styling.

Highlight of the Release

    • Significant performance improvements for typing in Lexical rich text editor with enabled toolbars
    • Added Bangla translations for the admin panel
    • New custom toCSV function for fields in the import/export plugin
    • Automatic creation of missing importmap files
    • Fixed text state CSS not being applied when multiple text state groups are present

Migration Guide

No breaking changes were introduced in this release, so no migration is required.

If you're using the import/export plugin with a custom jobs configuration, you may want to verify that the plugin is properly extending your jobs configuration after updating.

Upgrade Recommendations

This is a recommended upgrade for all users, especially those who:

  • Use the Lexical rich text editor and experience performance issues during typing
  • Need Bangla language support
  • Use the import/export plugin and need custom CSV transformation capabilities
  • Have encountered any of the bugs fixed in this release

The upgrade should be straightforward with no breaking changes. Simply update your dependencies to v3.42.0:

npm install payload@3.42.0
# or
yarn add payload@3.42.0
# or
pnpm add payload@3.42.0

If you're using PayloadCMS plugins, make sure to update those as well to maintain compatibility.

Bug Fixes

Rich Text Editor Fixes

  • Lexical Editor: Fixed a runtime error that occurred when using TextStateFeature without props. While not intended to be used without props, it now gracefully handles this case.
  • Text State CSS Application: Resolved an issue where text state CSS was not being applied correctly when multiple text state groups were present. The fix ensures that styles from different groups don't overwrite each other.
  • Slate Editor: Added 'li' string literal to RichTextElement type, fixing type errors when working with list items.

Import/Export Plugin Fixes

  • Jobs Configuration: Fixed incorrect config extension of jobs in the import/export plugin that was causing validation errors.

Translation Fixes

  • Folder Movement i18n: Corrected the dynamic variable name for 'movingFromFolder' in translations from {{folderName}} to {{fromFolder}} to ensure proper value retrieval.

Other Fixes

  • Globals Version Cleanup: Implemented proper cleanup of globals max versions to prevent memory leaks.
  • Form Builder Plugin: Fixed missing export of the DateField type.

New Features

Import/Export Plugin Enhancements

  • Custom toCSV Function: Added ability to define custom transformation logic for converting document data to CSV format on a field-by-field basis. This allows for more flexible data exports with custom formatting.
  • Debug Logging Option: Added debug logging capabilities to help troubleshoot import/export operations.

Translations

  • Bangla Language Support: Added complete Bangla (Bengali) translations for the admin panel, making PayloadCMS more accessible to Bengali-speaking users.
  • Improved zh-TW Translations: Revised Traditional Chinese (Taiwan) translations for the import/export plugin to improve wording and consistency.

System Improvements

  • Auto-create importmap.js: The system now automatically creates the importmap file if it's missing and the location can be found, preventing errors during startup.
  • Route Parameters in Views: Added routeParams to the request object on views, making these parameters accessible in custom components.

Form Builder Plugin

  • Exported DateField Type: The DateField type is now properly exported from the form builder plugin, allowing for better TypeScript integration.

Security Updates

No security fixes were included in this release.

Performance Improvements

Rich Text Editor Optimizations

  • Lexical Editor Typing Performance: Significantly improved typing performance when toolbars are enabled in the Lexical rich text editor. This was achieved through:
    • Deprioritizing state calculations using useDeferredValue and requestIdleCallback
    • Adding additional memoization to reduce unnecessary re-renders
    • Replacing inefficient useEffect hooks with more optimized solutions

This improvement is particularly noticeable on slower machines or when working with complex documents, resulting in a much smoother typing experience.

Development Workflow

  • Turbopack by Default: Enabled Turbopack by default in the monorepo, which provides faster development server startup and module rebuilds. This change was made after no issues were reported with Turbopack usage.

Impact Summary

PayloadCMS v3.42.0 delivers notable improvements to both developer and content editor experiences. The most impactful change is the significant performance optimization in the Lexical rich text editor, making typing much smoother when toolbars are enabled - a common pain point for content editors on slower machines.

For developers, the addition of custom CSV transformation functions in the import/export plugin provides greater flexibility when exporting data, while the automatic creation of missing importmap files removes a potential source of startup errors.

The addition of Bangla translations expands PayloadCMS's accessibility to Bengali-speaking users, continuing the CMS's commitment to internationalization.

Several quality-of-life bug fixes are included, such as fixing text state CSS application when multiple state groups are present, correcting translation variable names, and properly exporting types from the form builder plugin.

Overall, this release focuses on performance, developer experience, and internationalization without introducing breaking changes, making it a recommended upgrade for all users.

Full Release Notes

v3.42.0 (2025-06-09)

šŸš€ Features

  • create the importmap file if missing and the location can be found (#12727) (c6659db)
  • plugin-import-export: add custom toCSV function on fields (#12533) (8f4c442)
  • plugin-import-export: add debug logging option (#12705) (678bfc7)
  • translations: add Bangla translations (#12696) (3f670ca)

šŸ› Bug Fixes

  • proper globals max versions clean up (#12611) (9fbc3f6)
  • adds routeParams to the req on views (#12711) (773e4ad)
  • plugin-form-builder: export DateField type (#12695) (8d7dbe6)
  • plugin-import-export: incorrect config extension of jobs (#12730) (ff615d3)
  • plugin-import-export: revise zhTw translations (#12685) (afbdf3d)
  • richtext-lexical: text state css not applied if 2+ text state groups present (#12726) (3d177fd)
  • richtext-lexical: prevent runtime error if using TextStateFeature without props (#12668) (6f82154)
  • richtext-slate: add 'li' string literal to RichTextElement type (#12693) (e10e445)
  • translations: correct i18n dynamic variable name for 'movingFromFolder' (#12642) (6f76d72)

⚔ Performance

  • richtext-lexical: improve typing performance while toolbars are enabled (#12669) (aef4f77)

šŸ“š Documentation

  • document how to expose the jobs collection in Admin UI (#12707) (34fe36b)
  • fix formatting in custom components > edit view paragraph (#12697) (6466684)
  • improve jobs autorun docs, adds e2e test (#12196) (7c05c77)
  • enhance drafts documentation with examples for REST, Local, and GraphQL APIs (#12575) (629e74d)
  • removes duplicate headline in building without a db connection (#12694) (4ee4aa7)
  • plugin-form-builder: add warning about GraphQL type name collis… (#12720) (7b21270)

šŸ” Chores

šŸ¤ Contributors

Statistics:

File Changed191
Line Additions2,391
Line Deletions579
Line Changes2,970
Total Commits22

User Affected:

  • Benefit from improved typing performance in the Lexical rich text editor
  • Can now create custom CSV transformations for fields in the import/export plugin
  • No longer need to manually create importmap files if they're missing
  • Get access to exported DateField type from the form builder plugin

Contributors:

GermanJablozubrickspaulpopusAlessioGrjessrynkarshomriddhoanyujWillFelisbertogwestermanJarrodMFleschDanRibbensSonnyYour1tsuudenolfe