Skip to content

V5.0.0 - #128

Merged
fed135 merged 14 commits into
nextfrom
v5.0.0
Jan 11, 2026
Merged

V5.0.0#128
fed135 merged 14 commits into
nextfrom
v5.0.0

Conversation

@fed135

@fed135 fed135 commented Nov 19, 2025

Copy link
Copy Markdown
Owner

Summary

v5.0.0 RC

Maintenance

  • Typescript source rewrite
  • Modernized toolchain (linter, testing, building)
  • Added code examples
  • Removed .npmignore in favour of package.json files (safer)
  • Added prepublish build script and husky for pre-commit lint

Minor changes

  • Removed deferred event logger for more accurate tracing
  • Added common resolvers submodule

Breaking changes

  • Changed HAStore constructor signature to be more concise and explicit
    • Cache: Now caches is a list of ready-to-use stores and will no longer hydrate as in-memory by default.
    • Batch: Presence of a truthy value is now the indicator for batching being enabled.
  • Moved common internal submodules to be accessible via the main import (a side benefit of having to bundle the final dist)
  • The new internal cache modules mean that ha-store-redis will now be deprecated.

Merge Checklist

  • Verified locally
  • Unit Tests added
  • Integration tests added
  • Unit tests pass locally
  • Integration tests pass locally

Comment thread src/options.ts Outdated
Comment on lines +14 to +15
if (config.delimiter && (!Array.isArray(config.delimiter) || config.delimiter.some(d => typeof d !== 'string'))) throw new Error('delimiter is not an array of strings');
if (config.caches && (!Array.isArray(config.caches) || config.caches.some(d => typeof d?.local === 'undefined' || typeof d?.get !== 'function'))) throw new Error('invalid cache instance');

@mats852 mats852 Nov 28, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there seems to be validation of the config object in multiple places, would it make sense to encapsulate that in one place and leveraging type checking?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the narrative being that if objects are validated at creation, we can assume them valid throughout the runtime

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does seem that way, though I fear it's because of the polymorphism in the config (Accepting falsey/nullish values when we want to disable a given feature).

I tried to perform all validations and checks that would lead to errors in that file, but I'm open to better ideas. Both in terms of the interface and subsequent checks.

@fed135
fed135 marked this pull request as ready for review December 3, 2025 21:21
@fed135
fed135 requested review from drawm, mats852 and stiliyan December 4, 2025 17:46
Comment thread tests/profiling/index.ts Outdated
Co-authored-by: Mathieu St-Vincent <6082025+mats852@users.noreply.github.com>
@fed135

fed135 commented Jan 1, 2026

Copy link
Copy Markdown
Owner Author

Happy new years everyone. I'm happy to keep collecting comments, though I'd really like to merge at some point.

I am targeting January 9th unless there is an objection.

@fed135
fed135 merged commit 50a57e7 into next Jan 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants