Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.9.0

Payload CMS Release: Release 1.9.0

Tag Name: v1.9.0

Release Date: 6/7/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 v1.9.0 introduces custom type interfaces

What's new: This release adds the ability to create and reuse custom type interfaces across your Payload CMS project, allowing for more modular and maintainable TypeScript code.

Why it matters: Developers can now define field interfaces once and reuse them across multiple collections and globals, significantly reducing code duplication and improving type safety throughout their projects.

Who should care: TypeScript developers using Payload CMS who want to improve their code organization and maintainability, especially those working on larger projects with shared field structures.

Highlight of the Release

    • Introduction of custom type interfaces for fields
    • Ability to hoist and reuse type interfaces across collections and globals
    • Improved documentation organization for TypeScript and GraphQL
    • New troubleshooting section with CORS issue resolution guidance

Migration Guide

No migration is required for this release. The new custom type interfaces feature is additive and doesn't break existing functionality.

To start using custom type interfaces:

  1. Define your interfaces in a central location
  2. Import and use them in your collection and global configurations
  3. Refer to the updated TypeScript documentation for detailed examples and best practices

Upgrade Recommendations

This is a minor version update (1.8.6 → 1.9.0) that adds new features without breaking changes. It's recommended for all users to upgrade, especially TypeScript developers who would benefit from the new type interface capabilities.

The upgrade process should be straightforward:

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

After upgrading, no additional configuration changes are required to maintain existing functionality.

Bug Fixes

No specific bug fixes were mentioned in this release.

New Features

Custom Type Interfaces

The standout feature in v1.9.0 is the introduction of custom type interfaces, which allows developers to:

  • Define field interfaces once and reuse them across multiple collections and globals
  • Hoist type definitions to create more modular and maintainable code
  • Reduce duplication in TypeScript definitions throughout Payload projects

This feature is particularly valuable for projects with consistent field structures that appear in multiple collections, as it enables a more DRY (Don't Repeat Yourself) approach to TypeScript definitions.

Documentation Improvements

The documentation has been significantly enhanced with:

  • Better organization of TypeScript and GraphQL documentation
  • A dedicated section for field interfaces in both TypeScript and GraphQL contexts
  • A new troubleshooting section with specific guidance on resolving CORS (Cross-Origin Resource Sharing) issues

Security Updates

No security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were mentioned in this release.

Impact Summary

Payload CMS v1.9.0 focuses on improving the developer experience for TypeScript users by introducing custom type interfaces. This feature allows for more modular, reusable type definitions across collections and globals, reducing code duplication and improving maintainability.

The release also enhances documentation with better organization of TypeScript and GraphQL sections, and adds valuable troubleshooting guidance for CORS issues, which is particularly helpful for developers working with Payload in complex API environments.

While this update doesn't include specific bug fixes or performance improvements, the new typing capabilities represent a significant quality-of-life improvement for TypeScript developers working with Payload CMS, especially on larger projects where consistent typing across multiple collections is important.

Full Release Notes

Statistics:

File Changed23
Line Additions2,937
Line Deletions680
Line Changes3,617
Total Commits3

User Affected:

  • Can now create reusable type interfaces for fields
  • Can hoist type definitions to be shared across collections and globals
  • Will experience improved code organization and reduced duplication

Contributors:

JarrodMFleschdenolfeDanRibbens