Home

>

Tools

>

Strapi

>

Releases

>

4.2.2

Strapi Release: 4.2.2

Tag Name: v4.2.2

Release Date: 6/29/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.2.2 is a maintenance release that brings significant performance improvements for database operations, especially for MySQL/MariaDB and PostgreSQL when handling foreign key references. It also enhances the marketplace experience, adds new translations (Hindi, Chinese, Polish), fixes several bugs in the admin UI and upload plugin, and improves developer productivity with React Refresh integration.

Highlight of the Release

    • Significant performance improvements for database operations with foreign key references in MySQL/MariaDB and PostgreSQL
    • Enhanced marketplace experience showing installed providers as already installed
    • Added support for filtering on nested components in GraphQL
    • Fixed image dimensions handling for SVG and GIF formats
    • Added Hindi translation and improved Chinese and Polish translations
    • Improved developer experience with React Refresh integration

Migration Guide

Config File Extensions

If you have any configuration files in the config/ directory with extensions other than .js or .json, you will need to rename them as the system now enforces this restriction and will throw an error for other file extensions.

Database Optimizations

The optimizations for foreign key references in MySQL/MariaDB and PostgreSQL are applied automatically and require no manual migration steps. However, if you were experiencing performance issues with complex database queries involving foreign keys, you may notice significant improvements after upgrading.

For detailed migration guides, please refer to the official Strapi documentation.

Upgrade Recommendations

This release is recommended for all Strapi users, especially those:

  1. Using MySQL 5.7+ or PostgreSQL who may be experiencing performance issues with database queries involving foreign keys
  2. Working with SVG or GIF images in the upload plugin
  3. Experiencing issues with the Users & Permissions plugin
  4. Developing with Strapi and wanting improved developer experience

The upgrade should be straightforward as this is a patch release (v4.2.0 → v4.2.2) with no major breaking changes, except for the enforcement of .js or .json extensions for files in the config/ directory. Make sure to check your configuration files before upgrading.

Bug Fixes

Admin Interface

  • Fixed AuthenticatedApp tests
  • Updated Webpack resolver configuration to clean up and improve module resolution
  • Updated WYSIWYG editor system font-family for better appearance
  • Fixed text alignment in content-type builder attribute options

Upload Plugin

  • Fixed missing await in upload plugin that could cause race conditions
  • Added proper dimension handling for SVG and GIF images
  • Added e2e tests to verify image dimensions are properly populated

Users & Permissions Plugin

  • Fixed username vs email registration and login issues
  • Refactored providers and cleaned up authentication code
  • Fixed email confirmation API
  • Added support for query parameters for /me endpoint
  • Fixed Twitter provider integration

Configuration

  • Added proper error handling when files in the config/ directory use extensions other than .js or .json
  • Fixed Sentry transaction naming for dynamic routes

New Features

Enhanced Marketplace Experience

  • Added link to provider detail pages on Strapi Market
  • Improved UI to show already installed providers as "installed" in the marketplace

GraphQL Improvements

  • Added support for filtering on nested components in GraphQL queries, enabling more complex and powerful data fetching

Translation Additions

  • Added Hindi language support
  • Updated and added missing Polish translations
  • Added several items in Chinese (zh-Hans) translations

Developer Experience

  • Integrated React Refresh to increase productivity during development
  • Added ability to search test files in watch mode

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Database Query Optimization

  • MySQL/MariaDB: Significantly improved performance when fetching foreign key references by making separate requests to each information_schema table instead of using complex inner joins
  • PostgreSQL: Fixed timeout errors by optimizing complex join queries used to fetch foreign key references
  • Reduced the number of MySQL queries needed to get table foreign keys

Developer Workflow

  • Integrated React Refresh to increase development productivity by enabling hot module replacement without losing component state
  • Added ability to search test files in watch mode for faster test-driven development

Impact Summary

Strapi v4.2.2 delivers significant performance improvements for database operations, particularly for MySQL/MariaDB and PostgreSQL users working with foreign key references. This can result in faster query execution and reduced timeout errors in complex database operations.

The release also enhances the developer experience with React Refresh integration and test file search capabilities, making the development workflow more efficient. Content editors will benefit from UI improvements in the WYSIWYG editor and content-type builder.

For international teams, the addition of Hindi language support and improvements to Chinese and Polish translations makes Strapi more accessible to global users.

The marketplace experience has been improved by showing already installed providers as "installed" and adding links to provider detail pages. GraphQL users gain the ability to filter on nested components, enabling more powerful and flexible queries.

Several important bug fixes address issues in the upload plugin (particularly for SVG and GIF images), the Users & Permissions plugin, and configuration file handling. These fixes improve stability and user experience across the platform.

Full Release Notes

⚙️ Chore

  • [core:admin] feat(translations): update and add missing PL translations (#13574) @imklau
  • [core:admin] chore: Update design-systems and icons to 1.2.0 (#13618) @gu-stav
  • [dependencies] Bump @actions/core from 1.8.1 to 1.9.0 (#13573) @dependabot
  • [dependencies] Bump qs from 6.10.5 to 6.11.0 (#13639) @dependabot
  • [tooling] Integrate react-refresh to increase productivity (#12825) @nvh95
  • [tooling] Add doc flag in pr status check to avoid merging of PR (#13644) @alexandrebodin

💅 Enhancement

  • [core:admin] Add Hindi translation (#13467) @AnjaliMahawar
  • [core:admin] feat(translations): add several items in zh-Hans (#13560) @yangfei4913438
  • [core:database] Optimize database foreign keys references - MySQL/MariaDB (#12843) @tiagolima90
  • [core:database] Optimize database foreign keys references - PostgreSQL (#13550) @meherchandan
  • [marketplace] Show installed providers as already installed on marketplace (#13625) @remidej
  • [plugin:graphql] [GraphQL] Enable filtering on nested components (#13572) @Convly
  • [plugin:sentry] Fix Sentry transaction name for dynamic routes (#13514) @Sija

🔥 Bug fix

🚀 New feature

  • [marketplace] [Marketplace] add link to the providers detail page on strapi market (#13622) @markkaylor

📚 Migration guides can be found here 📚

Statistics:

File Changed112
Line Additions7,829
Line Deletions3,883
Line Changes11,712
Total Commits128

User Affected:

  • Benefit from optimized database queries for foreign key references in MySQL/MariaDB and PostgreSQL
  • Experience improved development workflow with React Refresh integration
  • Can now properly handle SVG and GIF image dimensions in the upload plugin
  • Need to ensure config files use only .js or .json extensions (breaking change)

Contributors:

tiagolima90ivanThePleasantronronscelestesDanieleAuriliocortopyalexandrebodinAnjaliMahawarSijameherchandanyangfei4913438dependabot[bot]Convlypierreburgyimklaupetersg83nvh95remidejmarkkaylor