Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.69

Payload CMS Release: 3.0.0-beta.69

Pre Release

Tag Name: v3.0.0-beta.69

Release Date: 7/26/2024

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 v3.0.0-beta.69 brings significant improvements with new features like media metadata support, a Vue live preview package, Next.js root admin capabilities, and a new shared SQL code package for Drizzle. This release also addresses numerous bugs affecting MongoDB sorting, localization, authentication, and UI components, enhancing overall stability and user experience.

Highlight of the Release

    • Added support for appending metadata to output media files
    • Introduced @payloadcms/live-preview-vue package
    • Abstracted shared SQL code to a new Drizzle package
    • Added Next.js root admin capabilities
    • Fixed MongoDB sorting for international characters
    • Improved localization support in PostgreSQL
    • Enhanced UI components with better permission handling and translations

Migration Guide

Using the new withMetadata option

To append metadata to output media files, add the withMetadata option to your uploads configuration:

export const Media = {
  slug: 'media',
  upload: {
    staticURL: '/media',
    staticDir: 'media',
    imageSizes: [
      // your image sizes
    ],
    withMetadata: true, // Enable metadata appending
  },
};

MongoDB Collation

To use the new MongoDB collation feature:

export default buildConfig({
  db: {
    mongodb: {
      // Your MongoDB connection options
      collation: true, // Enable collation support
    }
  },
});

Using the Drizzle SQL Abstraction

If you're using Drizzle with Payload, you can now customize transaction options:

export default buildConfig({
  db: {
    drizzle: {
      // Your Drizzle configuration
      transactionOptions: {
        // Your transaction options
        // or set to false to disable transactions
      }
    }
  },
});

Upgrade Recommendations

This beta release (v3.0.0-beta.69) includes important bug fixes and new features that improve the stability and functionality of Payload CMS. If you're already using the v3 beta, upgrading is recommended, especially if you:

  1. Work with international characters and MongoDB sorting
  2. Use PostgreSQL with localized fields
  3. Need media metadata support
  4. Experience issues with email fields, authentication, or versioning

As this is still a beta release, thoroughly test your application after upgrading. The new features like Drizzle SQL abstraction and MongoDB collation are significant improvements but may require configuration changes.

Bug Fixes

Database Fixes

  • Fixed MongoDB sorting to properly handle international characters without giving precedence to regular characters (#7294)
  • Added optional MongoDB collation feature flag for improved text handling (#7361)
  • Fixed localized groups/tabs and nested fields in PostgreSQL (#6158)
  • Fixed relationship options filtering in PostgreSQL by relaxing equality checks (#7343)

UI Improvements

  • Fixed 'Create new' button visibility based on user permissions for media items (#7348)
  • Fixed checkbox translations in Where query selectors (#7309)
  • Fixed email field autocomplete attribute rendering (#7322)
  • Fixed upload fields' filterOptions not being respected in the admin UI (#7347)

Authentication & User Management

  • Fixed various issues with loginWithUsername functionality (#7311)
  • Improved types for authentication-related functions

Versioning & Localization

  • Fixed error thrown by first version document due to undefined latestPublished and latestDraft (#7314)
  • Fixed locale handling by using query.locale when present in createLocalReq (#7345)

Configuration & Plugins

  • Fixed package manager detection in CPA by adjusting command existence logic (#7297)
  • Fixed email adapter support for promises during config sanitization (#7326)
  • Fixed async webhooks typing in the Stripe plugin (#7317)

New Features

Media Metadata Support

Added a new withMetadata option to the uploads configuration that allows metadata to be appended to output media files, addressing a long-standing feature request (#6951).

Vue Live Preview Package

Added @payloadcms/live-preview-vue to the release pipeline, expanding the live preview functionality to Vue.js applications.

Drizzle SQL Abstraction

Created a new package that abstracts shared SQL code for Drizzle, improving code organization and maintainability. This includes:

  • New SQLite package (not yet ready for publishing)
  • Added transactionOptions to customize or disable database transactions
  • Added experimental schemaName property

Next.js Root Admin

Implemented root admin functionality for Next.js, allowing for better integration of the Payload admin panel within Next.js applications.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Database Performance

  • The new MongoDB collation option can improve text sorting and searching performance, especially for international characters
  • Abstracted SQL code in the new Drizzle package provides better optimization opportunities

Build Process

  • Disabled app-build-with-packed in CI to improve build times
  • Improved release pipeline with better organization of shared code

Impact Summary

This release significantly enhances Payload CMS with both new features and important bug fixes. The addition of media metadata support addresses a long-standing feature request, while the Vue live preview package expands frontend development options. Database improvements for both MongoDB and PostgreSQL provide better handling of international characters and localized fields.

The abstraction of shared SQL code to a new Drizzle package represents an important architectural improvement that will benefit future development. Next.js root admin capabilities enhance the integration options for developers using Next.js.

Multiple UI fixes improve the user experience for content editors, particularly around permissions, translations, and field rendering. Authentication and versioning fixes address core functionality issues that could impact system stability.

Overall, this release balances new features with important stability improvements, making it a valuable update for most Payload CMS users working with the v3 beta.

Full Release Notes

v3.0.0-beta.69 (2024-07-26)

Features

  • payload: allows metadata to be appended to the file of the output media (#7293) (b5afc62)
  • drizzle: abstract shared sql code to new package (#7320) (09ad6e4)
  • adds @payloadcms/live-preview-vue to release pipeline (#7328) (904ec01)
  • next: root admin (#7276) (863abc0)

Bug Fixes

  • filterOptions for upload fields (#7347) (70f2e16)
  • db-mongodb: adds new optional collation feature flag behind mongodb collation option (#7361) (8ba39aa)
  • ui: hide 'Create new' button entirely if user has no access to create a media item (#7348) (128d721)
  • attempts to use query.locale when present in createLocalReq (#7345) (2796d21)
  • relaxes equality check for relationship options in filter (#7343) (cbac62a)
  • db-postgres: localized groups/tabs and nested fields (#6158) (51f1c8e)
  • some email adapters not working if they're promises due to config sanitisation (#7326) (c129c10)
  • misc issues with loginWithUsername (#7311) (b2814eb)
  • ui: email field now correctly renders autocomplete attribute (#7322) (c405e59)
  • plugin-stripe: properly types async webhooks (#7317) (a35979f)
  • ui: Where query selectors for checkboxes are now translated (#7309) (b9cf6c7)
  • first version doc throws error (#7314) (f2b3305)
  • db-mongodb: removes precedence of regular chars over international chars in sort (#7294) (b3e8ddf)
  • cpa: check cmd exists after first checking flag and lock file (#7297) (83ad453)

Contributors

Statistics:

File Changed300
Line Additions6,723
Line Deletions2,339
Line Changes9,062
Total Commits25

User Affected:

  • Can now append metadata to output media files with the new `withMetadata` option
  • Benefit from improved MongoDB sorting with international characters
  • Can use the new Vue live preview package for frontend development
  • Have access to a new shared SQL code package for Drizzle
  • Can implement Next.js root admin for better admin panel integration

Contributors:

denolfejacobsfletchPatrikKozakjessrynkarpaulpopusDanRibbensr1tsuuJarrodMFleschjmikrut