Skip to content

Releases: SeanLuis/rest-data-validator

v2.1.0 - Improved Module Compatibility and Package Configuration

26 Oct 14:57
Compare
Choose a tag to compare

What's New

This release focuses on enhancing module compatibility and fixing package configuration issues to ensure seamless integration with various Node.js frameworks and environments.

Changes

  • Module Generation:

    • Generate both ESM (.mjs) and CommonJS (.js) modules.
    • Adjusted tsup configuration for proper module formats.
  • Package Configuration:

    • Updated package.json to correctly reference modules in the main, module, and types fields.
    • Removed invalid types condition from the exports field.
  • Testing Configuration:

    • Renamed jest.config.js to jest.config.cjs to resolve ESM-related errors.
    • Updated Jest configuration for ESM compatibility.
  • File Cleanup:

    • Modified the build process to exclude unnecessary .ts and .cts files from the dist directory.
  • Compatibility:

    • Verified compatibility with frameworks like NestJS, Express, Koa, Fastify, and others.
    • Users can now import the package in both CommonJS and ESM environments without issues.

Upgrade Notes

  • Ensure your project uses Node.js version 18 or higher.
  • Update your import statements if necessary, according to your environment (CommonJS or ESM).

Feedback

Thank you for using rest-data-validator. Your feedback is valuable, and we encourage you to report any issues or suggestions.

v2.0.18 - Introducing Schema File Provider and Expanded Validation Schemas

28 Sep 03:37
Compare
Choose a tag to compare

Introduction

We are pleased to announce the release of v2.0.18, which introduces two powerful features: the SchemaFileProvider utility for loading external schema files and an expansion of our validation schema library. These improvements significantly enhance the flexibility and scalability of the validation system, providing developers with more granular control over their validation logic.

Key Improvements

SchemaFileProvider:

  • External Schema Loading: Load schema definitions from JSON or YAML files, externalizing schema management for large-scale applications.
  • Schema Conversion and Retrieval: Convert schema definitions into ValidationSchemaBase instances and dynamically retrieve entity schemas using getSchema.
  • Environment Configuration: Schema file paths can now be configured via the SCHEMA_FILE_PATH environment variable for seamless integration.

Expanded Validation Schemas:

  • New Schema Types: Added support for various schema types including StringSchema, NumberSchema, ArraySchema, EnumSchema, DateSchema, TupleSchema, and more.
  • Advanced Validation Control: With these new schema types, developers can validate complex data structures with greater precision and flexibility.
  • Lazy and Transform Schemas: Support for lazy evaluations and transformations during validation.

Implications

These updates provide essential tools for externalizing schema management and enhancing the robustness of validation processes. Developers can now manage and update schema definitions without modifying core application logic, making the system more maintainable and scalable. Additionally, the expanded schema support allows for more comprehensive data validation, ensuring data integrity across a wider range of use cases.

Acknowledgments

We extend our gratitude to the development team for their dedication to enhancing the library, and to the community for their continuous feedback and support. These contributions help us refine and improve the system with every release.

For more details and implementation guidance, visit our GitHub repository.

v2.0.17 - Introducing BIC (Bank Identification Code) and ISO 3166-1 alpha-2

10 Jul 03:44
Compare
Choose a tag to compare

Introduction

We are excited to announce the release of v2.0.17, which brings significant improvements to our data validation library. This update introduces new validators and decorators for handling ISO 3166-1 alpha-2 country codes and BIC (Bank Identification Code) validations, along with extensive documentation to support these features.

Key Improvements

New Validators and Decorators:

  • ISO31661Alpha2 Validator and Decorator: Validate ISO 3166-1 alpha-2 country codes efficiently, ensuring data integrity and compliance with international standards.
  • BIC Validator and Decorator: Accurately validate BIC codes to maintain the correctness of banking and financial data.

Documentation:

  • Added comprehensive documentation for both ISO31661Alpha2 and BIC validators and decorators.
  • Examples and usage instructions are included to guide developers on implementing these validations effectively in their applications.

Implications

These updates provide robust tools for validating critical data types, improving the reliability and accuracy of applications that depend on country and banking data validations. The extensive documentation helps developers quickly integrate these new validators and decorators, enhancing overall development efficiency.

Acknowledgments

A special thanks to our development team for their hard work in implementing these new features and to our community for their valuable feedback, which continues to drive our improvements.

For detailed implementation and usage instructions, please visit our GitHub repository.

v2.0.16 - Enhanced CLI Compatibility and Build Refinement

01 Jul 03:41
Compare
Choose a tag to compare

Introduction

We are thrilled to announce the release of v2.0.16, which introduces crucial updates to our build processes and the handling of TypeScript interfaces to solve compatibility issues with our CLI in JavaScript environments.

Key Improvements

Build Configuration:

  • Refined Babel configurations to exclude TypeScript interfaces from the JavaScript build, preventing runtime errors.
  • Enhanced TypeScript compilation process to better manage output directory structures and ensure type accuracy.

Entrypoint Adjustments:

  • Separated interface exports into dedicated TypeScript files, clearly distinguishing them from runtime JavaScript modules.
  • Updated entry scripts to ensure that interface imports do not affect JavaScript runtime, enhancing compatibility and reliability.

Implications

These updates ensure that our CLI and other JavaScript-based tools can operate without encountering errors related to TypeScript interfaces, making the integration process smoother and more reliable for all JavaScript developers.

Acknowledgments

A special thanks to our development team for their dedication to resolving these issues promptly and to our community for their insightful feedback which has continuously helped improve our solutions.

For detailed implementation and usage instructions, please visit our GitHub repository.

v2.0.15 - Introducing String Contains and Alpha Validation for Enhanced Data Integrity

30 Jun 20:29
Compare
Choose a tag to compare

Introduction

We are excited to announce the release of v2.0.15, which introduces powerful string validation features: Contains and Alpha. These updates allow for enhanced control over string data, ensuring that they meet specific criteria, thereby improving the integrity and reliability of our application.

New Features

Contains Validation:

  • Dynamic Substring Checks: Allows validation to ensure that a string contains a specific substring a minimum number of times.
  • Case Insensitivity Option: Provides an option to ignore case when checking for the substring.
  • Custom Error Messages: Enables custom error messages to be displayed if validation fails.

Alpha Validation:

  • Alphabetic Character Validation: Ensures that a string contains only alphabetic characters, supporting multiple locales.
  • Ignore Specific Characters: Allows certain characters (e.g., spaces, hyphens) to be ignored during validation.
  • Custom Error Messages: Enables custom error messages to be displayed if validation fails.

Implications

These features introduce new ways to handle string data validation, allowing for more precise and context-specific rules, which are essential for applications dealing with text input that requires strict formatting.

Acknowledgments

A heartfelt thank you to our development team for their hard work and dedication, and to our community for their continuous feedback which helped shape these features.

Please visit our GitHub repository for more detailed information on this release and full documentation on implementing and using the new string validation features.

v2.0.14 - Introducing Group-Based Validation for Enhanced Flexibility and Security

13 May 15:04
Compare
Choose a tag to compare

Introduction

We are excited to announce the release of v2.0.14, which introduces a powerful group-based validation feature. This update allows for conditional validation of data based on configurable groups, improving the flexibility and security of our application.

New Features

Group-Based Validation:

  • Dynamic Validation Groups: Administrators can now configure validation rules that apply to different user groups, enhancing control over data processing and security.
  • Enhanced Validation Logic: Improved the underlying validation mechanisms to support group-based conditions seamlessly.

Implications

This feature introduces new ways to handle data validation, allowing for more precise and context-specific validation rules, which are essential for applications dealing with sensitive or diverse data sets.

Acknowledgments

A heartfelt thank you to our development team for their hard work and dedication, and to our community for their continuous feedback which helped shape this feature.

Please visit our GitHub repository for more detailed information on this release and full documentation on implementing and using the new group-based validation feature.

v2.0.13 - Dependency Updates for Enhanced Stability

02 May 23:35
Compare
Choose a tag to compare

Introduction

Updated dependencies for enhanced stability and performance. This release ensures that our codebase remains compatible with the latest features and security updates provided by our dependencies.

Changes in Dependencies

Updated Dependencies:

  • inquirer from 9.2.16 to 9.2.20
  • reflect-metadata from 0.2.1 to 0.2.2

Updated Development Dependencies:

  • @babel/cli from 7.23.9 to 7.24.5
  • @babel/core from 7.24.0 to 7.24.5
  • @babel/preset-env from 7.24.0 to 7.24.5
  • @babel/preset-typescript from 7.23.3 to 7.24.1
  • @types/node from 20.11.28 to 20.12.8
  • typescript from 5.4.2 to 5.4.5

Implications

This update does not introduce breaking changes but improves the overall reliability and security of the software. Users are encouraged to update their installations to take advantage of these improvements.

Acknowledgments

A big thank you to everyone involved in the testing and implementation of these updates. Your dedication helps us maintain high standards and supports the continuous improvement of our software.

Please refer to our GitHub repository for more detailed information on this release.

v2.0.12 - Enhanced Interface Management

22 Mar 12:38
Compare
Choose a tag to compare

Introduction

We're thrilled to unveil version 2.0.12 of REST Data Validator, marking a leap forward in our codebase organization with an emphasis on streamlined interface management. This release brings a refined approach to handling interface imports, facilitating a cleaner, more maintainable structure.

What's New

Centralized Interface Imports

  • Simplified and centralized, our new interface import system reduces complexity and enhances code readability.

Improved Project Structure

  • Dive into a more organized codebase that allows for quicker navigation and understanding, boosting developer efficiency.

Optimized Development Workflow

  • Enjoy an upgraded development experience with clearer, more accessible code, easing the integration process for new team members.

Acknowledgments

A heartfelt thank you to the REST Data Validator community for your continuous support and feedback. Your engagement is vital for our progress and innovation.

Check out the GitHub page for detailed documentation on all the new features and improvements.

v2.0.11 - Security Utility Enhancement

19 Mar 19:47
Compare
Choose a tag to compare

Introduction

We are excited to announce version 2.0.11of the REST Data Validator, introducing a significant enhancement to our security utility. This release focuses on providing robust security validation features designed to protect your applications from a variety of threats.

What's New

Security Event Emitter

  • The SecurityEvents class is an event emitter that allows your application to handle security events dynamically.

Security Validation Decorators

  • Implement security validations seamlessly with our intuitive decorator functions. Simply annotate your class properties with @Security to enforce a wide array of security checks and constraints.

Validate Security Function

  • The validateSecurity function offers a programmatic approach to validate inputs against predefined and custom security strategies. It supports synchronous and asynchronous validations to accommodate different operational contexts.

Comprehensive Security Strategies

  • Our library comes equipped with an extensible set of security strategies, ready to defend against attacks like XSS, SQL Injection, Command Injection, Path Traversal, and LDAP Injection. It also offers the flexibility to define and integrate bespoke security strategies to meet unique application requirements.

Thorough Testing Practices

  • Each security strategy undergoes rigorous testing to ensure reliable protection against both benign and malicious inputs. Follow our testing practices to maintain high security standards across your applications.

Acknowledgments

We extend our heartfelt gratitude to the REST Data Validator community for your ongoing support and valuable feedback. Your contributions are instrumental in shaping the future of this tool, and we're excited to continue improving it together.

For detailed information on all features and updates, please refer to the documentation on our GitHub page.

v2.0.10 - CLI Generators and Strategies Enhancement

16 Mar 20:02
Compare
Choose a tag to compare

Introduction

We are pleased to announce version 2.0.10 of the REST Data Validator, focusing on significant updates to the model and validation generators, along with crucial fixes to various validation strategies. This release aims to streamline the development process further and enhance the reliability of our CLI tool.

What's New

ModelGenerator Improvements

  • Simplified path resolution for model generation to improve the user experience. The path now defaults to the current working directory, making the operation more intuitive.
  • The import statements have been refined to directly reference rest-data-validator, ensuring a smoother integration and a more straightforward approach to managing dependencies.

ValidationsGenerator Enhancements

  • We've introduced smarter logic to ensure that rest-data-validator is always correctly imported, eliminating potential issues related to missing validation types.
  • The handling of named imports has been optimized to include only necessary validation types, streamlining the generated code and enhancing readability.

Strategic Adjustments

  • The ArrayStrategy has been updated to generate validator functions conditionally, based on the presence of minLength or maxLength parameters. This approach reduces unnecessary code generation and focuses on user-specified constraints.
  • We've also refined the properties argument in the Array decorator to include minLength and maxLength conditionally, further streamlining the generated decorator code and focusing on relevant constraints.

Additions & Deletions

This release includes a total of 42 changes across the ModelGenerator, ValidationsGenerator, and various strategy files, comprising both additions and deletions aimed at refining the tool's functionality.

Acknowledgments

We extend our heartfelt gratitude to the REST Data Validator community for your ongoing support and valuable feedback. Your contributions are instrumental in shaping the future of this tool, and we're excited to continue improving it together.

For detailed information on all features and updates, please refer to the documentation on our GitHub page.