Repository navigation
chore: release - #35
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@codebelt/classy-store@0.8.0
Minor Changes
#34
10faa38Thanks @codeBelt! - Upgrade required from 0.7.x. Add observable utility status and simplify the public API. See the 0.8.0 upgrade guide for migration examples.getSnapshot(),getServerSnapshot(), andsubscribe(listener). Use the newuseHistoryStatus(history)React hook for undo/redo availability and recording state, andusePersistStatus(handle)for hydration, expiry, and persistence errors. Both expose disposal status and update even when store data does not change. Each hook accepts its matching handle type and shares an internal subscription implementation.save(),clear(), andrehydrate()calls reject on failure after reporting throughonErrorand status. These methods take no options; catch rejected promises in event handlers and effects. Automatic writes and initial hydration handle reported failures internally. Failed calls do not block later queued writes. Calls on disposed handles and explicit queued operations cancelled by disposal reject.dispose(). Theunsubscribe()method has been removed; update effect cleanups and other teardown calls tohandle.dispose(). Repeated disposal is safe and still stops listeners and timers, ignores pending reads, and skips queued writes that have not started.getVersionexport. Usesubscribe()for notifications or comparesnapshot()references for change detection. The version helper remains internal for persistence and core bookkeeping.UtilityStatusSourcetype internal. Use the exportedHistoryHandle,PersistHandle,HistoryStatus, andPersistStatustypes in consumers. Also exportPersistOperationfrom the utilities entry.prepareStoreForHydrationfrom@codebelt/classy-store/react/serveron both server and client. The duplicate export from@codebelt/classy-store/reacthas been removed.key. Serializers receive that property's readonly snapshot; deserializers must return the matching mutable property type. Existing transforms that return another property's type or mutate snapshot inputs now fail TypeScript checks. Persistence flags are readonly in the public types, matching their existing runtime getters.hydratedandisHydratedindicate that a hydration attempt has settled, including failure or an obsolete read. InspectlastError; await explicit operations and handle their errors when success matters. Utility status uses its initial snapshot during SSR/hydration; construct server and client handles with matching initial status.Reorganize React hooks and internal types by ownership, split computed tests by layer, and name regression suites by behavior. This structural cleanup preserves runtime behavior and package entry points.