Releases: nevware21/tripwire
Release list
0.1.8
Performance Optimizations
This release focuses heavily on performance improvements across critical code paths, with optimizations to array operations, circular reference detection, property access patterns, and test execution.
- #281 perf: Implement critical performance optimizations for hot paths
- Remove objDefine getters from hot path properties (opts, value, orgArgs)
- Change property accessors from getter functions to direct assignments for faster access
- Extract and export
_extractArgs()for cleaner argument handling - Reorder formatters by probability (String, Object, Array first) to minimize checks
- Add configurable prototype chain depth limiting (maxProtoDepth: 4) to prevent excessive traversal
- Centralize formatting logic in format manager with convenience method
- #279 perf: Optimize array operations, string formatting, and property access patterns
- Replace O(n²) splice operations with O(n) boolean array tracking in member comparison functions
- Eliminate shift() usage by using index-based array access and arrSlice for argument handling
- Replace string concatenation with array.join() pattern for error message building
- Add deduplication logic using hash map for O(1) lookups in object key retrieval
- Cache array.length and string.length values to avoid repeated property access
- Move maxFormatDepth from IConfig to IFormatterOptions for better organization
- Add maxProps option to IFormatterOptions to control formatting output size (default: 8 items/properties)
- #277 perf: Add max depth limits and optimize circular reference detection
- Add configurable depth limits to prevent stack overflow and O(n²) degradation:
- maxFormatDepth (default: 50): Limits formatting recursion depth
- maxCompareDepth (default: 100): Limits deep equality comparison depth
- maxCompareCheckDepth (default: 50): Limits circular reference check iterations
- Refactor _deepEqual to require context parameter ensuring configuration flows through properly
- Optimize circular reference detection by searching backwards through visited list for better cache locality
- Respect maxCompareCheckDepth to prevent O(n²) behavior in deeply nested structures
- Update _formatValue to respect maxFormatDepth limit and treat excessive nesting as circular references
- Add configurable depth limits to prevent stack overflow and O(n²) degradation:
- #287 perf: Fix worker test execution excessive delay
- Switch worker tests to mocha + karma-typescript with adapter/runner flow and suite-aware reporting
- Normalize browser/worker test globs and coverage exclusions to reduce noise
- Add environment sanity tests for browser/node/worker environments
- Update test scripts to remove rollup preprocessor usage and align dev deps
Test Coverage Improvements
- #278 test: Add edge case tests for deepEqual and include operations
- Comprehensive test coverage for special values (NaN, symbols, BigInt, 0/-0)
- Complex structures (Map, Set, WeakMap, WeakSet, typed arrays)
- Circular references and depth limits
- Own vs inherited property handling
- #279 test: Add comprehensive formatter and deepEqual test suites
- Add defaultFormatters.test.ts (370+ lines) covering Symbol, Date, Set, Map, Error, Function, RegExp formatters
- Add extensive deepEqual.test.ts (560+ lines) covering deep comparison edge cases
- Coverage increased from ~10% to 90.85% for formatters, ~45% to 89.03% for equal.ts
What's Changed
- perf: Add max depth limits and optimize circular reference detection by @nev21 in #277
- test: add edge case tests for deepEqual and include operations by @nev21 in #278
- perf: optimize array operations, string formatting, and property access patterns by @nev21 in #279
- Increase unit test timeout to 20 minutes by @nev21 in #280
- build(deps-dev): bump @microsoft/rush from 5.167.0 to 5.169.1 in the dev group by @dependabot[bot] in #283
- build(deps-dev): bump typedoc-github-theme from 0.3.1 to 0.4.0 by @dependabot[bot] in #284
- perf: Fix worker test execution excessive delay by @nev21 in #287
- perf: Implement critical performance optimizations for hot paths by @nev21 in #281
- [Release] Increase version to 0.1.8 by @nev21 in #288
Full Changelog: v0.1.7...v0.1.8
0.1.7
Bug Fixes
- #273 Fix deepStrictEqual to perform deep value comparison
- Changed
deepStrictEqualto use deep value comparison instead of strict instance comparison - Now properly compares nested object values, arrays, and complex structures
- Aligns behavior with Node.js assert.deepStrictEqual semantics
- Maintains strict type checking while performing recursive value comparison
- Changed
What's Changed
- Add CODEOWNERS file for tripwire approvers by @nev21 in #265
- Revise CODEOWNERS file for clarity by @nev21 in #266
- Update CODEOWNERS to reflect new team by @nev21 in #267
- docs: Update copilot instructions by @nev21 in #268
- Add Node.js assert migration guide documenting deepStrictEqual behavioral difference by @Copilot in #270
- Fix deepStrictEqual to perform deep value comparison by @Copilot in #273
- fix(deepEqual): prevent null return breaking nested Promise/function comparisons by @nev21 in #275
- [Release] Increase version to 0.1.7 by @Copilot in #274
Full Changelog: v0.1.6...v0.1.7
0.1.6
Changelog
- #262 feat: Add Mocha Assertion Compatibility for updating actual, expected values
- Make assertion error properties mutable, preserving their original values in new
orgValuesproperty when changed - Support "silent" readonly of immutable properties to avoid unexpected exceptions
- Enables better compatibility with Mocha and other test frameworks that modify assertion error properties
- Make assertion error properties mutable, preserving their original values in new
- #260 build(deps-dev): Bump @microsoft/rush from 5.166.0 to 5.167.0 in the dev group
- #258 Bump @nevware21/ts-utils to 0.12.6
Refactoring
- Added lint-fix as part of the rebuild process for code quality
What's Changed
- Bump @nevware21/ts-utils to 0.12.6 by @Copilot in #258
- build(deps-dev): bump @microsoft/rush from 5.166.0 to 5.167.0 in the dev group by @dependabot[bot] in #260
- #261 [Compat] Mocha Assertion Compatibility for updating actual, expected values by @nev21 in #262
- Delete .github/workflows/pr-auto-approve.yml by @nev21 in #263
- [Release] Increase version to 0.1.6 by @nev21 in #264
Full Changelog: v0.1.5...v0.1.6
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
0.1.4
Changelog
- Fix TypeScript compilation errors in test files for stricter type checking
- Fixed possibly undefined
error.stackanderror.propsreferences with non-null assertions - Fixed
nullarguments in AssertionError constructors - useundefinedinstead - Fixed missing property initialization in test class constructors
- Fixed missing required arguments in hasPropertyDescriptor test cases
- All tests now compile cleanly with TypeScript ~5.2.2
- Fixed possibly undefined
What's Changed
- Implementation improvements: by @nev21 in #215
- [Release] Increase version to 0.1.4 by @nev21 in #216
Full Changelog: v0.1.3...v0.1.4
0.1.3
Changelog
- #186 feat: Add finalize option for post-processing formatted output
- Add new
finalizeandfinalizeFnoptions toIFormatterOptionsinterface to control post-processing of formatted assertion error messages - When
finalize: trueis set without a customfinalizeFn, automatically usesescapeAnsifrom @nevware21/chromacon to escape ANSI codes for display as literal characters - Finalization is applied once to the complete formatted output string in
_formatValue()for consistent processing - Enables powerful use cases:
- Escape ANSI codes for proper terminal display without interpreting color codes
- Colorize escaped ANSI sequences (e.g., display in gray) for better readability
- Convert output to HTML-safe format for web-based test runners and reports
- Wrap or decorate formatted messages with custom styling or metadata
- Apply any custom transformation to final assertion error output
- Updated
assertConfigdefaults to include the new finalization options - Reduced karma worker log level from DEBUG to INFO for faster test startup times
- Add new
- #105 Add WeakSet and WeakMap checks
- Add support for WeakMap and WeakSet in equality comparison operations using strict equality checks
- Add
isEmptyvalidation for WeakMap and WeakSet collections - Note: WeakMap and WeakSet do not expose a size property, so emptiness cannot be determined directly - the implementation handles these special cases appropriately
- Enables proper testing of code using ES6 weak collections
What's Changed
- Bump to typedoc ^0.28.2, Bump to typescript ~5.2.2 by @nev21 in #96
- build(deps-dev): bump @microsoft/rush from 5.151.0 to 5.153.0 by @dependabot[bot] in #100
- build(deps-dev): bump @microsoft/rush from 5.153.0 to 5.153.1 by @dependabot[bot] in #104
- Add WeekSet and WeakMap checks by @nev21 in #105
- bump @microsoft/rush from 5.153.1 to 5.153.2 by @nev21 in #112
- build(deps-dev): bump @microsoft/rush from 5.153.2 to 5.155.0 by @dependabot[bot] in #121
- build(deps-dev): bump @microsoft/rush from 5.155.0 to 5.155.1 by @dependabot[bot] in #127
- build(deps-dev): bump @microsoft/rush from 5.155.1 to 5.157.0 by @dependabot[bot] in #129
- build(deps-dev): bump @microsoft/rush from 5.157.0 to 5.158.1 by @dependabot[bot] in #142
- build(deps): bump actions/setup-node from 4 to 5 by @dependabot[bot] in #146
- build(deps-dev): bump @microsoft/rush from 5.158.1 to 5.162.0 by @dependabot[bot] in #161
- build(deps): bump github/codeql-action from 3 to 4 by @dependabot[bot] in #157
- build(deps): bump actions/checkout from 4 to 5 by @dependabot[bot] in #134
- build(deps): bump actions/upload-pages-artifact from 3 to 4 by @dependabot[bot] in #138
- build(deps-dev): bump @types/sinon from 17.0.4 to 20.0.0 by @dependabot[bot] in #164
- Update npm version in rush settings by @nev21 in #167
- build(deps): bump actions/setup-node from 5 to 6 by @dependabot[bot] in #162
- Add Copilot instructions for repository context by @Copilot in #166
- build(deps-dev): bump @types/sinon from 20.0.0 to 21.0.0 by @dependabot[bot] in #169
- Add Dependabot auto-merge workflow by @nev21 in #175
- build(deps): bump actions/checkout from 5 to 6 by @dependabot[bot] in #171
- build(deps): bump peter-evans/rebase from 2 to 3 by @dependabot[bot] in #176
- build(deps-dev): bump @microsoft/rush from 5.162.0 to 5.163.0 by @dependabot[bot] in #174
- Update to use Chromacon for error messages by @nev21 in #177
- Update dependabot actions by @nev21 in #178
- Fix broken typedoc deployment by @nev21 in #179
- Additional steps to try and fix typedoc deployment by @nev21 in #180
- build(deps): bump peter-evans/rebase from 2 to 4 by @dependabot[bot] in #182
- Enhance Rush version sync workflow by @nev21 in #184
- Include common/scripts folder in sync process by @nev21 in #185
- build(deps-dev): bump @microsoft/rush from 5.163.0 to 5.164.0 by @dependabot[bot] in #183
- feat: Add finalize option for post-processing formatted output by @nev21 in #186
- Remove git config for dependabot user by @nev21 in #193
- Revert "Remove git config for dependabot user (#193)" by @nev21 in #194
- Add dependabot-sync[bot] to auto-approve workflow actors by @Copilot in #202
- Remove force rebase workflow by @nev21 in #203
- Fix sync-rush-versions workflow permissions for Dependabot PRs by @Copilot in #204
- Use official Dependabot bot account in sync-rush-versions workflow by @Copilot in #205
- build(deps-dev): bump @microsoft/rush from 5.164.0 to 5.165.0 by @dependabot[bot] in #192
- Update sync-rush-versions.yml by @nev21 in #206
- Delete .github/workflows/sync-rush-versions.yml by @nev21 in #210
- Update conditions for auto-approve job by @nev21 in #211
- build(deps-dev): bump @types/node from 24.10.4 to 25.0.3 in /core by @dependabot[bot] in #201
- build(deps-dev): bump cross-env from 7.0.3 to 10.1.0 in /core by @dependabot[bot] in #191
- build(deps-dev): bump the rollup group across 1 directory with 5 updates by @dependabot[bot] in #213
New Contributors
- @Copilot made their first contribution in #166
Full Changelog: v0.1.2...v0.1.3
0.1.2
Changelog
- #16 Update to ts-utils 0.11.4
- #17 typedoc: Update auto-deploy job
- #18 Update and rename .github/workflows/dependabot.yml to .github/dependaboy.yml
- #28 Bump @microsoft/rush from 5.130.2 to 5.140.1
- #30 Update codeql actions
- #24 build(deps-dev): bump @types/sinon from 10.0.20 to 17.0.3
- #22 build(deps): bump actions/configure-pages from 4 to 5
- #31 build(deps): bump codecov/codecov-action from 2 to 5
- #32 Update to use ts-build-tools instead of local
- #39 Create FUNDING.yml
- #40 Update FUNDING.yml
- #25 build(deps-dev): bump @types/eslint from 8.56.12 to 9.6.1
- #55 bump @microsoft/rush from 5.140.1 to 5.147.1
- #77 Add IncludesOp value checks and includeMembers for chai shim
- Add includes
valuechecks - Add
includeMembersfor chai shim - bump @microsoft/rush from 5.147.1 to 5.151.0
- Add includes
What's Changed
- Update to ts-utils 0.11.4 by @nev21 in #16
- typedoc: Update auto-deploy job by @nev21 in #17
- Update and rename .github/workflows/dependabot.yml to .github/dependaboy.yml by @nev21 in #18
- Bump @microsoft/rush from 5.130.2 to 5.140.1 by @nev21 in #28
- Update codeql actions by @nev21 in #30
- build(deps-dev): bump @types/sinon from 10.0.20 to 17.0.3 by @dependabot in #24
- build(deps): bump actions/configure-pages from 4 to 5 by @dependabot in #22
- build(deps): bump codecov/codecov-action from 2 to 5 by @dependabot in #31
- Update to use ts-build-tools instead of local by @nev21 in #32
- Create FUNDING.yml by @nev21 in #39
- Update FUNDING.yml by @nev21 in #40
- build(deps-dev): bump @types/eslint from 8.56.12 to 9.6.1 by @dependabot in #25
- bump @microsoft/rush from 5.140.1 to 5.147.1 by @nev21 in #55
- Add IncludesOp value checks and includeMembers for chai shim by @nev21 in #77
- [Release] Increase version to 0.1.2 by @nev21 in #93
New Contributors
- @dependabot made their first contribution in #24
Full Changelog: v0.1.1...v0.1.2
0.1.1
Changelog
#9 [Bug] Chai Shim for equals / notEquals is not the same
#8 Revert: Fix code scanning alert #1: Shell command built from environment values (#4)
#12 chore: Auto generate docs on push
#13 chore: Update Readme.md to include badges and link to typedoc
#14 Remove generated typedoc docs from repo
What's Changed
- Revert: Fix code scanning alert #1: Shell command built from environment values (#4) by @nev21 in #8
- chore: Auto generate docs on push by @nev21 in #12
- chore: Update Readme.md to include badges and link to typedoc by @nev21 in #13
- [Bug] Chai Shim for equals / notEquals is not the same #9 by @nev21 in #11
- chore: Remove generated typedoc docs from repo by @nev21 in #14
- [Release] Increase version to 0.1.1 by @nev21 in #15
Full Changelog: v0.1.0...v0.1.1
0.1.0
Changelog
- #7 Extend default timeout for addAssertFunc tests
- #5 Add code coverage settings
- #4 Fix code scanning alert #1: Shell command built from environment values
- #3 chore: Fixup docs readme links
- #2 chore: Fix typedoc source reference and theme
- #1 Initial Prototype
What's Changed
- Initial Prototype by @nev21 in #1
- chore: Fix typedoc source reference and theme by @nev21 in #2
- chore: Fixup docs readme links by @nev21 in #3
- Add code coverage settings by @nev21 in #5
- Fix code scanning alert #1: Shell command built from environment values by @nev21 in #4
- Extend default timeout for addAssertFunc tests by @nev21 in #7
- [Release] Initial Release 0.1.0 by @nev21 in #6
Full Changelog: https://github.com/nevware21/tripwire/commits/v0.1.0