2.0.2 (2023-10-09)
Bug Fixes
- beforeOperation hooks now correctly only run once (e5d6a75)
Tag Name: v2.0.2
Release Date: 10/16/2023
Payload CMSPayload 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.
This minor release fixes a critical issue with beforeOperation hooks running multiple times instead of once as intended. It also includes several developer experience improvements including exported components from the rich text editor and consolidated admin view types. This update is important for maintaining data integrity in operations that rely on hooks.
beforeOperation hooks running multiple timesNo migration is required for this release. The fixes are backward compatible and should work seamlessly with existing code.
This release is recommended for all users, especially those who:
beforeOperation hooks in their codeTo upgrade, run:
npm install [email protected]
# or
yarn add [email protected]
Fixed a critical issue where beforeOperation hooks were running multiple times instead of once as intended. This could cause unexpected behavior in operations that rely on these hooks, such as:
Resolved an error in the website template that was preventing proper functionality.
The rich text editor now exports additional components that can be used for custom implementations:
ElementButtonLeafButtontoggleElementAdmin view types have been consolidated to improve TypeScript support and developer experience when working with the admin panel.
No security fixes were mentioned in this release.
No specific performance improvements were mentioned in this release, though fixing the multiple hook executions may indirectly improve performance by preventing redundant operations.
This release primarily addresses a bug with hook execution that could cause unexpected behavior in applications relying on beforeOperation hooks. By ensuring these hooks run only once as intended, the update improves the reliability and predictability of Payload CMS operations.
The exported rich text components (ElementButton, LeafButton, and toggleElement) provide developers with more flexibility when customizing the rich text editor experience. The consolidation of admin view types improves TypeScript support, making it easier to work with the admin panel in a type-safe manner.
While this is a minor release, the hook execution fix is significant for maintaining data integrity and preventing unexpected behavior in applications that rely heavily on operation hooks.