Releases: komed3/cmpstr
Release list
vers. 3.3.0
The CmpStr 3.3 quality update focuses on performance improvements and internal refinements. This includes new bundle exports and added validation for options. Internal stress tests show a performance boost of 10%+ thanks to improved filter and normalization pipelines, the redesigned hash table, and faster pooling.
What’s New
- Validator for CmpStr options in class
OptionsValidatorimplemented (#100) - New exports
cmpstr/bundleandcmpstr/bundle/minadded topackage.json ErrorCodeenum added- New
RingPooltypearr[]added
Changes & Fixes
- Overall performance improvements and bug fixes (#101)
DeepMergeutility rewritten to static class methodsCmpStr.matrix()andCmpStrAsync.matrix()computation optimized
Note: Methods now only work with symmetric metrics!- Bug fix in
MetricandPhoneticclasses: cache key handling fixed whenfalseis returned - Bug fix in
Phonetic.applyRules(): rule for string end now evaluated correctly Errorsutility revised: improved error chaining and renamed methods- Improved pipelines for
FilterandNormalizer - Pointer calculation fixed in
Pool.acquire() - Type definition fix in
createFromRegistryfunction - Improved performance in
StructuredDataclass
Announcement
The TextAnalyzer and DiffChecker utilities will be moved to separate packages with the next update in order to streamline the CmpStr code. Stay tuned for the upcoming release of CmpStr 4.0, which will feature a complete redesign of the library.
Full Changelog: v3.2.2...v3.3.0
vers. 3.2.2
New patch provides revised error handling to consistently capture errors across the project. Additional critical code locations have been wrapped for error logging. Sourcemap files are no longer generated to reduce build time and size. If you still require them, please report here.
What’s New
- New, consistent error handling using built-in utility (#99)
- Error handling added to critical parts of the code
Changes & Fixes
- Build no longer provides source map files to reduce bundle size
- Build times improved significantly
- Upgraded dev dependencies to their latest versions
Known ToDo’s
- Supported input validation for CmpStr settings
Full Changelog: v3.2.1...v3.2.2
vers. 3.2.1
This small patch covers just a few fixes following the major v3.2 update. Notable change includes the deployment of technical documentation for all classes, methods, functions, and types, providing developers with deep insight into the architecture of CmpStr.
What’s New
- Technical documentation, generated via Typedoc, deployed on GitHub pages
- New
FilterHooktype introduced as a literal union with autocompletion of internally defined hooks - New method
Filter.clearPipeline()added
Changes & Fixes
- Type fix:
StructuredDataResult.keycorrected fromstring | number | symboltokeyof T - Dev dependencies updated to latest versions
Known ToDo’s
- Entirely revised error handling to provide more precise error messages
Full Changelog: v3.2.0...v3.2.1
vers. 3.2.0
This release focuses on a comprehensive internal overhaul with a strong emphasis on performance, correctness, and long-term maintainability. While the public API changes are deliberately minimal, large parts of the internal architecture were refined, resulting in faster execution, improved caching behavior, better memory safety, and more predictable results across synchronous and asynchronous workflows.
What’s New
Public API:
- Added
Filter.has()to check for the existence of registered filters per hook - Introduced unified return type aliases for comparison operations:
ResultLike,BatchResultLikeStructuredResultLike
- Renamed
TextAnalyzer.getUnicodeStats()toTextAnalyzer.getUnicodeCodepoints() - Added new
TextAnalyzermetrics:getAvgSyllablesPerWord()getMedianSyllablesPerWord()
Root / Advanced Access:
- Exposed
Hasher.fastFNV1a()for high-performance hashing use cases
Changes & Fixes
Performance & Memory:
- Eliminated potential memory leaks by guarding pool allocations with
try / finally - Replaced
Uint16ArraywithInt32Arrayto correctly handle negative values - Improved performance through static
RegExpconstruction - Optimized score-based metrics (Needleman–Wunsch, Smith–Waterman) using
Int32Array - Reduced local allocations in hash generators for faster execution
- Added optional LRU support to hash tables and fixed overflow detection
- Replaced modulo operations with bit masking for pool pointer arithmetic
Caching & Correctness:
- Fixed incorrect cache hits for metrics and phonetic algorithms with differing options
- Added missing cache layer in async phonetic index computation
- Performed input swapping (shorter string first) for symmetric metrics before cache lookup
- Fixed incorrect handling of the phonetic
middlerule - Normalizer now uses canonicalized flags to improve cache efficiency
Internal Architecture:
- Filters now use per-hook
Mapinstances for faster lookup - Filters precompute execution pipelines per hook to reduce runtime overhead
- DeepMerge utility optimized via linear traversal and path caching
- Pool implementation fixed pointer positioning and improved utilization
- Profiler now selects predefined timing and memory functions based on the detected runtime environment
- Registry and profiler services are now frozen via
Object.freeze()
TextAnalyzer Improvements:
- Significant performance gains through caching
- Improved handling of special characters and Unicode edge cases
Type System & Documentation:
- Refined TypeScript types across the codebase
- Updated inline documentation to reflect the new internal structure
Tooling, CI & Project Maintenance
- Full codebase refactor (
+2,600/-2,400lines changed) - Performance-focused pull request: vers. 3.2 / performance enhancement
- All CI checks and internal test suites passed
- TypeScript configuration migrated to
NodeNext - Expanded and improved linting rules
- Development dependencies updated to their latest versions
- Test coverage expanded to 70 tests, including edge cases
- Added dedicated stress test suite
- Documentation updates:
- Revised
README.md - Added
SECURITY.md - Added
CONTRIBUTING.md
- Revised
CmpStr v3.2.0 is a performance- and quality-driven release that strengthens the foundation of the library while keeping the public API stable. It prepares the project for future feature work without compromising determinism or reliability.
Full Changelog: v3.1.1...v3.2.0
vers. 3.1.1
This patch addresses handling of duplicate key values within structured data, e.g.:
[ { "id": 631, "name": "John" }, { "id": 2141, "name": "Peter" }, { "id": 3419, "name": "John" } ]Now they're mapped internally and put together just like the original after processing.
Changes & Fixes
- Handling duplicate values within structured data
- Using package-verify to check valid tarball contents
- Minor performance tweaks in
HasherandPool
Full Changelog: v3.1.0...v3.1.1
vers. 3.1.0
Version 3.1 marks the first big update for CmpStr since its major code overhaul. In addition to several bug fixes and minor adjustments, the most notable new feature adds support for structured data while performing similarity search.
The API has been expanded with corresponding methods, both synchronously and asynchronously, now offering simplified handling of passed array objects.
Please note: This feature is new and hasn't been tested yet.
What’s New
- Dealing with structured data (#82)
Changes & Fixes
- Return types for API methods now default to
anyfor easier handling - Added new Pool type
string[] - TypeScript types revised and adapted
- Root export for browser bundles (includes all important classes)
- Dev dependencies updated to their latest versions
- Workflow files updated, Node.js version set to 24.x.
- Use OIDC for secure publishing
Full Changelog: v3.0.4...v3.1.0
vers. 3.0.4
The patch provides access to essential classes, methods, and utilities using the specific cmpstr/root entry point. This allows third-party developers to effortlessly enhance CmpStr with supplementary metrics and phonetics while ensuring type consistency. Additionally, the deprecated module resolution node has been updated to node16, exports and rollup definitions have been improved, and the package size has been considerably minimized through optimized and cleaned-up builds.
Changes & Fixes
- Developer entry point for accessing classes, methods and utilities added
- Cleaned up builds with smaller package size
- Deprecated module resolution
nodereplaced withnode16 - Export order and minor rollup fixes
Full Changelog: v3.0.3...v3.0.4
vers. 3.0.3
This minor release introduces a new fail-safe mode for handling empty inputs. To utilize this feature, set safeEmpty: true, which will return [] in cases where one or both inputs might be empty. When safeEmpty is enabled, empty input arrays or strings will yield an empty array rather than generating an error. The default behavior remains unchanged.
Changes & Fixes
- Fail safe mode for empty inputs added
- Minor fixes and dependency updates
Full Changelog: v3.0.2...v3.0.3
vers. 3.0.2
This update is expected to make CJS/EMS and TypeScript type declarations more stable for development environment. In addition to minor fixes and updated dependencies, version 3.0.2 implements Caverphone as an additional phonetic algorithm. To improve phonetic handling, mappings receive additional instructions and patterns (using regular syntax), as well as improved, hierarchical loading of options.
Changes & Fixes
- Hierarchical loading of phonetic options improved
- Phonetic mappings can now define additional options
- Introduce
patternsto phonetic mapping - Caverphone phonetic algorithm added
dist/emsfile extention fixedpackage.jsonfixed for module/type usage- Minor fixes and dependency updates
Full Changelog: v3.0.1...v3.0.2
vers. 3.0.1
This patch fixes issues with CommonJS and cleans up package.json to remove duplicate entries for main, types and module.
Changes & Fixes
- Remove duplicate package.json entry by @lamualfa in #6
- CmpStr now requires Node.js version 18 or later
Full Changelog: v3.0.0...v3.0.1