smartexpect/changelog.md

6.2 KiB

Changelog

2025-04-29 - 2.2.2 - fix(license-files)

Remove legacy license file and add license.md to update file naming.

  • Removed the old 'license' file.
  • Added 'license.md' with updated file structure.

2025-04-29 - 2.2.1 - fix(readme)

Update usage examples and full matcher reference in README

  • Removed deprecated 'expectAsync' from import example
  • Fixed formatting in documentation
  • Added comprehensive full matcher reference section

2025-04-29 - 2.2.0 - feat(generics)

Improve assertion and matcher type definitions by adding execution mode generics for better async/sync support

  • Updated ts/index.ts to import and use TExecutionType in the expect function
  • Modified Assertion class to use a generic execution mode (M) for improved type inference
  • Revised all matcher namespaces (array, boolean, date, function, number, object, string, type) to accept the new generic parameter
  • Enhanced async/sync distinction for assertion methods like resolves and rejects

2025-04-29 - 2.1.2 - fix(ts/index.ts)

Remove deprecated expectAsync function and advise using .resolves/.rejects on expect for async assertions

  • Deleted the redundant expectAsync export in ts/index.ts
  • Users should now call expect(...).resolves or expect(...).rejects for asynchronous assertions

2025-04-29 - 2.1.1 - fix(Assertion)

Improve chainability by fixing return types in assertion methods

  • Update runCheck method to explicitly return the correct chainable type for both async and sync assertions
  • Ensure customAssertion propagates the chainable Assertion instance
  • Refactor internal promise handling for clarity and consistency

2025-04-28 - 2.1.0 - feat(core)

Add new matchers and improve negation messaging

  • Added expect.any() and expect.anything() matchers for enhanced object pattern matching
  • Introduced new number matchers: toBeNaN(), toBeFinite(), and toBeWithinRange()
  • Implemented alias toBeEmpty() for both string and array matchers
  • Enhanced function matchers with toThrowErrorMatching() and toThrowErrorWithMessage()
  • Improved negation messaging to provide clearer failure messages (e.g. 'Expected 5 not to be greater than 3')
  • Enhanced object assertions with a toHaveOwnProperty() shorthand that outputs unified diff-style messages

2025-04-28 - 2.0.1 - fix(assertion-matchers)

Refactor matcher implementations to consistently use customAssertion for improved consistency and clarity.

  • Updated ArrayMatchers, BooleanMatchers, DateMatchers, FunctionMatchers, NumberMatchers, ObjectMatchers, StringMatchers, and TypeMatchers to use customAssertion directly.
  • Aligned Assertion class aliases to delegate to the namespaced matchers with the new customAssertion pattern.

2025-04-28 - 2.0.0 - BREAKING CHANGE(docs)

Update documentation and examples to unify async and sync assertions, add custom matcher guides, and update package configuration

  • Added packageManager field in package.json
  • Revised documentation in readme.md to use .resolves/.rejects instead of expectAsync
  • Included detailed examples for custom matchers and updated API usage
  • Added readme.plan.md outlining the future roadmap
  • Updated tests to import the built library from dist_ts

2025-03-04 - 1.6.1 - fix(build)

Corrected package.json and workflow dependencies and resolved formatting issues in tests.

  • Fixed incorrect global npm package reference for tsdoc installation in workflow file.
  • Updated dependencies in package.json for consistency in package naming.
  • Resolved inconsistent formatting and spacing in test files.

2025-03-04 - 1.6.0 - feat(assertion)

Enhanced the assertion error messaging and added new test cases.

  • Improved error messages by incorporating path and value/placeholders in assertions.
  • Added detailed testing of new assertion functionalities.
  • Additional test cases for comprehensive coverage of new features.

2025-03-04 - 1.5.0 - feat(Assertion)

Add toBeTypeOf assertion method

  • Introduced a new assertion method toBeTypeOf allowing checks for expected data types.
  • Updated devDependencies and dependencies to their latest versions.

2024-12-30 - 1.4.0 - feat(Assertion)

Add log method to Assertion class

  • Introduced a log method in the Assertion class to output assertion context.

2024-12-30 - 1.3.0 - feat(Assertion)

Refactor Assertion class for better error handling and code clarity

  • Improved method runCheck to better handle async and sync execution
  • Enhanced getObjectToTestReference to handle undefined or null values gracefully
  • Refactored error message logic for clarity and added more descriptive fail messages
  • Added arrayItem method for better handling of array index access
  • Improved structure by integrating consistent error handling in assertion methods

2024-08-24 - 1.2.1 - fix(Assertion)

Refactor methods for setting failure and success messages

  • Renamed 'withFailMessage' to 'setFailMessage' for better readability and consistency.
  • Renamed 'withSuccessMessage' to 'setSuccessMessage' to align with the naming convention.

2024-08-24 - 1.2.0 - feat(assertions)

Add custom fail and success messages for assertions

  • Implemented withFailMessage method in Assertion class to customize fail messages
  • Implemented withSuccessMessage method in Assertion class to customize success messages
  • Enhanced error messages to use custom fail messages when provided

2024-08-17 - 1.1.0 - feat(assertion)

Add toBeDefined assertion method

  • Added the toBeDefined method to the Assertion class for checking if an object is defined

2024-05-29 - 1.0.21 - General Updates

General updates and maintenance.

  • Updated description
  • Updated tsconfig
  • Updated npmextra.json: githost

2023-08-12 - 1.0.20 to 1.0.21 - General Fixes

General fixes and update.

  • Fixed core updates (multiple instances)
  • 1.0.21 release

2023-07-10 - 1.0.15 - Organization Update

  • Switched to new org scheme

2023-06-22 - 1.0.14 to 1.0.19 - General Updates

General fixes and updates.

  • Fixed core updates (multiple instances)
  • 1.0.18 to 1.0.16 releases

2022-02-02 - 1.0.8 to 1.0.13 - General Fixes

General fixes and update.

  • Fixed core updates (multiple instances)
  • 1.0.14 release

2022-01-20 - 1.0.1 to 1.0.7 - Initial Releases

Initial core updates and fixes.

  • Fixed core updates (multiple instances)
  • 1.0.7 release