Home

>

Tools

>

Strapi

>

Releases

>

5.0.0-beta.9

Strapi Release: 5.0.0-beta.9

Pre Release

Tag Name: v5.0.0-beta.9

Release Date: 6/5/2024

Strapi LogoStrapi

Open-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.

TL;DR

Strapi v5.0.0-beta.9 brings significant improvements to the CMS with a focus on bulk actions, content management, and performance. This release includes the migration of bulk publish/unpublish functionality to v5, fixes for CORS middleware compliance, improved image processing with optimized sharp fragmentation and libvips caching, and enhanced validation for custom OAuth callbacks. Notable fixes address issues with content history, locale handling, and TypeScript definitions. The release also removes root-level nested parameters and introduces a local search plugin for documentation.

Highlight of the Release

    • Migration of bulk publish/unpublish functionality to v5
    • CORS middleware now compliant with intended specifications
    • Optimized image processing using file paths instead of streams
    • Enhanced validation for custom OAuth callbacks
    • Fixed content history tracking including clone actions
    • Removal of root-level nested parameters

Migration Guide

Removal of Root-Level Nested Parameters

If you were using root-level nested parameters in your queries, you'll need to update your code to use the new structure. This change was made to improve consistency and clarity in the API.

Example of deprecated usage:

// Deprecated
await strapi.entityService.findMany('api::article.article', {
  populate: {
    cover: {
      fields: ['url']
    }
  }
});

Updated usage:

// New approach
await strapi.entityService.findMany('api::article.article', {
  populate: {
    cover: {
      fields: ['url']
    }
  }
});

CORS Middleware Changes

The CORS middleware has been updated to be compliant with the intended specification. If you have custom CORS configurations, you may need to review and update them to ensure they work correctly with the new implementation.

Plugin CLI Replacement

The plugin CLI has been replaced with the external @strapi/sdk-plugin package. If you were using the plugin CLI directly, you'll need to update your dependencies and scripts to use the new package.

Upgrade Recommendations

For Beta Testers

If you're already testing Strapi v5 beta, we strongly recommend upgrading to v5.0.0-beta.9 to benefit from the numerous bug fixes and improvements. This release addresses several critical issues that could affect your development experience.

For Production Users

This is still a beta release and not recommended for production use. If you're currently using Strapi v4 in production, we recommend waiting for the stable release of v5 before upgrading.

Upgrade Process

To upgrade from a previous beta version:

  1. Update your dependencies in package.json:

    "dependencies": {
      "@strapi/strapi": "5.0.0-beta.9",
      "@strapi/plugin-users-permissions": "5.0.0-beta.9",
      "@strapi/plugin-i18n": "5.0.0-beta.9"
    }
    
  2. Run yarn install or npm install to update the packages.

  3. Review the migration guide for any breaking changes that might affect your application.

  4. Test thoroughly before deploying to any environment used by others.

Bug Fixes

Content Management Fixes

  • Fixed bulk publish modal only showing the first entry to be published
  • Fixed back button functionality on ListSettingsView
  • Fixed issue where content could be undefined in certain scenarios
  • Fixed bulk publish validation error handling
  • Fixed handling of modified entry status in bulk publish actions
  • Fixed discard action in non-default locales
  • Fixed Enterprise Edition not being extended due to missing default export

Internationalization Fixes

  • Fixed locale column display when i18n plugin is not installed
  • Added proper spacing to show locale values in the Content Manager
  • Fixed removal of i18n search params when navigating to content types without i18n
  • Fixed creation of locale column when migrating from v4

Database and API Fixes

  • Added prefixed alias to avoid join column name conflicts in database joins
  • Fixed validation for pluralName and collectionName in Content Type Builder
  • Fixed webhooks to ensure ID sent to client is always a string
  • Fixed fragment populate in countDraftRelations

New Features

Local Search Plugin

Added a new Local Search plugin for documentation, improving the search experience within the Strapi documentation.

Enhanced TypeScript Support

Added missing attributes to Media in the TypeScript generator, providing more comprehensive type definitions for media files.

Customized Localization Label Actions

Added support for customized localization label actions in content history, making it clearer when content has been localized.

Morph Attribute Count Support

Added ability for morph-like attributes to request a count in populate queries, enhancing the flexibility of the API.

Security Updates

Enhanced OAuth Validation

Added validation for custom Username & Password OAuth callbacks, making the default callback validation stricter. This improves security by ensuring that callback URLs are properly validated before being used in authentication flows.

Updated Security Policy

Updated SECURITY.md with changes related to Strapi 5 Beta, providing clearer guidance on security practices and vulnerability reporting for the new version.

Performance Improvements

Image Processing Optimization

Enhanced image processing by using file paths instead of streams, which optimizes sharp fragmentation and libvips caching. This change significantly improves memory usage and performance when handling images.

Database Query Optimization

Added prefixed aliases to avoid join column name conflicts, which improves the efficiency and reliability of database queries involving joins.

Context API Optimization

Replaced use-context-selector context with React Context, simplifying the codebase and potentially improving rendering performance.

Impact Summary

Strapi v5.0.0-beta.9 represents a significant step forward in the development of Strapi v5, with a focus on improving core functionality, fixing bugs, and enhancing performance. The migration of bulk actions to v5 improves content management workflows, while the optimization of image processing enhances performance for media-heavy applications.

Security improvements, particularly in OAuth validation, make this release more robust for authentication scenarios. The removal of root-level nested parameters may require code changes but leads to a more consistent API structure.

For developers, the enhanced TypeScript support and fixes to database queries provide a more reliable development experience. Content editors will appreciate the improved bulk actions and fixed content history tracking.

This beta release continues to refine the v5 experience, addressing feedback from early adopters and preparing for a stable release. While still not recommended for production, it provides a good opportunity for developers to test their applications against the upcoming major version and prepare for migration.

Full Release Notes

What's Changed

New Contributors

Full Changelog: v5.0.0-beta.8...v5.0.0-beta.9

Statistics:

File Changed190
Line Additions5,255
Line Deletions3,742
Line Changes8,997
Total Commits82

User Affected:

  • Benefit from improved CORS middleware compliance with intended specifications
  • Can use file paths instead of streams for optimized image processing
  • Need to adapt to removal of root-level nested parameters
  • Have access to enhanced TypeScript definitions for Media attributes
  • Can use the new Local Search plugin for documentation

Contributors:

pwizlaConvlysimotae14innerdvationsMarc-RoigderrickmehaffyalexandrebodinjoshuaellismarkkaylorFeranchzBassel17xdeelord24benjaminrobinetremidejmadhurisandbhor