Home

>

Tools

>

Strapi

>

Releases

>

4.2.0-beta.4

Strapi Release: 4.2.0-beta.4

Pre Release

Tag Name: v4.2.0-beta.4

Release Date: 6/7/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.0-beta.4 introduces two major features: TypeScript support and Logo Customization. The TypeScript support allows developers to build more robust applications with type safety, while the Logo Customization feature enables administrators to personalize their Strapi admin panel with custom logos. This release also includes security fixes for several CVEs and updates the minimum Node.js version requirement.

Highlight of the Release

    • Full TypeScript support for building Strapi applications
    • Logo Customization feature allowing administrators to personalize the admin panel
    • Security fixes for multiple CVEs including mailgun-js vulnerabilities
    • Updated minimum Node.js version requirements

Migration Guide

TypeScript Support

To start using TypeScript in your Strapi project:

  1. Install TypeScript and required dependencies:

    npm install --save-dev typescript @types/node
    
  2. Create a tsconfig.json file in your project root or use the one provided by Strapi.

  3. Start renaming your .js files to .ts files as needed.

Node.js Version Update

This release updates the minimum required Node.js version. Please ensure your environment meets these requirements before upgrading.

Mailgun Provider Update

If you're using the Mailgun provider:

  1. The provider now uses mailgun.js instead of the deprecated mailgun-js
  2. Your existing configuration should work without changes as the update includes conversion functions
  3. For new configurations, refer to the updated README for the correct field structure

Upgrade Recommendations

This beta release introduces significant features like TypeScript support and Logo Customization, along with important security fixes. We recommend:

  1. For Development Environments: Upgrade to test the new TypeScript support and Logo Customization features.

  2. For Production Environments: While this is a beta release, the security fixes included make it worth considering for production if you're affected by the fixed CVEs, particularly if you use the Mailgun provider.

  3. Before Upgrading:

    • Ensure your Node.js version meets the new minimum requirements
    • Back up your project
    • Test the upgrade in a development environment first
    • Review the changes to dependencies, especially if you use Mailgun
  4. Upgrade Process:

    npm install @strapi/[email protected]
    

    or

    yarn upgrade @strapi/[email protected]
    

Bug Fixes

  • Fixed generation of OpenAPI documentation with top level type attribute
  • Removed limit on deep populate on components
  • Fixed Yup strapiID validation not working correctly
  • Prevented argv check on "add-missing-keys-to-other-language" module import
  • Updated .gitignore to allow use of word "coverage" in API endpoints and content-types
  • Fixed handling of undefined files object in logo customization
  • Improved error handling and accessibility in logo upload process

New Features

TypeScript Support

Strapi now offers full TypeScript support, allowing developers to build more robust applications with type safety. This feature includes:

  • TypeScript configuration and setup in Strapi projects
  • Type definitions for Strapi core functionality
  • Updated kitchensink-ts template to the latest beta
  • Improved developer experience with type checking and autocompletion

Logo Customization

Administrators can now personalize their Strapi admin panel with custom logos:

  • New dedicated section in Project Settings for logo management
  • Upload custom logos from computer with file format and size validation
  • Add logos via URL input
  • Preview functionality before applying changes
  • Proper storage and management of logo files
  • New permissions to control access to logo customization features

Security Updates

  • Fixed CVE-2022-29256: Addressed a low severity vulnerability in the build environment
  • Fixed CVE-2021-46708: Resolved a security issue in dependencies
  • Replaced deprecated mailgun-js with mailgun.js to address CVE-2021-29418
  • Added functions for converting old mailgun config to work with the new API
  • Updated dependencies to more secure versions

Performance Improvements

  • Simplified project settings service function signatures for better efficiency
  • Optimized file handling in logo customization by comparing file hashes directly instead of URLs
  • Refactored configurations provider and reducers for better performance
  • Improved file upload handling to prevent unnecessary processing

Impact Summary

Strapi v4.2.0-beta.4 brings two major enhancements that significantly improve both developer and administrator experiences.

The addition of TypeScript support represents a substantial step forward for developers, enabling stronger type safety, better code completion, and improved maintainability for Strapi applications. This feature will help catch errors earlier in the development process and provide a more robust foundation for building complex applications.

The Logo Customization feature addresses a long-requested capability for administrators to personalize their Strapi instances. This enhancement improves branding capabilities and allows organizations to create a more cohesive experience between their Strapi admin panel and their overall brand identity.

Security improvements in this release, including fixes for multiple CVEs and the replacement of deprecated dependencies, strengthen the overall security posture of Strapi applications.

The updated Node.js version requirements ensure compatibility with modern environments while potentially requiring some users to update their infrastructure.

Overall, this beta release delivers meaningful improvements to both the technical foundation and user experience of Strapi, making it a worthwhile upgrade for most users despite its beta status.

Full Release Notes

🚀 New feature

  • Typescript support
  • Logo customization

Statistics:

File Changed125
Line Additions7,465
Line Deletions1,966
Line Changes9,431
Total Commits146

User Affected:

  • Can now use TypeScript for building Strapi applications with improved type safety and developer experience
  • Need to be aware of updated minimum Node.js version requirements
  • Benefit from fixed security vulnerabilities in dependencies

Contributors:

ronronscelestesvincentbproHichamELBSIDarkSuniuMalexandrebodinpetersg83digitalextremistConvlyderrickmehaffydependabot[bot]micniltbjers