Home

>

Tools

>

Strapi

>

Releases

>

5.0.0-beta.1

Strapi Release: 5.0.0-beta.1

Pre Release

Tag Name: v5.0.0-beta.1

Release Date: 3/27/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.1 brings significant improvements to the TypeScript type system, enhanced upgrade tooling with React file support, and several performance optimizations. This release includes a new create-strapi package, migration of upload and documentation plugins to TypeScript, and various fixes for Enterprise Edition features. The release also removes global Strapi dependencies in favor of more modular code architecture and improves developer experience with better logging and configuration support.

Highlight of the Release

    • Refactored TypeScript type system with improved namespaces and organization
    • Enhanced upgrade tooling with React file support and persistence of codemod modifications
    • New create-strapi package for easier project initialization
    • Migration of upload and documentation plugins to TypeScript
    • Improved relation handling with fixed positional arguments and counting

Migration Guide

TypeScript Type System Changes

If you're using TypeScript in your Strapi project, you'll need to update your imports:

  1. Replace Strapi type imports with Core.Strapi/LoadedStrapi from @strapi/types
  2. Update any references to the old namespace structure to use the new organization

React Router DOM Dependency

The release includes a codemod to update react-router-dom dependency. If you're manually upgrading:

  1. Ensure your package.json has the correct version of react-router-dom
  2. Update any imports that might have changed in the new version

Plugin Development

If you're developing plugins:

  1. The old plugin generator has been removed in favor of plugin:init
  2. Use the new TypeScript types for plugin development
  3. Update any code that relied on the global Strapi instance to use the provided instance instead

SQLite Users

If you're using SQLite:

  1. The better-sqlite3 package has been upgraded
  2. The package will only be added when SQLite is detected in use

Upgrade Recommendations

For Developers Testing Strapi v5 Beta

This is a beta release with significant improvements to the TypeScript type system and internal architecture. We recommend upgrading to this version if you're already using v5.0.0-beta.0 and want to benefit from the latest enhancements and bug fixes.

Upgrade Path:

  1. Update your dependencies to v5.0.0-beta.1
  2. Run the upgrade codemods if applicable to your project
  3. Test thoroughly, especially if you're using TypeScript or custom plugins

Caution:

  • This is still a beta release and may contain breaking changes
  • If you're using TypeScript, review your imports as the type system has been refactored
  • If you've built custom plugins, test them thoroughly with this release

Not Recommended For:

  • Production environments
  • Projects that cannot tolerate potential breaking changes

Bug Fixes

Content Management Fixes

  • Fixed relation positional arguments
  • Fixed cache issues in content releases
  • Fixed Content Type Builder not reloading after save
  • Fixed audit log sorting
  • Fixed review workflows navigation

Configuration and Build Fixes

  • Fixed support for array paths in config provider
  • Fixed build issues following latest TypeScript type system changes
  • Fixed incorrect type imports after type system changes
  • Fixed typegen to use current working directory instead of __dirname
  • Only add better-sqlite3 package when SQLite is being used

Enterprise Edition Fixes

  • Fixed various Enterprise Edition issues including audit logs and review workflows
  • Fixed content manager test
  • Fixed refresh and update of initial state after successful save

New Features

Type System Improvements

  • Refactored type system namespaces for better organization and usability
  • Added default parameter to Schema.Attributes for improved type inference
  • Added TypeDoc configuration for better documentation generation

Upgrade Tool Enhancements

  • Added support for React files in codemods
  • Added persistence of modifications during upgrade process
  • Added support for running codemods on plugins
  • Created codemods for react-router-dom dependency upgrade
  • Added codemod to remove @strapi/plugin-i18n dependency from package.json

New Packages and Features

  • Added new create-strapi package for easier project initialization
  • Migrated upload plugin to TypeScript
  • Migrated documentation plugin to TypeScript
  • Added bulk actions renderer for content releases
  • Added schema diffing to identify unknown attributes in history feature

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Architecture Improvements

  • Removed global Strapi dependencies in favor of more modular code
  • Introduced query-params service to remove global Strapi dependency in utils
  • Reintegrated policy logic into core for better performance
  • Removed usage of Strapi global in traverse utilities
  • Inverted control of contentAPI sanitize and validate functions

Logging and Configuration

  • Changed default log level to HTTP for better performance and readability
  • Added server start and shutdown logging for better monitoring
  • Changed default test log level to warn for cleaner test output

Impact Summary

Strapi v5.0.0-beta.1 represents a significant step forward in the v5 development cycle, focusing on TypeScript improvements, developer experience, and architectural refinements. The refactored type system provides better organization and usability for TypeScript users, while the enhanced upgrade tooling makes migration easier with React file support and persistent modifications.

The introduction of the create-strapi package streamlines project initialization, and the migration of core plugins like upload and documentation to TypeScript demonstrates Strapi's commitment to full TypeScript support. The removal of global Strapi dependencies in favor of more modular code improves maintainability and performance.

For content editors, fixes to relation handling, Content Type Builder reloading, and content releases enhance the day-to-day experience. Administrators will benefit from improved Enterprise Edition features and better logging capabilities.

This beta release continues to refine the v5 architecture while addressing important bugs and adding valuable features, making it a worthwhile upgrade for developers already testing the v5 beta.

Full Release Notes

What's Changed

Full Changelog: v5.0.0-beta.0...v5.0.0-beta.1

Statistics:

File Changed300
Line Additions3,335
Line Deletions2,742
Line Changes6,077
Total Commits133

User Affected:

  • Improved TypeScript support with refactored type system namespaces
  • Enhanced upgrade tooling with React file support and better codemods
  • New `create-strapi` package for easier project initialization
  • Better logging with server start/shutdown messages and HTTP as default log level
  • Improved configuration with support for array paths in config provider

Contributors:

ConvlyFeranchzBassel17Marc-Roigchristiancp100innerdvationsalexandrebodinmadhurisandbhorjoshuaellismarkkaylor