Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# v0.1.8 February 21st, 2026

## 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](https://github.com/nevware21/tripwire/pull/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](https://github.com/nevware21/tripwire/pull/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](https://github.com/nevware21/tripwire/pull/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
- [#287](https://github.com/nevware21/tripwire/pull/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](https://github.com/nevware21/tripwire/pull/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](https://github.com/nevware21/tripwire/pull/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

For full details see [v0.1.7...v0.1.8](https://github.com/nevware21/tripwire/compare/v0.1.7...v0.1.8)

# v0.1.7 February 13th, 2026

## Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Install the npm package: `npm install @nevware21/tripwire --save-dev`
> Recommended: Use the following definition in your `package.json` to stay compatible with future releases.
> We do not intend to make runtime / environment breaking changes until at least v2.x
> ```json
> "@nevware21/tripwire": ">= 0.1.7 < 2.x"
> "@nevware21/tripwire": ">= 0.1.8 < 2.x"
> ```

## Usage
Expand Down
76 changes: 24 additions & 52 deletions common/config/rush/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ npm install @nevware21/tripwire --save-dev
```json
{
"devDependencies": {
"@nevware21/tripwire": ">= 0.1.7 < 2.x"
"@nevware21/tripwire": ">= 0.1.8 < 2.x"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nevware21/tripwire",
"description": "Test Support utilities, helpers, tools for testing in JavaScript and TypeScript.",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "https://github.com/nevware21/tripwire",
"license": "MIT",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ npm install @nevware21/tripwire --save-dev
```json
{
"devDependencies": {
"@nevware21/tripwire": ">= 0.1.7 < 2.x"
"@nevware21/tripwire": ">= 0.1.8 < 2.x"
}
}
```
Expand Down Expand Up @@ -100,7 +100,7 @@ npm install @nevware21/tripwire-chai --save-dev
```json
{
"devDependencies": {
"@nevware21/tripwire-chai": ">= 0.1.7 < 2.x"
"@nevware21/tripwire-chai": ">= 0.1.8 < 2.x"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/migrating-from-node-assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npm install @nevware21/tripwire --save-dev
```json
{
"devDependencies": {
"@nevware21/tripwire": ">= 0.1.7 < 2.x"
"@nevware21/tripwire": ">= 0.1.8 < 2.x"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nevware21/tripwire",
"description": "Test support utilities, helpers assertions",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "https://github.com/nevware21/tripwire",
"license": "MIT",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion shim/chai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ npm install @nevware21/tripwire-chai --save-dev
```json
{
"devDependencies": {
"@nevware21/tripwire-chai": ">= 0.1.7 < 2.x"
"@nevware21/tripwire-chai": ">= 0.1.8 < 2.x"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions shim/chai/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nevware21/tripwire-chai",
"description": "Tripwire Chai Extension",
"version": "0.1.7",
"version": "0.1.8",
"homepage": "https://github.com/nevware21/tripwire",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -61,7 +61,7 @@
"dependencies": {
"@nevware21/ts-utils": ">= 0.12.6 < 2.x",
"@nevware21/ts-async": ">= 0.5.4 < 2.x",
"@nevware21/tripwire": "0.1.7"
"@nevware21/tripwire": "0.1.8"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.34.4",
Expand Down