1.5.0 (2023-01-04)
Bug Fixes
- json field type (73b8ba3)
Tag Name: v1.5.0
Release Date: 1/4/2023
Payload CMSPayload 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.
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.
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.
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.
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.
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.
Resolved various styling issues and improved error handling in the Monaco Editor integration, ensuring a smoother editing experience.
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.
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:
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.
The Monaco Editor integration now includes i18n support, making the code and JSON editing experience available in multiple languages.
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.
No specific security fixes were included in this release.
This release replaces Babel with SWC (Speedy Web Compiler) for transpilation, which provides significant performance improvements:
SWC is written in Rust and can be up to 20x faster than Babel in some scenarios, making the development experience much more efficient.
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.