Home

>

Tools

>

Strapi

>

Releases

>

4.3.0

Strapi Release: 4.3.0

Tag Name: v4.3.0

Release Date: 7/27/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.3.0 introduces two major features: Media Library folders for better asset organization and TypeScript support for improved development experience. The release also includes various bug fixes, performance improvements, and security updates. This update enhances the user experience for content managers and developers while maintaining backward compatibility.

Highlight of the Release

    • Media Library folders for organizing assets
    • TypeScript support for improved development experience
    • New case-insensitive equal search operator (eqi)
    • Fixed dynamic zones to properly support labels and descriptions
    • Improved UI for date/time picker across different locales
    • Security updates including fix for CVE-2022-25896

Migration Guide

Upgrading to v4.3.0

This release doesn't require any specific migration steps for most users. The new features (Media Library folders and TypeScript support) are opt-in and don't break existing functionality.

For TypeScript Users

If you want to use TypeScript in your Strapi project:

  1. Install TypeScript and required type definitions:

    npm install --save-dev typescript @types/node
    
  2. Create a tsconfig.json file in your project root:

    {
      "compilerOptions": {
        "target": "es2018",
        "module": "commonjs",
        "esModuleInterop": true,
        "moduleResolution": "node",
        "outDir": "dist",
        "strict": true,
        "skipLibCheck": true
      },
      "include": ["./src/**/*"],
      "exclude": ["node_modules", "build", "dist"]
    }
    
  3. You can now create TypeScript files with .ts extension in your project.

  4. To generate schema type definitions, you can use the new command:

    strapi ts:generate-types
    

For Media Library Folders

The Media Library folders feature is available automatically after upgrading. Your existing media assets will be placed in the root folder, and you can start organizing them into folders as needed.

Upgrade Recommendations

We recommend all users upgrade to v4.3.0 to benefit from the new features, bug fixes, and security updates.

Priority: Medium

Timing:

  • For production environments, plan the upgrade during a maintenance window
  • For development environments, you can upgrade immediately

Process:

  1. Back up your database and project files
  2. Update your Strapi dependencies in package.json:
    "dependencies": {
      "@strapi/strapi": "4.3.0",
      "@strapi/plugin-users-permissions": "4.3.0",
      "@strapi/plugin-i18n": "4.3.0"
      // ... other Strapi packages
    }
    
  3. Run npm install or yarn install
  4. Run npm run build or yarn build
  5. Restart your Strapi application

The upgrade should be smooth with no breaking changes expected.

Bug Fixes

Content Manager Fixes

  • Fixed dynamic zones to properly support labels and descriptions
  • Ensured numeric value 0 is not incorrectly converted to null in forms
  • Fixed UI validation for enum values in the Content-Type Builder
  • Fixed date/time picker issues when using different locales

Media Library Fixes

  • Fixed image cropping functionality
  • Improved error message display when API throws errors
  • Fixed typo in upload middleware
  • Fixed folder card styling and focus states

API and Core Fixes

  • Fixed creator fields in REST API responses
  • Fixed password autocomplete functionality
  • Fixed sourcemaps for development environments
  • Updated documentation plugin README with correct v4 file paths

New Features

Media Library Folders

The Media Library now supports organizing assets into folders, providing a much-needed feature for better content organization. Content managers can:

  • Create, rename, and delete folders
  • Move assets between folders
  • Search across nested folders
  • Bulk move assets to different folders
  • Navigate through folder hierarchies

This feature significantly improves the experience of managing large numbers of media assets.

TypeScript Support

Strapi now includes TypeScript support, enabling developers to:

  • Write type-safe code with better IDE integration
  • Generate schema type definitions
  • Benefit from improved code completion and error detection
  • Create TypeScript-based plugins and extensions

TypeScript support includes generic typings for schemas, making the development experience more robust and reducing potential runtime errors.

Security Updates

  • Updated koa-passport to fix CVE-2022-25896
  • Bumped terser from 4.8.0 to 4.8.1 to address security vulnerabilities
  • Updated several dependencies to their latest secure versions:
    • swagger-ui-dist from 4.11.1 to 4.12.0
    • cheerio from 1.0.0-rc.10 to 1.0.0-rc.12
    • nodemailer from 6.7.3 to 6.7.7
    • koa from 2.13.3 to 2.13.4
    • sift from 13.5.0 to 13.5.4
    • immer from 9.0.6 to 9.0.15

These updates address various security vulnerabilities and ensure a more secure Strapi instance.

Performance Improvements

Development Experience

  • Improved sourcemaps for better debugging in development environments
  • Replaced SWC node-jest with SWC jest transform for better test performance
  • Added missing webpack chunk names for better code splitting

Media Library

  • Optimized folder navigation and search functionality
  • Improved asset loading states during bulk operations

Impact Summary

Strapi v4.3.0 delivers significant improvements to both content management and development workflows. The addition of Media Library folders addresses a long-requested feature, enabling better organization of digital assets - especially valuable for projects with large media collections. This feature alone will save content managers considerable time when searching for and managing assets.

The introduction of TypeScript support marks an important step in Strapi's evolution, providing developers with improved tooling, better code completion, and fewer runtime errors. This will lead to more robust applications and a better development experience, particularly for larger teams and projects.

The release also includes numerous bug fixes that address pain points in the content editing experience, such as issues with dynamic zones, date pickers, and form handling. Security updates ensure that Strapi installations remain protected against known vulnerabilities.

For most users, this update brings only benefits with no breaking changes, making it a recommended upgrade for all Strapi installations. The improvements to the Media Library alone provide sufficient reason to update, while developers will appreciate the TypeScript support and various quality-of-life improvements.

Full Release Notes

🚀 New feature

⚙️ Chore

💅 Enhancement

🔥 Bug fix


📚 Migration guides can be found here 📚

Statistics:

File Changed300
Line Additions10,355
Line Deletions4,337
Line Changes14,692
Total Commits250

User Affected:

  • Can now organize media assets into folders for better management
  • Improved UI for dynamic zones with better label and description support
  • Fixed image cropping in the Media Library
  • Better error messages when uploading files

Contributors:

ronronscelestesmeherchandanConvlyj0nezzdependabot[bot]petersg83alexandrebodinivanThePleasantyangfei4913438innerdvationsgu-stavderrickmehaffysimotae14smoothdvd