TL;DR
Strapi v5.0.0-beta.7: Major Infrastructure Updates and Feature Enhancements
This beta release brings significant infrastructure changes including replacing Axios with native fetch, updating styled-components to v6, and enhancing the main navigation UI. Key features include improved webhook functionality, bulk publish/unpublish operations, and input validation for the content API. Several breaking changes are included that will require attention during migration.
Highlight of the Release
- Replaced Axios with native fetch API for all HTTP requests
- Updated styled-components to version 6 and Design System to 2.0.0-beta.3
- Enhanced webhook functionality with improved event management
- Refactored main navigation UI for better user experience
- Added input validation to content API create and update controllers
- Migrated bulk publish and unpublish operations to v5
Migration Guide
Breaking Changes Migration Guide
Axios to Native Fetch
If you have custom code that extends or relies on Axios in Strapi:
- Update any code that accesses Axios-specific properties or methods
- Replace Axios request configurations with fetch API options
- Update response handling to work with fetch's promise-based API
- Note that fetch doesn't automatically transform JSON responses
styled-components v6
If you're using styled-components in your custom code:
- Update imports to match v6 patterns
- Review usage of any deprecated APIs from v5
- Check for any styling issues caused by changes in the CSS generation
- Update any ThemeProvider usage according to v6 requirements
Content API Validation
The content API now validates input in create and update controllers:
- Review your API calls to ensure they match the expected schema
- Handle potential validation errors in your frontend code
- Test your create and update operations thoroughly after upgrading
Design System Update
With the update to Design System 2.0.0-beta.3:
- Review any custom components that extend or use Design System components
- Check for visual regressions in your custom admin extensions
- Update component imports if you're directly using Design System components
Upgrade Recommendations
This is a beta release (v5.0.0-beta.7) with significant infrastructure changes and breaking updates. We recommend:
-
For Production Environments: Wait for the stable v5.0.0 release unless you specifically need these beta features.
-
For Development/Testing Environments:
- Create a backup of your project before upgrading
- Review the breaking changes carefully
- Test thoroughly after upgrading, especially if you have:
- Custom code that uses Axios
- Extensions using styled-components
- Custom admin UI components
- Code that interacts with the content API
-
For Plugin Developers:
- Update your plugins to use native fetch instead of Axios
- Test with the new styled-components v6 and Design System
- Ensure compatibility with the new validation in content API controllers
When upgrading, follow the standard Strapi upgrade process and pay special attention to the breaking changes mentioned in the migration guide.
Bug Fixes
Database Operations
- Fixed an issue where foreign keys weren't properly dropped before dropping indexes, which could cause database migration failures
History Feature
- Fixed conditions for displaying missing relations in the history feature
- Improved relation handling during restore operations
Document Service
- Fixed pagination in the document service's findMany method
Test Fixes
- Fixed CMReleasesContainer test with proper entry ID typing
- Fixed various flaky unit tests throughout the codebase
- Resolved issues with webhook tests by asserting item deletion
New Features
Enhanced Webhook System
The webhook system has been significantly improved with a refactored event hub implementation. This includes better handling of publication methods to avoid triggering unnecessary webhooks and improved event management.
Main Navigation Refactoring
The main navigation has been completely refactored with improved UI components. This includes:
- Replaced Design System NavLink with admin NavLink
- Refactored user profile menu using the Menu component
- Added better accessibility with ARIA labels
- Improved UI interactions and styling
Bulk Operations for v5
Bulk publish and unpublish operations have been migrated to v5, providing better performance and reliability. The implementation now uses Strapi query directly for bulk publish operations and includes proper handling of draft relations.
Draft Management Improvements
When enabling draft and publish functionality on a content type, the system now properly discards drafts, ensuring data consistency and preventing orphaned draft entries.
Security Updates
No specific security fixes were mentioned in this release.
Performance Improvements
HTTP Request Performance
Replacing Axios with native fetch API provides several performance benefits:
- Reduced bundle size by removing a large dependency
- Native browser API utilization instead of a third-party library
- More efficient memory usage and reduced overhead
Database Operations
Improved database operations with better handling of foreign keys and indexes, which can lead to more efficient database migrations and queries.
Bulk Operations
The refactored bulk publish and unpublish operations are now more efficient, using direct Strapi queries instead of multiple individual operations.
Impact Summary
This beta release represents a significant step forward in Strapi v5's development with major infrastructure improvements. The replacement of Axios with native fetch reduces dependencies and modernizes the codebase. The styled-components update to v6 and Design System update to 2.0.0-beta.3 bring the latest UI capabilities but introduce breaking changes.
The enhanced webhook system provides more granular control over events, while the main navigation refactoring improves the admin UI experience. The addition of input validation to content API controllers enhances data integrity but may require adjustments to existing code.
For developers, this release requires careful attention to the breaking changes, particularly around HTTP requests and styling. Content editors will benefit from UI improvements and enhanced bulk operations. The release also includes numerous bug fixes and test improvements that enhance overall stability.
This beta continues to shape Strapi v5 with modern web standards and improved developer experience, though with the expected transitional challenges of a major version upgrade.