Skip to content

Commit

Permalink
Version Packages (#70)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] committed Jun 28, 2022
1 parent b6c9fc8 commit df60219
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 0 additions & 9 deletions .changeset/silver-drinks-notice.md

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 5.0.0

### Major Changes

- [#69](https://github.com/tivac/xstate-component-tree/pull/69) [`b6c9fc8`](https://github.com/tivac/xstate-component-tree/commit/b6c9fc85c00e25fc068724ce21cebe82a56b7848) Thanks [@tivac](https://github.com/tivac)! - Always provide a valid initial value to subscribers

Previously if you called the `.subscribe()` method on a `ComponentTree` instance before the statechart had been processed the return value would be `false`. This meant that subscribers would have to add checks to do anything against the returned value, since they couldn't depend on the `.matches`/`.hasTag`/`.broadcast` APIs existing.

This change fixes that, and ensures that even if the statechart hasn't been walked yet the initial value stored has all the expected APIs, along with a reasonable value for the `tree` property of `[]`. There isn't a great fallback value for `.state` at this time though.

## 4.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xstate-component-tree",
"version": "4.2.0",
"version": "5.0.0",
"description": "Build a tree of components based on statechart values",
"author": "Pat Cavit <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit df60219

Please sign in to comment.