Skip to content

Releases: Isqanderm/data-mapper

v4.2.1

16 Oct 21:22

Choose a tag to compare

4.2.1 (2025-10-16)

Bug Fixes

v4.2.0

16 Oct 20:48

Choose a tag to compare

4.2.0 (2025-10-16)

Features

  • add automated code coverage protection with GitLab-style UI (#27) (71b4461), closes #26

v4.1.4

16 Oct 14:26

Choose a tag to compare

4.1.4 (2025-10-16)

Bug Fixes

  • remove non-existent nestjs export from package.json (8620e92)

v4.1.3

16 Oct 14:10

Choose a tag to compare

4.1.3 (2025-10-16)

Bug Fixes

  • add ESM support and update documentation (#25) (dba2fb7)

v4.1.2

16 Oct 12:06

Choose a tag to compare

4.1.2 (2025-10-16)

Bug Fixes

  • address PR review feedback and codecov configuration (71ba817), closes #24
  • Correct benchmark workflow JSON format for benchmark-action (#24) (679e7e1)
  • correct benchmark workflow to use proper JSON format (b4dd02e)

v4.1.1

16 Oct 10:42

Choose a tag to compare

4.1.1 (2025-10-16)

Bug Fixes

  • preserve benchmark JSON files during git cleanup in workflow (a76b1e2)

v4.1.0 - Comprehensive Testing Infrastructure

16 Oct 10:28

Choose a tag to compare

Release Notes - v4.1.0

Release Date: October 16, 2025
Type: Minor Release (Feature Addition)
Focus: Comprehensive Testing Infrastructure


🎯 Overview

Version 4.1.0 introduces a comprehensive testing infrastructure for the om-data-mapper validation system. This release adds 68 new tests across multiple testing categories, improving code coverage and ensuring production-ready quality with proven performance and memory safety.

This is a quality-focused release that validates the exceptional performance claims of the JIT-compiled validation system introduced in v4.0.0.


✨ What's New

🧪 Comprehensive Testing Suite (+68 Tests)

This release adds five categories of advanced tests to ensure the validation system is production-ready:

1. Property-Based Testing (25 tests, ~2,000 checks)

Using the fast-check library, we now test validators with thousands of randomly generated inputs to catch edge cases that traditional unit tests might miss.

Validators tested with random data:

  • Email validation (@isemail)
  • URL validation (@isurl)
  • UUID validation (@IsUUID)
  • ISO8601 date validation (@IsISO8601)
  • Integer validation (@ISINT)
  • Positive/Negative number validation
  • Range validation (@min, @max)
  • String length validation (@minlength, @maxlength)
  • Alphabetic/Alphanumeric validation
  • Hex color validation (@IsHexColor)
  • Port number validation (@isport)

Why this matters: Property-based testing ensures validators work correctly with edge cases, malformed inputs, and boundary conditions that are difficult to anticipate manually.

2. Integration Tests (5 tests)

Real-world scenario tests that validate the entire validation pipeline:

  1. User Registration - Nested address validation with multiple constraints
  2. API Order Request - Complex DTOs with arrays and nested objects
  3. Contact Form - Optional field handling and validation
  4. API Response - Transformation + validation pipeline
  5. Nested Objects - Posts with comments (deep nesting)

Why this matters: Integration tests ensure the validation system works correctly in real-world use cases, not just isolated unit tests.

3. Benchmark Regression Tests (7 tests)

Performance regression tests with baseline values and 10% tolerance:

Scenario Performance vs Baseline
Simple validation 0.0023ms 217x faster 🚀
Complex validation 0.0022ms 909x faster 🚀
Nested arrays 0.0050ms 600x faster 🚀
Transformation 0.0043ms 70x faster 🚀
Transform + Validate 0.0042ms 238x faster 🚀
Async validation 0.0076ms

Why this matters: These tests ensure performance doesn't degrade over time. Any PR that causes >10% performance regression will fail CI.

4. Memory Leak Tests (6 tests)

Stress tests with 3,000-10,000 iterations to detect memory leaks:

Scenario Iterations Memory Change Status
Simple validation 10,000 -4.06MB (-30.53%) ✅ Memory freed!
Create + validate 5,000 -0.99MB (-8.83%) ✅ Memory freed!
Nested validation 5,000 -0.19MB (-1.68%) ✅ Stable!
Array validation 3,000 -0.03MB (-0.26%) ✅ Stable!
Transformation 10,000 -1.49MB (-13.13%) ✅ Memory freed!
Transform + validate 5,000 +0.65MB (+5.47%) ✅ Minimal growth!

Why this matters: Memory leaks can cause production applications to crash. These tests prove the validation system is safe for long-running applications.

5. Branch Coverage Tests (25 tests)

Targeted tests to improve code coverage of conditional branches:

  • Validation groups with constraints
  • Optional properties with groups
  • Conditional validation (@ValidateIf)
  • Nested validation for arrays and objects
  • Multiple constraints with different groups
  • Async validation with groups

Why this matters: Higher branch coverage means more code paths are tested, reducing the risk of bugs in production.


📊 Test Coverage Improvements

Metric Before After Change
Total Tests 450 518 +68 (+15.1%)
Test Files 30 34 +4
Statements 94.69% 95.08% +0.39%
Branches 76.29% 77.58% +1.29%
Functions 90.64% 90.64% 0%
Lines 94.69% 95.08% +0.39%

All 518 tests pass with 100% success rate


🚀 Performance Validation

This release proves the exceptional performance claims of the JIT-compiled validation system:

  • 70-909x faster than baseline expectations
  • No performance degradation detected
  • All benchmark tests pass with 10% tolerance
  • Production-ready for high-throughput applications

🛡️ Memory Safety Validation

This release proves the validation system has no memory leaks:

  • No memory leaks detected in stress tests
  • Memory usage stable or decreasing after repeated operations
  • Garbage collection working effectively
  • Safe for long-running applications

📦 Installation

npm install om-data-mapper@4.1.0

Or update your package.json:

{
  "dependencies": {
    "om-data-mapper": "^4.1.0"
  }
}

💡 Usage

No API changes in this release. All existing code continues to work:

import { IsString, MinLength, IsNumber, Min, validate } from 'om-data-mapper/class-validator-compat';

class CreateUserDto {
  @IsString()
  @MinLength(3)
  name!: string;

  @IsNumber()
  @Min(0)
  age!: number;
}

const user = new CreateUserDto();
user.name = 'Jo';  // Too short
user.age = -5;     // Too small

const errors = await validate(user);
// [
//   { property: 'name', constraints: { minLength: 'must be at least 3 characters' } },
//   { property: 'age', constraints: { min: 'must not be less than 0' } }
// ]

🔄 Migration Guide

No migration needed! This is a backward-compatible release.

If you're already using om-data-mapper v4.0.x, simply update to v4.1.0:

npm update om-data-mapper

All existing code will continue to work without any changes.


🆕 New Dependencies

  • fast-check@4.3.0 (dev dependency) - For property-based testing

This is a development dependency and does not affect production bundle size.


🔗 Related Links


🎉 Highlights

  • 518 tests with 100% pass rate
  • 95.08% statement coverage, 77.58% branch coverage
  • 70-909x faster than baseline performance targets
  • No memory leaks detected in stress tests
  • ~2,000 property-based checks with random data
  • Production-ready quality assurance

🙏 Contributors

  • @Isqanderm - Implementation and comprehensive testing

📝 Notes

This release focuses on quality assurance rather than new features. The comprehensive testing infrastructure ensures that:

  1. Performance claims are validated - Benchmark tests prove 70-909x performance improvements
  2. Memory safety is guaranteed - No memory leaks in production scenarios
  3. Edge cases are covered - Property-based testing with thousands of random inputs
  4. Real-world scenarios work - Integration tests validate complete workflows
  5. Code coverage is high - 95%+ statement coverage, 77%+ branch coverage

This is the quality standard we maintain for all future releases.


Thank you for using om-data-mapper! 🚀

For questions, issues, or feature requests, please visit our GitHub repository.

v4.0.4

14 Oct 21:07

Choose a tag to compare

4.0.4 (2025-10-14)

Bug Fixes

  • clean up benchmark files before switching to gh-pages branch (5062576)

v4.0.3

14 Oct 20:42

Choose a tag to compare

4.0.3 (2025-10-14)

Bug Fixes

  • change benchmark tool from 'benchmarkjs' to 'customBiggerIsBetter' (fd6801b)

v4.0.2

14 Oct 20:33

Choose a tag to compare

4.0.2 (2025-10-14)

Bug Fixes

  • improve codecov configuration and add Node.js version (9a3ddf3)