Home

>

Tools

>

Strapi

>

Releases

>

5.0.0-beta.3

Strapi Release: 5.0.0-beta.3

Pre Release

Tag Name: v5.0.0-beta.3

Release Date: 4/10/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.3 brings significant improvements to the upgrade experience with enhanced codemods commands and CLI refactoring, making migration to v5 smoother. The release also features improved history functionality with relation data display, media deep filtering capabilities, and various UI enhancements. Core internal refactorings and document service API improvements provide a more robust foundation for the upcoming stable v5 release.

Highlight of the Release

    • Enhanced upgrade tool with refactored CLI and new codemods commands for v5 migration
    • Improved history functionality with relation data display and unknown fields support
    • Media deep filtering and relation shortcut filters for more powerful queries
    • Document service API improvements for better developer experience
    • Fixed cloning functionality to properly populate media and nested components

Migration Guide

Upgrading to v5.0.0-beta.3

  1. Update your dependencies:

    npm install @strapi/[email protected]
    

    or

    yarn add @strapi/[email protected]
    
  2. Use the enhanced upgrade CLI: The refactored upgrade CLI now includes new codemods commands to help with migration. Run:

    npx @strapi/strapi upgrade
    
  3. Document Service API Changes: If you're using the document service directly, note that methods now take a single argument object for better consistency.

  4. RBAC Middleware Changes: If you've extended the RBAC functionality, be aware that there's a new middleware implementation that uses curried functions.

  5. Review Core Refactorings: If you've extended Strapi's core functionality, review the internal core refactorings to ensure compatibility with your custom code.

Upgrade Recommendations

For developers working on v5 beta projects:

  • Recommended: Upgrade to v5.0.0-beta.3 to benefit from the enhanced upgrade tools, bug fixes, and new features.
  • Priority: Medium-High - This release contains significant improvements to the upgrade experience and fixes several important bugs.

For production v4 projects:

  • Not Recommended: Continue using the stable v4 release until v5 reaches stable status.
  • Consider exploring the v5 beta in a separate development environment to prepare for future migration.

Testing Advice

  • Test the new media deep filtering and relation shortcut filters thoroughly if your application relies heavily on complex queries.
  • If using the history feature, verify that relation data is displayed correctly.
  • Test content cloning functionality, especially with media and nested components.
  • If you've customized the admin panel, test with the new RBAC middleware to ensure compatibility.

Bug Fixes

Content Manager Fixes

  • Fixed issue with creating webhooks on an empty list page
  • Fixed cloning functionality to properly populate media and nested components
  • Prevented empty body when cloning content
  • Fixed issue with API tokens creation

URL and Path Handling

  • Fixed handling of relative BACKEND_URL by forcing absolute URLs
  • Fixed admin URL config for root path redirect

Other Fixes

  • Fixed i18N non-localized sync issue due to document service changes
  • Fixed polymorphic relations conflict between v4 and v5
  • Fixed flaky frontend unit tests for content releases

New Features

Enhanced Upgrade Tool for v5 Migration

The CLI has been refactored with new codemods commands to facilitate migration to v5. This includes multiple v5 codemods that help automate the transition process.

Media Deep Filtering & Relation Shortcut Filters

New filtering capabilities allow for more powerful and flexible queries, enabling deep filtering on media and providing shortcut filters for relations.

Improved History Functionality

The history feature now displays relation data in version responses, shows new and unknown fields, and provides a better UI for viewing historical content changes.

RBAC Middleware

A new RBAC middleware has been implemented to enhance role-based access control within the admin panel.

TypeDoc as Markdown

The type system now generates Markdown API reference documentation, making it easier to understand and use Strapi's TypeScript interfaces.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Package Updates

  • Updated Sharp package to version v0.33.3 for improved image processing
  • Updated Koa libraries for better server performance
  • Reverted @koa/cors upgrade to 5.0.0 due to breaking changes in the cors middleware
  • Updated Vite and webpack-dev-middleware for improved build performance

Internal Optimizations

  • Simplified components API in document service and improved typings
  • Improved middleware API for better performance
  • Refactored Link component to use v2 for better rendering performance

Impact Summary

Strapi v5.0.0-beta.3 represents a significant step forward in the v5 beta journey, focusing on improving the upgrade experience and enhancing core functionality. The refactored CLI with new codemods commands will make migration to v5 considerably easier for developers. Content editors will appreciate the improved history functionality with relation data display and better cloning capabilities.

The document service API improvements and internal core refactorings provide a more robust foundation for the upcoming stable v5 release, while new features like media deep filtering and relation shortcut filters offer more powerful query capabilities.

This release also addresses several important bugs, including issues with webhook creation, API token creation, and URL handling. The updates to various dependencies like Sharp, Koa libraries, and build tools ensure better performance and compatibility.

Overall, this beta release demonstrates Strapi's commitment to improving developer experience, content management capabilities, and system performance as it moves closer to a stable v5 release.

Full Release Notes

What's Changed

New Contributors

Full Changelog: v5.0.0-beta.2...v5.0.0-beta.3

Statistics:

File Changed300
Line Additions4,937
Line Deletions3,049
Line Changes7,986
Total Commits97

User Affected:

  • Benefit from improved upgrade tools with new codemods commands for easier v5 migration
  • Can use enhanced document service API for more streamlined development
  • Need to adapt to internal core refactorings if extending Strapi core functionality
  • Can leverage new media deep filtering and relation shortcut filters

Contributors:

mariansimecekalexandrebodinConvlyinnerdvationschristiancp100joshuaellismarkkaylorBassel17derrickmehaffyMattieBeltsimotae14jhoward1994remidejMarc-Roig