Home

>

Tools

>

Strapi

>

Releases

>

4.0.5

Strapi Release: 4.0.5

Tag Name: v4.0.5

Release Date: 1/19/2022

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 v4.0.5 is a maintenance release focusing on bug fixes, translation updates, and enhancements. It addresses several critical issues including admin build failures, startup crashes, and environment path handling. The release also adds support for multiple new language translations and improves the developer experience with better plugin generation and error handling capabilities.

Highlight of the Release

    • Fixed admin build failures when removing optional plugins
    • Resolved non-shell host crash on startup issues
    • Added support for custom ENV_PATH configuration
    • Enhanced webhook functionality to allow creation/triggering with no events
    • Added PolicyError error class for better policy error handling
    • Improved plugin generation with automatic folder creation
    • Added or improved translations for 8 languages
    • Prepared for Node.js 16+ compatibility by addressing deprecated cluster.isMaster

Migration Guide

This is a patch release (v4.0.4 to v4.0.5) and should not require any specific migration steps. Simply update your Strapi version:

npm install [email protected]
# or
yarn upgrade [email protected]

For comprehensive migration guides between major versions, refer to the official Strapi migration documentation.

Upgrade Recommendations

This release contains important bug fixes and enhancements that improve stability and functionality. It's recommended for all Strapi v4.0.x users to upgrade to v4.0.5, especially if you:

  • Use custom ENV_PATH configurations
  • Run Strapi on non-shell hosts
  • Experience issues with admin builds when removing optional plugins
  • Need better webhook flexibility
  • Use the users-permissions plugin and have issues with confirmation URLs
  • Want to benefit from the latest translations

The upgrade is straightforward with minimal risk as this is a patch release focused on fixes and improvements without breaking changes.

Bug Fixes

  • Admin Build Failures: Fixed issues with admin build when removing optional plugins.
  • Custom ENV_PATH Support: Resolved problems with respecting custom ENV_PATH when setting API_TOKEN_SALT and JWT_SECRET.
  • Non-shell Host Crash: Fixed application crashes on startup when running on non-shell hosts.
  • Confirmation URL: Fixed missing API prefix in confirmation URLs for the users-permissions plugin.
  • Plugin UID: Removed incorrect plugin UID on content-types.
  • Admin Users: Fixed issues with hasMany admin users causing application crashes.
  • Empty Object Return: Fixed a bug that returned an empty object when the admin user value is null.

New Features

  • Interface Language Usage Metrics: Added tracking for interface language changes to provide better insights into language usage patterns.
  • PolicyError Error Class: Introduced a new error type specifically for use in policies, improving error handling and debugging.
  • Document Naming: Added document name functionality for better content identification in the admin panel.
  • Webhooks with No Events: Enabled the ability to create and trigger webhooks without specifying events, providing more flexibility.

Security Updates

No specific security fixes were mentioned in this release. However, the dependency updates may include security patches from the updated packages.

Performance Improvements

  • Node.js Compatibility: Prepared for deprecated cluster.isMaster in Node.js versions greater than 16.0.0, ensuring forward compatibility and optimal performance.
  • Dependency Updates: Updated several dependencies including glob (7.1.6 to 7.2.0) and @testing-library/jest-dom (5.14.1 to 5.16.1) for better performance and security.

Impact Summary

Strapi v4.0.5 is a maintenance release that brings important stability improvements and quality-of-life enhancements. The fixes for environment path handling, non-shell host crashes, and admin build failures address critical issues that could prevent proper application functioning.

The addition of PolicyError class improves error handling capabilities for developers, while the enhanced plugin generation streamlines the development workflow. Webhook improvements provide more flexibility for integration scenarios.

For international teams, the extensive translation updates across 8 languages make the admin interface more accessible. The preparation for Node.js 16+ compatibility ensures the application remains future-proof as Node.js continues to evolve.

Overall, this release focuses on stability, developer experience, and internationalization without introducing breaking changes, making it a recommended upgrade for all Strapi v4 users.

Full Release Notes

🐛 Bug fix

🌏 Translation

💅 Enhancement


📚 Migration guides can be found here 📚

Statistics:

File Changed93
Line Additions5,549
Line Deletions2,324
Line Changes7,873
Total Commits81

User Affected:

  • Fixed issues with custom ENV_PATH configuration for API_TOKEN_SALT and JWT_SECRET
  • Fixed admin build failures when removing optional plugins
  • Resolved non-shell host crash on startup
  • Added PolicyError error class for better error handling in policies
  • Improved plugin generation with automatic creation of CTs, middlewares, and policies folders

Contributors:

tillschwenekertanoabeleyrasunnysonxSergeiMezarlvk-vkderrickmehaffyduncanhsiehdobosmartonOleksiiKachanpetersg83davidroseboomsoupetteHichamELBSIivanThePleasantConvlyMuriloKakazuiicdiivincentbprodenik1981alexandrebodindependabot[bot]