Skip to content

v4.0.0

Latest

Choose a tag to compare

@vladholubiev vladholubiev released this 11 Aug 15:47
· 2 commits to master since this release

πŸš€ v4.0.0

This major version brings significant modernization improvements to the package.

✨ What's New

  • ESM-first: Project has been modernized to use ES modules by default
  • Node.js 22+: Updated minimum Node.js requirement to version 22
  • Modern tooling: Upgraded to latest ESLint config and build tools

πŸ’₯ Breaking Changes

  • Minimum Node.js version: Now requires Node.js 22 or higher
  • ES Modules: Package now uses ES modules by default ("type": "module" in package.json)
  • Import/Export syntax: All imports and exports now use ES module syntax

πŸ”§ Technical Improvements

  • Migrated from CommonJS to ES modules
  • Updated ESLint configuration to modern flat config format
  • Upgraded all development dependencies to latest versions
  • Improved TypeScript configuration
  • Enhanced build process for better compatibility

πŸ“¦ Migration Guide

If you're upgrading from v3.x:

  1. Ensure you're using Node.js 22 or higher
  2. Update your import statements to use ES module syntax:
    // Before (v3.x)
    const { chunkArrayBySize } = require('@shelf/array-chunk-by-size');
    
    // After (v4.x)
    import { chunkArrayBySize } from '@shelf/array-chunk-by-size';
  3. If you're using TypeScript, ensure your tsconfig.json supports ES modules

Full Changelog: v3.1.0...v4.0.0