Skip to content

Releases: vivocha/arrest

v14.1.1

21 Nov 17:33

Choose a tag to compare

🔄 Dependency Updates

Stable Releases

This release migrates from beta/next versions to stable production releases:

  • openapi-police: next (5.0.0-beta.1) → ^5.0.1 (stable)

    • Full OpenAPI 3.1 support now in stable release
    • Improved JSON Schema Draft 2020-12 validation
    • Production-ready with all features tested
  • jsonref: ^9.0.0^9.0.2

    • Bug fixes and improvements
    • Better JSON reference resolution

📚 Documentation Improvements

New Sections Added

OpenAPI 3.1 Features

Comprehensive guide to new JSON Schema Draft 2020-12 capabilities:

  • dependentRequired: Conditional required fields with payment example
  • if/then/else: Conditional schema validation
  • prefixItems: Tuple validation for arrays (e.g., coordinates)
  • const: Constant value enforcement
  • Type arrays: Native nullable field support

TypeScript Support

Complete TypeScript examples including:

  • Proper OpenAPIV3_1.OperationObject type annotations
  • Full operation implementation with getDefaultInfo(), handler(), and runOperation()
  • Request/response interface definitions
  • Import statements for all required types

CSV Export

Detailed CSV export documentation:

  • Query parameters table
  • CSV formatting options
  • RQL integration examples
  • Nested field support
  • Programmatic usage examples

Validation Errors

Complete validation error handling guide:

  • Example error response format
  • Common validation error types table
  • OpenAPI-police integration
  • Error keyword reference

Corrections

  • ✅ Fixed incorrect link to jsonpolice (removed duplicate)
  • ✅ Corrected ES Modules description
  • ✅ Added missing operationId in custom operation example
  • ✅ Updated version references throughout

🧪 Testing

All tests passing:

  • 302 tests (216 core + 71 MongoDB + 15 OpenAPI 3.1)
  • 100% code coverage (statements, branches, functions, lines)
  • ✅ Full compatibility verified

📦 What's Changed

  • Stable production dependencies (no more beta versions)
  • Enhanced documentation with practical examples
  • Improved developer experience with complete TypeScript support
  • Better error handling documentation

🔗 Links


Install or update:

npm install [email protected]
# or
pnpm add [email protected]

🤖 Generated with Claude Code

v14.1.0

21 Nov 10:54

Choose a tag to compare

🎉 What's New in v14.1.0

This release adds complete OpenAPI 3.1.0 support while maintaining 100% backward compatibility with existing code.

✨ Major Features

1. OpenAPI 3.1.0 Full Support

  • ✅ Upgraded from OpenAPI 3.0.2 to 3.1.0
  • ✅ Complete JSON Schema Draft 2020-12 support
  • jsonSchemaDialect property added to OpenAPI documents
  • ✅ All OpenAPI 3.1 features available

2. Backward Compatibility Layer

  • JSON_SCHEMA_DRAFT_7 alias maintains compatibility with existing code
  • ✅ No breaking changes - existing code continues to work
  • ✅ Gradual migration path available
  • ✅ Legacy nullable property still supported

3. New JSON Schema Draft 2020-12 Features

dependentRequired - Make fields required based on other fields:

{
  "properties": {
    "creditCard": { "type": "boolean" },
    "cardNumber": { "type": "string" },
    "billingAddress": { "type": "string" }
  },
  "dependentRequired": {
    "creditCard": ["cardNumber", "billingAddress"]
  }
}

dependentSchemas - Apply conditional schemas:

{
  "dependentSchemas": {
    "creditCard": {
      "properties": {
        "cardType": { "enum": ["visa", "mastercard"] }
      },
      "required": ["cardType"]
    }
  }
}

Other new features:

  • prefixItems for tuple validation
  • const for constant values
  • contentSchema for encoded content validation
  • Enhanced schema references with $dynamicRef

4. Comprehensive Test Suite

  • 15 new tests specifically for OpenAPI 3.1 features
  • 302 total tests passing (100% pass rate)
  • 97.8% code coverage maintained
  • ✅ Tests for backward compatibility

📦 Dependencies

  • openapi-police: 4.0.55.0.0-beta.1 (OpenAPI 3.1 support)

🔄 Migration Guide

No changes required! Your existing code will continue to work:

// This still works
import { JSON_SCHEMA_DRAFT_7 } from 'arrest';

// But you can also use the new name
import { JSON_SCHEMA_DRAFT_2020_12 } from 'arrest';

To adopt new features:

  1. Start using OpenAPI 3.1 features in your schemas
  2. Update nullable: true to type: ["string", "null"] (optional)
  3. Leverage new Draft 2020-12 validators

📊 Statistics

  • Tests: 302 passing (216 core + 71 MongoDB + 15 OpenAPI 3.1)
  • Coverage: 97.8% (non-MongoDB code)
  • Build: TypeScript compiles successfully
  • Breaking Changes: None

🐛 Bug Fixes

No bug fixes in this release - pure feature addition.

📝 Commits

  • 4e1333d chore: bump version to 14.1.0
  • 0a139d3 Add OpenAPI 3.1 backward compatibility and comprehensive tests
  • 78096a2 Merge feature/openapi-3.1-support: Add OpenAPI 3.1 support

🔗 Resources

⚠️ Known Issues

  • MongoDB tests require port 27017 to be available
  • Some validation features in dependentRequired may require openapi-police updates

Full Changelog: v14.0.1...v14.1.0

v14.0.1

13 Nov 13:57

Choose a tag to compare

What's Changed

Bug Fixes

  • RQL: Fix select() operator now works correctly (413c9a3)

Documentation

  • Add fields parameter and query parameters reference (e081223)
  • Expand RQL section with comprehensive operator reference (27605dd)
  • Fix API constructor examples and enhance README (ed6ac2d)

CI/CD

  • Remove MongoDB service - let mongodoki handle it (0423607)

Full Changelog: v14.0.0...v14.0.1

v14.0.0

03 Nov 14:41

Choose a tag to compare

Release v14.0.0

This major release restores breaking changes that were incorrectly released in v13.2.6 and subsequently rolled back in v13.2.7.

🚨 BREAKING CHANGES

MongoDB Driver

  • Upgraded from v4 to v6.8.0+
  • MongoDB API has been updated for v6 compatibility
  • Removed bson dependency (now included in mongodb driver)

Node.js Requirement

  • Minimum Node.js version: >=18.17.0 (was >=16.14.0)

TypeScript

  • Upgraded from v4.7 to v5.5.2+
  • Build and type definitions updated for TypeScript 5 compatibility

Testing Framework

  • Chai upgraded from v4 to v5.1.1+
  • Replaced chai-spies with sinon v21.0.0 for test mocking
  • Removed @types/connect dependency

Dependencies Updated

  • camelcase: v7 → v8
  • debug: v4.3.4 → v4.3.5
  • dot-prop: v7 → v9
  • jsonref: v8 → v9
  • openapi-police: v4.0.2 → v4.0.5
  • semver: v7.3.7 → v7.6.2

📦 Migration Guide

If upgrading from v13.x:

  1. Update Node.js to at least v18.17.0
  2. Update TypeScript (if using) to v5.x
  3. Update MongoDB client code if you're extending arrest's MongoDB operations
  4. Update test mocks from chai-spies to sinon if you're using test utilities

✅ Verified

  • All 216 tests passing
  • 100% code coverage maintained
  • Full backward compatibility for REST API endpoints

🔗 Related Commits


🤖 Generated with Claude Code

v13.2.7 - Rollback Breaking Changes

31 Oct 16:52

Choose a tag to compare

🔄 Rollback Breaking Changes

This release reverts breaking changes that were incorrectly introduced in commit cad6610 as a patch version instead of a major version.

Changes Reverted

  • MongoDB driver: Reverted from v6 back to v4 (API breaking changes)
  • Node.js requirement: Reverted from >=18.17.0 to >=16.14.0
  • Test framework: Restored chai v4 with chai-spies instead of chai v5 with sinon
  • TypeScript: Reverted from v5 to v4.7
  • Source code: Restored MongoDB v4 API compatibility (result.ok, result.value)

Dependencies Added

  • bson v4 (for MongoDB v4 compatibility)
  • @types/connect (for type definitions)

Testing

✅ All tests pass: 216/217 tests passing
(1 failure due to local MongoDB already running on port 27017, not a code issue)

Migration Notes

This version restores backward compatibility with:

  • Node.js 16.14.0+
  • MongoDB driver v4
  • Existing codebases using the stable v4 MongoDB API

🤖 Generated with Claude Code

v13.2.6

10 Sep 15:59

Choose a tag to compare

What's Changed

  • 📦 Dependencies: Updated openapi-police from v4.0.2 to v4.0.5 with security fixes
  • 📚 Documentation: Comprehensive README with complete REST framework documentation
  • 🚀 CI/CD: Migrated from Travis CI to GitHub Actions with Node.js 18, 20, 22 testing
  • Features: Added detailed MongoDB integration examples and authentication patterns
  • 💻 TypeScript: Complete TypeScript support examples and production configuration guidance
  • 🔧 Build: All 285 tests pass with updated dependencies

Key Features Documented

  • OpenAPI v3 compliant REST framework architecture
  • Comprehensive MongoDB v6 integration and operations
  • Authentication and authorization (OAuth2 scopes, CASL abilities)
  • Resource Query Language (RQL) for advanced querying
  • JSON-RPC support and pipeline operations
  • CSV export functionality and Express.js integration

Dependencies Updated

  • openapi-police: ^4.0.5 (updated from ^4.0.2)
  • jsonpolice: ^12.0.1 (transitive dependency)
  • jsonref: ^9.0.2 (transitive dependency)

Test Results

  • ✅ All 285 tests passing
  • 🔧 Modern toolchain with pnpm and GitHub Actions
  • 📋 Comprehensive coverage across all components

🤖 Generated with Claude Code

v13.2.5

14 Nov 11:59

Choose a tag to compare

13.2.5 (2024-11-14)

Bug Fixes

  • add debug logs on securityValidator (e5f6fc9)
  • add debug logs on securityValidator (7ab813f)

v13.2.4

22 Dec 08:37

Choose a tag to compare

13.2.4 (2022-12-22)

Bug Fixes

  • handle default values for missing parameters (9c6fbac)

v13.2.3

09 Dec 08:23

Choose a tag to compare

13.2.3 (2022-12-09)

Bug Fixes

  • exclude null values when checking ability (d8a0683)

v13.2.2

05 Oct 10:52

Choose a tag to compare

13.2.2 (2022-10-05)

Bug Fixes

  • handle null values in csv export (e1fb8d5)