fix(core): Fix state initialization, hash detection, and validation - v2.0.25
Some checks failed
Default (tags) / security (push) Successful in 42s
Default (tags) / test (push) Successful in 1m8s
Default (tags) / release (push) Failing after 59s
Default (tags) / metadata (push) Successful in 1m8s

This commit is contained in:
2025-07-29 19:26:03 +00:00
parent 09fc53aaff
commit 02575e8baf
8 changed files with 370 additions and 61 deletions

View File

@@ -1,5 +1,18 @@
# Changelog
## 2025-07-29 - 2.0.25 - fix(core)
Major state initialization and validation improvements
- Fixed state hash bug: Now properly compares hash values instead of storing state objects
- Fixed state initialization merge order: Initial state now correctly takes precedence over stored state
- Improved type safety: stateStore properly typed as potentially undefined
- Simplified init mode logic with clear behavior for 'soft', 'mandatory', 'force', and 'persistent'
- Added state validation with extensible validateState() method
- Made notifyChange() async to support proper hash comparison
- Enhanced select() to filter undefined states automatically
- Added comprehensive test suite for state initialization scenarios
- Updated documentation with clearer examples and improved readme
## 2025-07-19 - 2.0.24 - fix(core)
Multiple fixes and improvements