Home

>

Tools

>

Payload CMS

>

Releases

>

Release 1.5.0

Payload CMS Release: Release 1.5.0

Tag Name: v1.5.0

Release Date: 1/4/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.5.0 introduces a new JSON field type and significantly improves the code editor experience by switching to Monaco Editor (the same editor powering VS Code). This release also includes a major performance boost by replacing Babel with SWC for faster development and build times. These changes enhance developer experience with better code editing capabilities and improved performance.

Highlight of the Release

    • New JSON field type for storing and editing JSON data with validation
    • Upgraded code editor using Monaco Editor (the editor that powers VS Code)
    • Significant performance improvements by replacing Babel with SWC
    • Internationalization support in the code editor
    • Better developer experience with improved syntax highlighting and editor features

Migration Guide

Migrating to Monaco Editor

If you were using custom configurations with the previous code editor, you'll need to update your configuration to work with Monaco Editor:

// Old configuration
{
  type: 'code',
  options: {
    // old editor options
  }
}

// New configuration
{
  type: 'code',
  admin: {
    editorProps: {
      // Monaco editor options
    }
  }
}

The same applies to the new JSON field type. Editor-specific props should now be placed in the admin.editorProps property.

SWC Migration

The switch from Babel to SWC should be transparent for most users. However, if you were using Babel-specific features or configurations in your Payload project, you may need to adapt them to work with SWC.

Upgrade Recommendations

This release includes significant improvements to the developer experience and introduces a new field type, making it a recommended upgrade for all Payload users.

For projects that heavily use code fields, the upgrade to Monaco Editor will provide a much better editing experience. The new JSON field type also adds valuable functionality for projects that need to store and edit JSON data.

The performance improvements from switching to SWC will benefit all users, especially those working on larger projects where build times can be a bottleneck.

To upgrade:

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

After upgrading, test your application thoroughly, especially if you're using custom code field configurations or have complex build processes.

Bug Fixes

JSON Field Type Fix

Fixed an issue with the JSON field type that was causing errors during validation and saving. The fix ensures that JSON data is properly validated and stored in the database.

Editor Styling and Error Handling

Resolved various styling issues and improved error handling in the Monaco Editor integration, ensuring a smoother editing experience.

New Features

JSON Field Type

A new JSON field type has been added to Payload, allowing developers to store and edit JSON data directly in the admin panel. The JSON field includes validation and a powerful editor experience powered by Monaco Editor.

Enhanced Code Field Editor

The code field editor has been completely revamped using Monaco Editor (the same editor that powers VS Code), providing a much better developer experience with features like:

  • Improved syntax highlighting
  • Better error detection
  • Enhanced editing capabilities
  • Support for JavaScript and TypeScript languages

Monaco Editor Integration

Both the new JSON field and the updated code field now use Monaco Editor, providing a consistent and powerful editing experience across different field types.

Internationalization Support for Editors

The Monaco Editor integration now includes i18n support, making the code and JSON editing experience available in multiple languages.

SWC Implementation

Replaced Babel with SWC for transpilation, resulting in significantly faster development and build times. This change improves the developer experience by reducing wait times during development.

Security Updates

No specific security fixes were included in this release.

Performance Improvements

SWC Replacement for Babel

This release replaces Babel with SWC (Speedy Web Compiler) for transpilation, which provides significant performance improvements:

  • Faster development server startup times
  • Quicker build processes
  • Reduced resource usage during development

SWC is written in Rust and can be up to 20x faster than Babel in some scenarios, making the development experience much more efficient.

Impact Summary

Payload CMS v1.5.0 delivers significant improvements to the developer and content editor experience through the introduction of a new JSON field type and a complete overhaul of the code editing experience using Monaco Editor.

The new JSON field type allows for structured data editing with validation, syntax highlighting, and error detection, making it easier to work with JSON data directly in the admin panel. The upgrade to Monaco Editor (the same editor powering VS Code) for both code and JSON fields provides a professional-grade editing experience with better syntax highlighting, error detection, and editing capabilities.

On the performance front, replacing Babel with SWC for transpilation results in significantly faster development and build times, which is especially beneficial for larger projects. This change reduces wait times during development and improves overall developer productivity.

These improvements collectively enhance Payload's capabilities as a developer-friendly CMS, making it more efficient and powerful for both developers and content editors.

Full Release Notes

1.5.0 (2023-01-04)

Bug Fixes

Features

Statistics:

File Changed87
Line Additions2,462
Line Deletions3,825
Line Changes6,287
Total Commits25

User Affected:

  • Benefit from a new JSON field type for storing and editing JSON data
  • Experience improved code editing with Monaco Editor integration
  • Enjoy faster development and build times with SWC replacing Babel
  • Can leverage better syntax highlighting and editor features in code and JSON fields

Contributors:

jessrynkarjmikrutDanRibbensJarrodMFlesch