0.1.5
Breaking Changes
-
#253 refactor: Centralized format manager with parent-child hierarchy
- BREAKING: Formatter API completely restructured
assertConfig.format.formattersreplaced withassertConfig.$ops.formatMgrassertConfig.reset()→assertConfig.$ops.reset()assertConfig.clone()→assertConfig.$ops.clone()- Import path changed:
assert/config→config/assertConfig IFormatter,IRemovablemoved fromassert/interface/tointerface/- New formatter API methods:
addFormatter(),removeFormatter(),getFormatters(),forEach(),reset()
Migration:
// Before assertConfig.format.formatters = [myFormatter]; assertConfig.reset(); // After assertConfig.$ops.addFormatter(myFormatter); assertConfig.$ops.reset();
New Features
- #251 perf(core): Add lazy initialization for assert class functions
- Improves startup performance by deferring creation of ~100 assertion functions until first use
- Add
exprandnotproperties to IAssertClassDef for cleaner definition parsing
- #250 feat(core): Add optimized
createNotAdapterfor negation operations- New function wraps scope functions with "not" operation more efficiently than
createExprAdapter("not", scopeFn) - Avoids expression parsing overhead by directly applying negation context
- New function wraps scope functions with "not" operation more efficiently than
- #249 feat(chai-shim): Enable ownInclude, deepOwnInclude, and Map/Set keys assertions
- Implement
own.includeoperation for checking own properties only - Add
deep.own.includefor deep equality comparison of own properties - Enable tests for include, deepInclude, keys operations with Map/Set collections
- Implement
- #248 feat: Add
ifErrorassertion for Node.js error handling- Add
assert.ifError()andexpect().to.ifError()for Node.js-style callback error checking - Passes for falsy values, throws Error instances, fails for truthy non-Error values
- Add
- #247 feat: Implement deep keys assertions with ArrayLikeOrSizedIterable support
- Add
hasAnyDeepKeys,hasAllDeepKeys, and their negations - Keys parameter accepts Arrays, Sets, Maps, or any iterable collection
- Add
- #242 feat: Add
isNumberandisBooleanassertion methods - #241 feat: Add change/increase/decrease assertions with generic type support
- #240 feat: Implement
oneOfassertion with ArrayLikeOrSizedIterable support - #239 feat: Add
endsWithand subsequence member comparison functions - #238 feat: Add array member comparison assertions and deep equality support
- #232 feat: Add operator comparison function with typeof support
- #231 feat: Implement approximate equality assertions (
closeTo/approximately) - #228 feat(assertions): Implement
lengthOf/sizeOfassertions - #227 feat: Add nested property operations with Chai compatibility
- #226 feat: Add property value checking assertions with negation support
- #225 feat: Implement
exists/notExistsassertions - #224 feat: Implement
instanceOfassertion for type checking - #223 feat: Add
typeOfassertion support and enhance error handling - #219 feat: Add
isFiniteassertion for finite number validation - #218 feat: Add
isNaNassertion support - #217 feat: Add numeric comparison operations (
above/below/within)
Refactoring
- #233 refactor(core): Reorganize MsgSource type to dedicated type folder
Documentation & Maintenance
- #255 docs: Add migration guide for migrating from Chai to Tripwire
- #254 chore(codecov): Add explicit slug property to upload
- #243 chore: Update docs site
- #230 docs(copyright): Update copyright headers for 2025 changes
- #220 chore: Add Node.js 22 and 24 support, limit codecov to node 22
- #235 build(deps-dev): Bump @microsoft/rush from 5.165.0 to 5.166.0
What's Changed
Full Changelog: v0.1.4...v0.1.5