Home

>

Tools

>

Strapi

>

Releases

>

4.6.1

Strapi Release: 4.6.1

Tag Name: v4.6.1

Release Date: 2/8/2023

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.6.1 is a maintenance release that focuses on bug fixes and enhancements to improve stability and performance. Key improvements include better handling of deeply nested components, support for AVIF image format, enhanced webhook payloads with populated relations, and various admin UI optimizations. The release also introduces Patreon as a new OAuth2 provider and adds size limits for upload providers. Several dependencies have been updated, and translations for Euskara have been added to the Admin UI.

Highlight of the Release

    • Fixed performance degradation with deeply nested components
    • Added support for AVIF image format in the upload plugin
    • Enhanced webhook payloads with populated relations
    • Added Patreon as a new OAuth2 provider in Users & Permissions
    • Improved JSON input field in the Content Manager
    • Added size limits for upload providers
    • Enhanced audit logs with filtering capabilities
    • Added Euskara (Basque) translation for Admin UI

Migration Guide

This is a patch release (v4.6.0 → v4.6.1) with no breaking changes, so upgrading should be straightforward.

Steps to upgrade:

  1. Update your dependencies:

    npm install [email protected] --save
    # or
    yarn upgrade [email protected]
    
  2. Update related packages: If you're using other Strapi packages, make sure to update them to the same version:

    npm install @strapi/[email protected] @strapi/[email protected] @strapi/[email protected] --save
    # or
    yarn upgrade @strapi/[email protected] @strapi/[email protected] @strapi/[email protected]
    
  3. Check for sharp compatibility: If you're using macOS < 11, you might need to ensure you're using a compatible version of sharp:

    npm install [email protected] --save
    # or
    yarn add [email protected]
    
  4. Restart your Strapi application:

    npm run develop
    # or
    yarn develop
    

No database migrations or configuration changes are required for this update.

Upgrade Recommendations

Priority: Medium

This release contains important bug fixes and performance improvements, particularly for applications with deeply nested components or those using webhooks with populated relations. The security updates are also valuable for maintaining a secure application.

Who should upgrade immediately:

  • Users experiencing performance issues with deeply nested components
  • Users working with webhooks and populated relations
  • Users on macOS < 11 who are having issues with the sharp library
  • Users who need AVIF image format support
  • Users requiring Patreon OAuth integration
  • PostgreSQL users with schema configurations

When to upgrade:

We recommend upgrading to v4.6.1 during your next scheduled maintenance window. While there are no breaking changes, it's always good practice to test the upgrade in a staging environment before applying it to production.

The upgrade process is straightforward and should not cause any disruption to your application's functionality.

Bug Fixes

  • Performance Degradation: Fixed significant performance issues when working with deeply nested components.

  • Webhook Payloads: Resolved issues with webhook and lifecycle payloads when using populated relations.

  • JSON Input Validation: Fixed validation for required JSON fields, now properly showing errors when empty.

  • Relations in Required Components: Fixed an issue where relation paths weren't being applied correctly.

  • Custom Inputs Re-rendering: Fixed a bug where custom input hooks were being re-rendered unnecessarily.

  • AttributeIcon in Content Type Builder: Fixed display issues with attribute icons in the Content Type Builder.

  • PostgreSQL Schema Users: Fixed hasTable being undefined for PostgreSQL schema users.

  • Upload Plugin Relations: Fixed an issue where file upload related fields were returning null by adding populate query to the findOne method.

  • Data Import on Linux Alpine: Fixed data import functionality on Linux Alpine distributions.

  • Email Configuration: Fixed configuration example for the nodemailer provider.

  • JSONL Parsing: Improved error handling when parsing invalid JSONL files during imports.

  • Audit Logs: Fixed issues with audit logs table naming and authentication strategy checking.

New Features

  • Patreon OAuth2 Provider: Added Patreon as a new OAuth2 provider in the Users & Permissions plugin, expanding authentication options for your applications.

  • Upload Provider Size Limits: Added configurable size limits for all upload providers, giving administrators more control over file uploads.

  • Audit Log Filters: Enhanced the audit logs interface with filtering capabilities, making it easier to search and analyze user activities.

  • Euskara Translation: Added Basque language support to the Admin UI, improving accessibility for Euskara-speaking users.

  • useInjectReducer Hook: Added a new hook for better state management in the admin panel.

  • Async Utility Functions: Added new async utility functions like mapAsync and forEachAsync for better performance with asynchronous operations.

  • Tracking System: Implemented a tracking system for content types and components per user/project, providing better insights into application structure.

Security Updates

  • HTTP Cache Semantics: Updated http-cache-semantics from 4.1.0 to 4.1.1 to address security vulnerabilities.

  • Audit Logs Authentication: Improved security by checking authentication strategy before logging events in audit logs, ensuring proper tracking of user activities.

  • Dependencies Updates: Several dependencies were updated to their latest versions to address potential security vulnerabilities:

    • better-sqlite3 from 7.4.6 to 7.6.2
    • cloudinary from 1.30.1 to 1.33.0
    • immer from 9.0.15 to 9.0.19
    • inquirer from 8.2.4 to 8.2.5

Performance Improvements

  • Deeply Nested Components: Significantly improved performance when working with deeply nested components by optimizing the component creation process.

  • Async Operations: Added new utility functions like mapAsync and forEachAsync to improve performance with asynchronous operations, particularly useful for database operations.

  • Browser Compatibility: Updated browserslist configuration to exclude dead browsers (like IE), which can lead to smaller and more efficient builds.

  • Webpack Optimizations: Updated webpack dependencies and loaders for better build performance.

  • Database Client Updates: Bumped database client versions for better performance and compatibility.

  • JSON Input Field: Optimized the JSON input field in the Content Manager to better handle large JSON objects.

Impact Summary

Strapi v4.6.1 is a maintenance release that brings significant improvements to performance, stability, and user experience. The most notable enhancements include fixing performance issues with deeply nested components, adding support for AVIF image format, improving webhook payloads with populated relations, and adding Patreon as an OAuth2 provider.

For developers, this release offers better performance and more reliable API responses, especially when working with complex content structures. The new async utility functions and fixes for the upload plugin will improve development workflows and reduce bugs.

Content editors will benefit from an improved JSON input field with better validation and support for the modern AVIF image format, which offers better compression and quality than older formats.

Administrators gain enhanced audit logs with filtering capabilities, size limits for upload providers, and a new OAuth2 provider option with Patreon. International users will appreciate the addition of Euskara (Basque) language support and improved Russian translations.

Overall, this release focuses on stability, performance, and quality-of-life improvements rather than introducing major new features, making it a recommended upgrade for all Strapi users.

Full Release Notes

💅 Enhancement

  • [core:data-transfer] Import/Export error full disk (#15633) @christiancp100
  • [core:admin] replace axiosInstance with getFetchClient inside the admin (#15245) @simotae14
  • [core:admin] Add new useInjectReducer() hook (#15570) @gu-stav
  • [core:admin] Browserslist: exclude dead browsers (#15597) @gu-stav
  • [core:admin] Jest: Collect coverage for ee admin folders (#15695) @gu-stav
  • [core:admin] EE Add audit log filters (#15735) @markkaylor
  • [core:data-transfer] [DEITS] Import: Add specific error messages and only allow importing valid extensions (#15598) @innerdvations
  • [core:strapi] Tracking system, number of content types and components per user/project (#14900) @christiancp100
  • [core:strapi] Update where.js (#15046) @HastaCs
  • [core:upload] Add support to upload cloudinary file to specific folder with path variable (#13919) @angelbanderasudg
  • [core:upload] replace axiosInstance with getFetchClient inside the upload (#15599) @simotae14
  • [core:utils] feat(async-utils): map (#15611) @nathan-pichon
  • [plugin:users-permissions] Add Patreon as an Oauth2 Provider in the Users & Permissions plugin (#15216) @tomscytale
  • [plugin:users-permissions] replace axiosInstance with getFetchClient inside the users-permissions (#15350) @simotae14

🔥 Bug fix

  • [core:admin] EE Rename audit logs table name (#15719) @remidej
  • [core:admin] EE Check auth strategy to log events on audit logs (#15708) @Feranchz
  • [core:content-manager] Fix: Webhook & lifecyles payload with populated relations (#15363) @Marc-Roig
  • [core:content-manager] [content manager] Return required error if empty for json input (#15687) @markkaylor
  • [core:content-manager] [relations]: we should always try and apply the relation paths if they exist (#15720) @joshuaellis
  • [core:content-manager] [CustomInputs]: handle the hook being re-rendered (#15744) @joshuaellis
  • [core:content-type-builder] [CTB]AttributeIcon - Fixing issue #15413 (#15656) @jhoward1994
  • [core:content-type-builder] Point CTB to the marketplace custom field category (#15733) @remidej
  • [core:data-transfer] [DEITS] import command should throw jsonl parse errors (#15639) @innerdvations
  • [core:data-transfer] Fix data import on linux alpine (#15737) @akcyp
  • [core:database] Fix hasTable is undefined for schema postgres users (#15702) @petersg83
  • [core:email] Fix configuration example for nodemailer provider (#15387) @johannchopin
  • [core:strapi] Fix: Performance degradation with deep nested compos (#15643) @Marc-Roig
  • [core:upload] Add media sizeLimit for every provider (#14398) @Marc-Roig
  • [core:upload] fix(upload): add populate query to findOne method (#15490) @nathan-pichon
  • [core:upload] [Fix]: Support avif image format in upload plugin (#15669) @Marc-Roig
  • [core:upload] fix(upload-local-provider): use package require instead of absolute path (#15750) @nathan-pichon
  • [dependencies] fix sharp version for macOS < 11 (#15725) @Boegie19

⚙️ Chore


📚 Update and Migration Guides

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

Statistics:

File Changed300
Line Additions6,901
Line Deletions5,666
Line Changes12,567
Total Commits250

User Affected:

  • Better performance with deeply nested components
  • Enhanced webhook payloads with populated relations
  • New async utility functions for better performance
  • Fixed issues with the upload plugin and file relations
  • Improved error handling for data imports

Contributors:

simotae14fdel-cardependabot[bot]sergixnetpetersg83innerdvationsc3pxuoMarc-Roigjoshuaellismarkkaylornathan-pichonHastaCsronronscelesteschristiancp100remidejmaccomaccomaccomaccojhoward1994derrickmehaffyConvlyFeranchzBoegie19akcyp