From 260dfb65fd3c895d0dbd3da745e133ec85b99598 Mon Sep 17 00:00:00 2001 From: Nev Date: Sat, 21 Feb 2026 18:49:57 -0800 Subject: [PATCH] [Release] Increase version to 0.1.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Performance-focused release with critical optimizations to hot paths, array operations, circular reference detection, and test execution. Changes: - Update all package versions to 0.1.8 - Add v0.1.8 entry to CHANGELIST.md with full details - Update recommended version in all README and documentation files (0.1.7 → 0.1.8) Key performance improvements include: - Remove objDefine getters from hot path properties - Replace O(n²) splice operations with O(n) boolean tracking - Optimize circular reference detection - Add configurable depth limits (maxFormatDepth, maxCompareDepth, maxProtoDepth) - Fix worker test execution delay - Test coverage improvements: formatters (10% → 90.85%), equal.ts (45% → 89.03%) --- CHANGELIST.md | 50 +++++++++++++ README.md | 2 +- common/config/rush/npm-shrinkwrap.json | 76 +++++++------------- core/README.md | 2 +- core/package.json | 2 +- docs/README.md | 4 +- docs/migration/migrating-from-node-assert.md | 2 +- package.json | 2 +- shim/chai/README.md | 2 +- shim/chai/package.json | 4 +- 10 files changed, 84 insertions(+), 62 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index b593a67..75f9335 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -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 diff --git a/README.md b/README.md index 27408dd..6cee2ed 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/common/config/rush/npm-shrinkwrap.json b/common/config/rush/npm-shrinkwrap.json index 9087d8b..5b87e1f 100644 --- a/common/config/rush/npm-shrinkwrap.json +++ b/common/config/rush/npm-shrinkwrap.json @@ -1201,7 +1201,7 @@ "node_modules/@rush-temp/tripwire-chai": { "version": "0.0.0", "resolved": "file:projects/tripwire-chai.tgz", - "integrity": "sha512-zoPXXIOCXC8IgmHdvA/E/DRvS9k7dTHruBKZ67Q+ugEb9wNmKAhQm7oTgV7CNPZ1Eg6RpeEpJORO2uP1jy5gjQ==", + "integrity": "sha512-BqSAypyPGT3OS+uLwPrlczEP5uSEFRF3DSYDow5QH/D40UcpyAsF1c43YnLV+9YacD/rABbBEmIAViCbe1th2A==", "dependencies": { "@microsoft/api-extractor": "^7.34.4", "@nevware21/coverage-tools": "^0.1.3", @@ -2457,9 +2457,9 @@ } }, "node_modules/copyfiles/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.3.tgz", + "integrity": "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3656,9 +3656,9 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.3.tgz", + "integrity": "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4225,9 +4225,9 @@ } }, "node_modules/ignore-walk/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.3.tgz", + "integrity": "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4953,9 +4953,9 @@ } }, "node_modules/karma-typescript/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.3.tgz", + "integrity": "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4994,9 +4994,9 @@ } }, "node_modules/karma/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.3.tgz", + "integrity": "sha512-M2GCs7Vk83NxkUyQV1bkABc4yxgz9kILhHImZiBPAZ9ybuvCb0/H7lEl5XvIg3g+9d4eNotkZA5IWwYl0tibaA==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -5433,21 +5433,6 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "peer": true }, - "node_modules/mocha/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "peer": true - }, - "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "peer": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/mocha/node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", @@ -5537,12 +5522,12 @@ } }, "node_modules/mocha/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.6.tgz", + "integrity": "sha512-kQAVowdR33euIqeA0+VZTDqU+qo1IeVY+hrKYtZMio3Pg0P0vuh/kwRylLUddJhB6pf3q/botcOvRtx4IN1wqQ==", "peer": true, "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -7798,25 +7783,12 @@ "typedoc": "~0.28.0" } }, - "node_modules/typedoc/node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/typedoc/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.6.tgz", + "integrity": "sha512-kQAVowdR33euIqeA0+VZTDqU+qo1IeVY+hrKYtZMio3Pg0P0vuh/kwRylLUddJhB6pf3q/botcOvRtx4IN1wqQ==", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" diff --git a/core/README.md b/core/README.md index d3ccfb5..a16b42a 100644 --- a/core/README.md +++ b/core/README.md @@ -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" } } ``` diff --git a/core/package.json b/core/package.json index 413dabd..8aa25e8 100644 --- a/core/package.json +++ b/core/package.json @@ -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": { diff --git a/docs/README.md b/docs/README.md index 4f7024d..5d0ab18 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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" } } ``` @@ -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" } } ``` diff --git a/docs/migration/migrating-from-node-assert.md b/docs/migration/migrating-from-node-assert.md index 64ab9e5..7ede045 100644 --- a/docs/migration/migrating-from-node-assert.md +++ b/docs/migration/migrating-from-node-assert.md @@ -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" } } ``` diff --git a/package.json b/package.json index 311e312..cd8df7b 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/shim/chai/README.md b/shim/chai/README.md index 452bb08..1f758a2 100644 --- a/shim/chai/README.md +++ b/shim/chai/README.md @@ -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" } } ``` diff --git a/shim/chai/package.json b/shim/chai/package.json index e92fa45..af46c83 100644 --- a/shim/chai/package.json +++ b/shim/chai/package.json @@ -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": { @@ -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",