Home

>

Tools

>

Strapi

>

Releases

>

5.1.0

Strapi Release: 5.1.0

Tag Name: v5.1.0

Release Date: 10/16/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.1.0 introduces several UI enhancements, new features for content preview and documentation, and important bug fixes. The upgrade includes a new "latest" upgrade command, improved OpenAPI documentation support, and security updates through dependency upgrades. This release focuses on improving the content management experience with preview capabilities and fixing critical issues with relations and localization.

Highlight of the Release

    • New preview panel button and copy preview URL functionality for better content preview workflows
    • Added 'latest' upgrade command to simplify version management
    • Improved OpenAPI documentation with mapping property support for better component representation
    • Fixed critical issues with user roles when connecting relations
    • Made locale/localizations fields private for non-localized content types
    • Security enhancements through multiple dependency upgrades

Migration Guide

Upgrade Instructions

To upgrade to Strapi v5.1.0, you can use the following commands:

# Using yarn
yarn upgrade [email protected] --exact

# Using npm
npm install [email protected] --save --exact

Alternatively, you can use the new latest upgrade command:

npx @strapi/upgrade latest

Changes to Note

  • Locale/Localizations Fields: These fields are now private for non-localized content types. If you were relying on these fields being public, you'll need to update your code.
  • Relations Handling: The way IDs are sent when connecting relations has been updated, particularly affecting user role updates.
  • OpenAPI Documentation: If you're using the documentation plugin, the OpenAPI spec generation has been improved with better component representation.

For more detailed information:

Upgrade Recommendations

Recommendation Level: Standard Upgrade

This release contains important bug fixes, UI improvements, and new features that enhance the content management experience. The security updates to dependencies also make this a worthwhile upgrade.

Who should upgrade immediately:

  • Users experiencing issues with user role updates when connecting relations
  • Projects using internationalization with non-localized content types
  • Teams that want to leverage the new preview functionality
  • Developers using the documentation plugin who need better OpenAPI representation

Upgrade Timing:

  • For production environments: Plan the upgrade during a maintenance window after testing in a staging environment
  • For development environments: Can be upgraded immediately

There are no major breaking changes reported in this release, making it a relatively safe upgrade from v5.0.6.

Bug Fixes

Content Management Fixes

  • Fixed empty components wording to improve clarity (#21630)
  • Fixed issue with sending IDs when connecting relations to update user & permissions user role (#21726)
  • Fixed broken list view pagination (#21800)

Internationalization Fixes

  • Made locale/localizations fields private for non-localized content types (#21495)
  • Fixed issue with displaying fill from locales when i18n is not enabled (#21737)

UI and Translation Fixes

  • Fixed various UI issues and improved French translations (#21633)

New Features

New Preview Features

  • Added a preview panel button to the content manager for easier content previewing (#21776)
  • Added a copy preview URL button for sharing content previews (#21780)

Upgrade Command Improvements

  • Added new latest upgrade command to simplify upgrading to the latest version (#21754)
  • Enhanced logging and improved error handling in the upgrade utility (#21751)

Documentation Plugin Enhancements

  • Added mapping property support for OpenAPI generated documentation (#21752)
  • Improved representation of dynamic zones in OpenAPI docs using discriminator and mapping
  • Added logic to convert component names to OpenAPI names

Security Updates

Security Dependency Updates

  • Upgraded mysql2 package to 3.9.8 to address security vulnerabilities (#21795)
  • Upgraded sendgrid-mail to 8.1.3 to patch security issues (#21797)
  • Upgraded koa/router to 12.0.2 to improve security (#21802)

Performance Improvements

Testing and CI/CD Improvements

  • Added test workflow filters for each test type (#21770)
  • Fixed test CI/CD building repository 2 times (#21740)
  • Fixed MySQL workflow (#21801)

Dependency Optimizations

  • Upgraded mysql2 package to 3.9.8 for improved performance and security (#21795)
  • Upgraded koa/router to 12.0.2 for better routing performance (#21802)
  • Upgraded sendgrid-mail to 8.1.3 for improved email handling (#21797)

Impact Summary

Strapi v5.1.0 brings significant improvements to the content management experience with new preview capabilities and UI enhancements. The addition of a preview panel button and copy preview URL functionality streamlines content review workflows for editors. Developers will benefit from the new latest upgrade command, improved OpenAPI documentation support, and enhanced upgrade utilities.

Critical bug fixes address issues with user roles when connecting relations, list view pagination, and internationalization handling. The release also improves security through multiple dependency upgrades, including mysql2, sendgrid-mail, and koa/router.

The changes to locale/localization fields visibility for non-localized content types may require attention from developers who were relying on these fields being public. Overall, this release focuses on quality-of-life improvements for content editors while providing developers with better tools and documentation.

Full Release Notes

🔥 Bug fix

  • [core:admin] fix: changed empty components wording (#21630) @lucasboilly
  • [core:content-manager] fix: send ids when connecting relations to update u&p user role (#21726) @Marc-Roig
  • [plugin:i18n] fix: Make locale/localizations private for non-localized cts (#21495) @Convly

💅 Enhancement

  • [core:content-manager] enhancement: add preview panel button (#21776) @remidej
  • [plugin:documentation] feat: add mapping property support for documentation plugin's open api generated docs (#21752) @schimini
  • [utils:upgrade] enhancement: Update "upgrade major" rules (#21745) @Convly
  • [utils:upgrade] enhancement(upgrade): Enhanced Logging, and Improved Error Handling (#21751) @Convly

🚀 New feature

  • [utils:upgrade] feat: Add upgrade 'latest' Command (#21754) @Convly

🚨 Security

📚 Update and Migration Guides

  • General update guide can be found here
  • Migration guides can be found here 📚

Statistics:

File Changed92
Line Additions738
Line Deletions329
Line Changes1,067
Total Commits20

User Affected:

  • Improved UI with better empty components wording
  • New preview panel button for easier content previewing
  • Copy preview URL button for sharing content previews
  • Fixed pagination in list views

Contributors:

lucasboillyBoegie19Marc-RoigremidejinnerdvationsschiminiConvlyalexandrebodin