Home

>

Tools

>

Payload CMS

>

Releases

>

3.0.0-beta.113

Payload CMS Release: 3.0.0-beta.113

Pre Release

Tag Name: v3.0.0-beta.113

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

PayloadCMS v3.0.0-beta.113 brings important bug fixes and new features to enhance developer experience. Key improvements include fixes for React select fields, useAuth generics, Drizzle hasMany joins, and CommonJS exports for withPayload. New features include Sentry plugin updates for v3.0 and Slovenian language support. This release focuses on improving stability and expanding internationalization capabilities.

Highlight of the Release

    • Fixed React select fields not increasing height when items overflow
    • Updated Sentry plugin to version 3.0 with enhanced configuration options
    • Added Slovenian language support
    • Fixed CommonJS exports for withPayload in Next.js configurations
    • Improved Drizzle database adapter with fixes for hasMany joins

Migration Guide

No major migration steps are required for this beta release. However, if you're using the Sentry plugin, you should update to the new configuration format:

// New format for Sentry plugin
sentryPlugin({
  options: {
    captureErrors: [400, 403],
    context: ({ defaultContext, req }) => {
      return {
        ...defaultContext,
        tags: {
          locale: req.locale,
        },
      }
    },
    debug: true,
  },
  Sentry,
})

If you're using withPayload with CommonJS in Next.js configuration, you can now properly import it:

const { withPayload } = require('@payloadcms/next/withPayload')

Upgrade Recommendations

This beta release contains important bug fixes and feature enhancements that improve stability and developer experience. We recommend upgrading if you:

  1. Use the Sentry plugin and want to take advantage of the updated version
  2. Need Slovenian language support
  3. Are experiencing issues with React select fields overflow
  4. Use withPayload in CommonJS environments
  5. Work with hasMany relationships in Drizzle

As this is a beta release, thoroughly test your application after upgrading to ensure compatibility with your specific implementation.

Bug Fixes

UI Improvements

  • Fixed React select fields not increasing height when items overflow, ensuring all options remain visible and accessible

TypeScript and API Fixes

  • Corrected useAuth generics to fix regression introduced in PR #8600
  • Improved setUser type in auth provider to use the generic from useAuth
  • Fixed sanitization of virtual fields in admin.useAsTitle, preventing errors when virtual fields are used as titles
  • Fixed CommonJS exports for withPayload, enabling proper usage in Next.js config files:
const { withPayload } = require('@payloadcms/next/withPayload')

const nextConfig = {
  // Your Next.js config here
  experimental: {
    reactCompiler: false,
  },
}

module.exports = withPayload(nextConfig)

Drizzle Database Adapter Fixes

  • Fixed issues with hasMany joins in the Drizzle adapter:
    • Properly handles hasMany: true with localized: true on foreign fields
    • Adds limit to subqueries instead of using hardcoded values
    • Adds schema path field.on to subqueries to prevent conflicts when using multiple relationship fields to the same collection
    • Improved detection of hasMany fields

New Features

Sentry Plugin Update to 3.0

The Sentry plugin has been updated to version 3.0, providing better error tracking capabilities. The updated plugin offers enhanced configuration options:

sentryPlugin({
  options: {
    captureErrors: [400, 403],
    context: ({ defaultContext, req }) => {
      return {
        ...defaultContext,
        tags: {
          locale: req.locale,
        },
      }
    },
    debug: true,
  },
  Sentry,
})

Slovenian Language Support

PayloadCMS now includes Slovenian language support, expanding the internationalization capabilities of the platform. This addition helps developers create more inclusive applications for Slovenian-speaking users.

Security Updates

No specific security fixes were included in this release.

Performance Improvements

Development Environment Improvements

  • Optimized Next.js configuration by not using withSentryConfig for development and e2e testing when not needed, preventing errors during e2e tests with Playwright extension

Multi-tenant Example Improvements

  • Updated multi-tenant example with optional tenant-based cookie handling by domain
  • Consolidated examples by removing the 2.0 multi-tenant example and updating examples/multi-tenant-single-domain to examples/multi-tenant

Impact Summary

This release focuses on improving developer experience and fixing several important bugs. The updates to the Sentry plugin provide better error tracking capabilities, while the addition of Slovenian language support expands internationalization options.

Bug fixes for React select fields improve the admin UI experience, and the corrections to useAuth generics and withPayload exports enhance TypeScript support and compatibility with different module systems. The Drizzle database adapter fixes address issues with hasMany relationships, particularly when used with localization.

Documentation improvements for i18n provide clearer guidance on implementing custom translations, especially in custom components. Overall, this beta release brings PayloadCMS closer to a stable 3.0 release by addressing key issues and expanding functionality.

Full Release Notes

v3.0.0-beta.113 (2024-10-10)

🚀 Features

🐛 Bug Fixes

  • commonjs exports missing for withPayload (#8643) (d0a5560)
  • sanitize virtual fields in admin.useAsTitle (#8620) (fdebc84)
  • corrects useAuth generics (#8627) (5e94d9b)
  • drizzle: hasMany joins - localized, limit and schema paths (#8633) (f6acfdb)
  • ui: react select fields not increasing height when items overflow (#8618) (f507530)

🤝 Contributors

Statistics:

File Changed176
Line Additions10,372
Line Deletions17,016
Line Changes27,388
Total Commits17

User Affected:

  • Fixed CommonJS exports for withPayload, enabling proper usage in Next.js config files
  • Corrected useAuth generics for better TypeScript support
  • Updated Sentry plugin to version 3.0 with enhanced configuration options
  • Improved Drizzle database adapter with fixes for hasMany joins

Contributors:

paulpopusJarrodMFleschr1tsuuPatrikKozakdenolfeGregorGabricGermanJablo