Home

>

Tools

>

Payload CMS

>

Releases

>

Release v2.0.11

Payload CMS Release: Release v2.0.11

Tag Name: v2.0.11

Release Date: 10/19/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

PayloadCMS v2.0.11 Release

This release focuses on fixing several bugs across different areas of PayloadCMS, particularly in live preview functionality, webpack bundling, and type generation. It introduces one new feature allowing developers to opt out of type generation declare statements. The update improves stability for file uploads, relationships, and PostgreSQL database operations while enhancing accessibility and admin UI components.

Highlight of the Release

    • New option to opt out of type generation declare statements
    • Fixed live preview handling of uploads and hasOne monomorphic relationships
    • Resolved PostgreSQL database issues with block and array inserts
    • Improved webpack bundling with better node_modules resolution
    • Enhanced accessibility with improved tab indices

Migration Guide

No migration is required for this release. This is a patch release that fixes bugs and adds minor features without breaking changes.

If you're using TypeScript and want to take advantage of the new ability to opt out of type generation declare statements, you can update your configuration accordingly. See the PR #3765 for more details.

Upgrade Recommendations

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

  • Use live preview functionality with uploads or monomorphic relationships
  • Work with PostgreSQL databases and have encountered issues with block and array inserts
  • Use TypeScript and have experienced issues with type generation
  • Use webpack bundling and have had module resolution issues

The upgrade process should be straightforward:

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

No configuration changes are required unless you want to opt out of type generation declare statements.

Bug Fixes

Live Preview Improvements

  • Fixed handling of uploads and hasOne monomorphic relationships in live preview functionality (#3719)
  • Significantly improved test coverage for live preview (#3763)

Admin UI Fixes

  • Properly renders focal point when crop is set to false (#3759)
  • Updates request object after file resize (#3754)
  • Renders ID as fallback title in DeleteDocument component (#3745)
  • Properly handles hideAPIURL configuration (#3721)
  • Improved drawer and blur styles for better UI experience
  • Enhanced accessibility with improved tab indices

Database and Data Handling

  • Fixed PostgreSQL database issues with block and array inserts (#3714)
  • Corrected versions collection casing (#3739)

TypeScript and Type Generation

  • Fixed filesRequiredOnCreate typing (#3737)
  • Improved handling of multiple slug types in type generation (#3698)
  • Fixed handling of GraphQL: false on globals when building policy type (#3729)

Webpack Bundling

  • Corrected Payload alias in webpack bundler (#3769)
  • Improved node_modules resolution in webpack bundler (#3744)

New Features

Opt Out of Type Generation Declare Statements

PayloadCMS now allows developers to opt out of type generation declare statements. This feature gives more flexibility in how TypeScript types are generated and used within your project, especially useful for projects with specific module resolution requirements or when integrating with other type systems.

PR: #3765

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

  • Webpack Bundling: Better node_modules resolution in the webpack bundler improves build performance and reliability (#3744)

  • Admin UI: Refined drawer and blur styles for smoother UI interactions

  • Dependencies: Updated Sass dependency to improve styling compilation performance (#3768)

Impact Summary

PayloadCMS v2.0.11 is primarily a bug fix release with one new feature for TypeScript users. The impact is positive across several areas of the CMS:

For developers using TypeScript, the release improves type generation and adds flexibility with the option to opt out of declare statements. Frontend developers benefit from fixed live preview functionality, especially when working with uploads and relationships. Backend developers using PostgreSQL will find critical fixes for block and array inserts.

The admin UI receives several quality-of-life improvements including better handling of file uploads, improved focal point rendering, and accessibility enhancements. The webpack bundling improvements ensure better module resolution, which helps with build reliability.

Overall, this release enhances stability and developer experience without introducing breaking changes, making it a recommended upgrade for all PayloadCMS users.

Full Release Notes

2.0.11 (2023-10-19)

Features

  • add ability to opt out of type gen declare statement (#3765)

Bug Fixes

  • corrects versions collection casing (#3739)

  • updates req after file resize (#3754)

  • correctly renders focal point when crop is set to false (#3759)

  • account for many slug types in generate types (#3698)

  • handle graphQL: false on globals when building policy type (#3729)

  • renders id as fallback title in DeleteDocument (#3745)

  • properly handles hideAPIURL (#3721)

  • filesRequiredOnCreate typing, tests, linting (#3737)

  • webpack-bundler: corrects payload alias (#3769)

  • bundler-webpack: better node_modules resolution (#3744)

  • db-postgres: block and array inserts error (#3714)

  • live-preview: properly handles uploads and hasOne monomorphic relationships (#3719)

Statistics:

File Changed108
Line Additions3,164
Line Deletions1,423
Line Changes4,587
Total Commits33

User Affected:

  • Can now opt out of type generation declare statements
  • Benefit from fixed type generation for slugs and filesRequiredOnCreate
  • Improved typing for GraphQL policies when globals have GraphQL disabled

Contributors:

jacobsfletchdenolfeJarrodMFleschdiesieben07DanRibbensxHomujessrynkar