Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.0.8

Payload CMS Release: Release 1.0.8

Tag Name: v1.0.8

Release Date: 7/20/2022

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 v1.0.8 brings important improvements to TypeScript types, field hooks, and exports. This release removes unnecessary optional properties from generated types, fixes recursive field hook execution, resolves relationship field issues, and exports the PayloadRequest type for better developer experience. These changes enhance type safety, improve field hook reliability, and provide better access to core types.

Highlight of the Release

    • Improved TypeScript types with removal of unnecessary optional properties
    • Fixed recursive field hook execution for better reliability
    • Exported PayloadRequest type for developer use
    • Fixed issues with relationship fields

Migration Guide

No migration is required for this release. The changes are backward compatible and should not break existing code. However, if you're using TypeScript, you might notice some changes in the generated types, which should generally be beneficial by providing more accurate type definitions.

Upgrade Recommendations

This is a recommended upgrade for all PayloadCMS users, especially those using TypeScript or working with relationship fields. The bug fixes and improvements enhance the developer experience and fix potential issues with field hooks and relationships.

To upgrade, run:

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

Bug Fixes

Fixed Recursive Field Hook Execution

Field hooks are now properly awaited recursively, ensuring that all hooks are executed in the correct order and that promises are properly resolved before continuing. This fixes potential race conditions and improves the reliability of field hooks.

Fixed Relationship Field Issues

Resolved an issue (#756) related to relationship fields, particularly when used within groups and subgroups. This ensures that relationship fields work correctly in all contexts, including nested structures.

New Features

Improved TypeScript Types

The generated TypeScript types have been enhanced by removing unnecessary optional properties. This results in cleaner, more accurate type definitions that better represent your data model.

Exported PayloadRequest Type

The PayloadRequest type is now exported, allowing developers to import and use it directly in their code. This provides better type safety when working with request objects in custom endpoints, hooks, and plugins.

Security Updates

No security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were mentioned in this release.

Impact Summary

PayloadCMS v1.0.8 focuses on improving developer experience and fixing bugs. The TypeScript enhancements provide cleaner, more accurate types by removing unnecessary optional properties. The fix for recursive field hook execution ensures more reliable data processing. The export of the PayloadRequest type gives developers better access to core types for custom development. The relationship field fixes resolve issues when using relationships in complex nested structures.

These changes are particularly beneficial for TypeScript users and those with complex content models using relationship fields and field hooks. The release contains no breaking changes and is a recommended upgrade for all users.

Full Release Notes

1.0.8 (2022-07-20)

Bug Fixes

Features

  • export PayloadRequest (66c820c)
  • improves generated types by removing unnecessary optional properties (#784) (6f748f1)

Statistics:

File Changed28
Line Additions436
Line Deletions128
Line Changes564
Total Commits10

User Affected:

  • Benefit from improved type generation with fewer unnecessary optional properties
  • Can now import and use the PayloadRequest type directly in their code
  • Will experience better type safety and developer experience

Contributors:

jmikrutDanRibbensdenolfe