Skip to content

Releases: komed3/cmpstr

vers. 3.3.0

Choose a tag to compare

@komed3 komed3 released this 18 Mar 08:17
3699f85

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 OptionsValidator implemented (#100)
  • New exports cmpstr/bundle and cmpstr/bundle/min added to package.json
  • ErrorCode enum added
  • New RingPool type arr[] added

Changes & Fixes

  • Overall performance improvements and bug fixes (#101)
  • DeepMerge utility rewritten to static class methods
  • CmpStr.matrix() and CmpStrAsync.matrix() computation optimized
    Note: Methods now only work with symmetric metrics!
  • Bug fix in Metric and Phonetic classes: cache key handling fixed when false is returned
  • Bug fix in Phonetic.applyRules(): rule for string end now evaluated correctly
  • Errors utility revised: improved error chaining and renamed methods
  • Improved pipelines for Filter and Normalizer
  • Pointer calculation fixed in Pool.acquire()
  • Type definition fix in createFromRegistry function
  • Improved performance in StructuredData class

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

Choose a tag to compare

@komed3 komed3 released this 11 Mar 09:12
bb61120

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

Choose a tag to compare

@komed3 komed3 released this 30 Jan 09:41
3439ccb

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 FilterHook type introduced as a literal union with autocompletion of internally defined hooks
  • New method Filter.clearPipeline() added

Changes & Fixes

  • Type fix: StructuredDataResult.key corrected from string | number | symbol to keyof 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

Choose a tag to compare

@komed3 komed3 released this 22 Jan 13:15
6929b12

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, BatchResultLike
    • StructuredResultLike
  • Renamed TextAnalyzer.getUnicodeStats() to TextAnalyzer.getUnicodeCodepoints()
  • Added new TextAnalyzer metrics:
    • 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 Uint16Array with Int32Array to correctly handle negative values
  • Improved performance through static RegExp construction
  • 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 middle rule
  • Normalizer now uses canonicalized flags to improve cache efficiency

Internal Architecture:

  • Filters now use per-hook Map instances 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,400 lines 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

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

Choose a tag to compare

@komed3 komed3 released this 19 Jan 22:15
a140f52

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 Hasher and Pool

Full Changelog: v3.1.0...v3.1.1

vers. 3.1.0

Choose a tag to compare

@komed3 komed3 released this 17 Jan 17:21
76aadb9

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 any for 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

Choose a tag to compare

@komed3 komed3 released this 15 Sep 14:45
74e65a5

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 node replaced with node16
  • Export order and minor rollup fixes

Full Changelog: v3.0.3...v3.0.4

vers. 3.0.3

Choose a tag to compare

@komed3 komed3 released this 13 Aug 10:21
462b952

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

Choose a tag to compare

@komed3 komed3 released this 20 Jul 10:25
522ae69

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 patterns to phonetic mapping
  • Caverphone phonetic algorithm added
  • dist/ems file extention fixed
  • package.json fixed for module/type usage
  • Minor fixes and dependency updates

Full Changelog: v3.0.1...v3.0.2

vers. 3.0.1

Choose a tag to compare

@komed3 komed3 released this 14 Jun 21:57
052fa0c

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