Home

>

Tools

>

Payload CMS

>

Releases

>

Release 0.8.2

Payload CMS Release: Release 0.8.2

Tag Name: v0.8.2

Release Date: 8/2/2021

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 v0.8.2 introduces error type exports for better error handling and fixes edge cases in conditional logic. This minor release improves developer experience with better error management capabilities while ensuring more reliable conditional field behavior.

Highlight of the Release

    • Error types are now exported for better developer error handling
    • Fixed edge cases in advanced conditional logic
    • Improved reliability for complex form conditions

Migration Guide

No migration is required for this release. The changes are backward compatible and should not break existing implementations.

If you're already handling Payload errors in your code, you may want to refactor to use the newly exported error types for more precise error handling.

Upgrade Recommendations

This is a minor release with new features and bug fixes. It's recommended to upgrade if:

  1. You need better error handling capabilities in your application
  2. You've experienced issues with conditional logic in complex form scenarios

The upgrade should be straightforward with no breaking changes:

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

Bug Fixes

Conditional Logic Improvements

Fixed edge cases in advanced conditional logic that could cause unexpected behavior. The improvements include:

  • Better handling of complex nested conditions
  • Fixed issues with multiple interdependent conditional fields
  • More reliable evaluation of conditional logic in deeply nested field structures
  • Improved handling of conditional logic when fields are dynamically shown/hidden

These fixes ensure that conditional fields behave more predictably, especially in complex form scenarios with multiple layers of conditions.

New Features

Error Types Export

Payload now exports its error types, allowing developers to import and use them directly in their code. This enables:

  • Better type checking for error handling
  • Ability to create custom error handlers that can distinguish between different Payload error types
  • More robust error management in applications built with Payload

Example usage:

import { ValidationError, NotFoundError } from 'payload';

try {
  // Payload operations
} catch (err) {
  if (err instanceof ValidationError) {
    // Handle validation errors
  } else if (err instanceof NotFoundError) {
    // Handle not found errors
  }
}

Security Updates

No security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were mentioned in this release.

Impact Summary

This release focuses on developer experience improvements and bug fixes. The addition of exported error types enhances error handling capabilities, allowing for more robust applications. The fixes to conditional logic edge cases improve reliability, particularly in complex form scenarios.

While this is a minor release, it addresses important usability issues that could affect form behavior in the admin panel. Content editors will benefit from more predictable conditional field behavior, and developers gain new tools for error management.

Overall, this release continues Payload's commitment to providing a stable and developer-friendly headless CMS with incremental improvements to both the API and admin experience.

Full Release Notes

0.8.2 (2021-08-02)

Bug Fixes

  • more advanced conditional logic edge cases (33983de)

Features

Statistics:

File Changed23
Line Additions114
Line Deletions19
Line Changes133
Total Commits5

User Affected:

  • Can now import and use Payload's error types directly in their code for better error handling
  • Will experience more reliable conditional logic behavior in complex form scenarios
  • Can build more robust error handling in their applications

Contributors:

jmikrutdenolfe