diff --git a/.changeset/four-countries-serve.md b/.changeset/four-countries-serve.md deleted file mode 100644 index 3a8c5f4b88..0000000000 --- a/.changeset/four-countries-serve.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@xstate/react': patch -'@xstate/store': patch ---- - -Add React 19 as a peer dependency diff --git a/.changeset/lemon-needles-play.md b/.changeset/lemon-needles-play.md deleted file mode 100644 index 7a4db02a9b..0000000000 --- a/.changeset/lemon-needles-play.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'xstate': minor ---- - -Added a new `transition` function that takes an actor logic, a snapshot, and an event, and returns a tuple containing the next snapshot and the actions to execute. This function is a pure function and does not execute the actions itself. It can be used like this: - -```ts -import { transition } from 'xstate'; - -const [nextState, actions] = transition(actorLogic, currentState, event); -// Execute actions as needed -``` - -Added a new `initialTransition` function that takes an actor logic and an optional input, and returns a tuple containing the initial snapshot and the actions to execute from the initial transition. This function is also a pure function and does not execute the actions itself. It can be used like this: - -```ts -import { initialTransition } from 'xstate'; - -const [initialState, actions] = initialTransition(actorLogic, input); -// Execute actions as needed -``` - -These new functions provide a way to separate the calculation of the next snapshot and actions from the execution of those actions, allowing for more control and flexibility in the transition process. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 3c865d7889..6e6ea0d43a 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,29 @@ # xstate +## 5.19.0 + +### Minor Changes + +- [#4954](https://github.com/statelyai/xstate/pull/4954) [`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Added a new `transition` function that takes an actor logic, a snapshot, and an event, and returns a tuple containing the next snapshot and the actions to execute. This function is a pure function and does not execute the actions itself. It can be used like this: + + ```ts + import { transition } from 'xstate'; + + const [nextState, actions] = transition(actorLogic, currentState, event); + // Execute actions as needed + ``` + + Added a new `initialTransition` function that takes an actor logic and an optional input, and returns a tuple containing the initial snapshot and the actions to execute from the initial transition. This function is also a pure function and does not execute the actions itself. It can be used like this: + + ```ts + import { initialTransition } from 'xstate'; + + const [initialState, actions] = initialTransition(actorLogic, input); + // Execute actions as needed + ``` + + These new functions provide a way to separate the calculation of the next snapshot and actions from the execution of those actions, allowing for more control and flexibility in the transition process. + ## 5.18.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index ae62e27d56..28ad02dc87 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "xstate", - "version": "5.18.2", + "version": "5.19.0", "description": "Finite State Machines and Statecharts for the Modern Web.", "main": "dist/xstate.cjs.js", "module": "dist/xstate.esm.js", diff --git a/packages/xstate-graph/CHANGELOG.md b/packages/xstate-graph/CHANGELOG.md index d864d77f0c..6fccfdcfe4 100644 --- a/packages/xstate-graph/CHANGELOG.md +++ b/packages/xstate-graph/CHANGELOG.md @@ -1,5 +1,12 @@ # @xstate/graph +## 3.0.0 + +### Patch Changes + +- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]: + - xstate@5.19.0 + ## 2.0.1 ### Patch Changes diff --git a/packages/xstate-graph/package.json b/packages/xstate-graph/package.json index 0d326ea729..74cb0b44c0 100644 --- a/packages/xstate-graph/package.json +++ b/packages/xstate-graph/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/graph", - "version": "2.0.1", + "version": "3.0.0", "description": "XState graph utilities", "keywords": [ "state", diff --git a/packages/xstate-react/CHANGELOG.md b/packages/xstate-react/CHANGELOG.md index 09b06e3d57..9b02fba95d 100644 --- a/packages/xstate-react/CHANGELOG.md +++ b/packages/xstate-react/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 5.0.0 + +### Patch Changes + +- [#5109](https://github.com/statelyai/xstate/pull/5109) [`d67b71dd25d457a2a59f2c943db13f50fab7ec3d`](https://github.com/statelyai/xstate/commit/d67b71dd25d457a2a59f2c943db13f50fab7ec3d) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add React 19 as a peer dependency + +- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]: + - xstate@5.19.0 + ## 4.1.3 ### Patch Changes diff --git a/packages/xstate-react/package.json b/packages/xstate-react/package.json index fa92bd0dd2..3199c74ea8 100644 --- a/packages/xstate-react/package.json +++ b/packages/xstate-react/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/react", - "version": "4.1.3", + "version": "5.0.0", "description": "XState tools for React", "keywords": [ "state", diff --git a/packages/xstate-solid/CHANGELOG.md b/packages/xstate-solid/CHANGELOG.md index 0d9a61758d..fba5aefcb8 100644 --- a/packages/xstate-solid/CHANGELOG.md +++ b/packages/xstate-solid/CHANGELOG.md @@ -1,5 +1,12 @@ # @xstate/solid +## 1.0.0 + +### Patch Changes + +- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]: + - xstate@5.19.0 + ## 0.2.3 ### Patch Changes diff --git a/packages/xstate-solid/package.json b/packages/xstate-solid/package.json index 7301196d39..2b8c91eca3 100644 --- a/packages/xstate-solid/package.json +++ b/packages/xstate-solid/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/solid", - "version": "0.2.3", + "version": "1.0.0", "description": "XState tools for SolidJS", "keywords": [ "state", diff --git a/packages/xstate-store/CHANGELOG.md b/packages/xstate-store/CHANGELOG.md index 4f04a1af57..0e3ff64b8c 100644 --- a/packages/xstate-store/CHANGELOG.md +++ b/packages/xstate-store/CHANGELOG.md @@ -1,5 +1,11 @@ # @xstate/store +## 2.6.1 + +### Patch Changes + +- [#5109](https://github.com/statelyai/xstate/pull/5109) [`d67b71dd25d457a2a59f2c943db13f50fab7ec3d`](https://github.com/statelyai/xstate/commit/d67b71dd25d457a2a59f2c943db13f50fab7ec3d) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add React 19 as a peer dependency + ## 2.6.0 ### Minor Changes diff --git a/packages/xstate-store/package.json b/packages/xstate-store/package.json index 45d3494253..670742657c 100644 --- a/packages/xstate-store/package.json +++ b/packages/xstate-store/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/store", - "version": "2.6.0", + "version": "2.6.1", "description": "Simple stores", "keywords": [ "store", diff --git a/packages/xstate-svelte/CHANGELOG.md b/packages/xstate-svelte/CHANGELOG.md index 49765b5660..904d75a65b 100644 --- a/packages/xstate-svelte/CHANGELOG.md +++ b/packages/xstate-svelte/CHANGELOG.md @@ -1,5 +1,12 @@ # @xstate/svelte +## 4.0.0 + +### Patch Changes + +- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]: + - xstate@5.19.0 + ## 3.0.5 ### Patch Changes diff --git a/packages/xstate-svelte/package.json b/packages/xstate-svelte/package.json index 59eb969072..ec8e09c190 100644 --- a/packages/xstate-svelte/package.json +++ b/packages/xstate-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/svelte", - "version": "3.0.5", + "version": "4.0.0", "description": "XState tools for Svelte", "keywords": [ "state", diff --git a/packages/xstate-vue/CHANGELOG.md b/packages/xstate-vue/CHANGELOG.md index 039f1416ab..2c04e3d472 100644 --- a/packages/xstate-vue/CHANGELOG.md +++ b/packages/xstate-vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @xstate/vue +## 4.0.0 + +### Patch Changes + +- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]: + - xstate@5.19.0 + ## 3.1.4 ### Patch Changes diff --git a/packages/xstate-vue/package.json b/packages/xstate-vue/package.json index 45a78645e0..0bf552a5b8 100644 --- a/packages/xstate-vue/package.json +++ b/packages/xstate-vue/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/vue", - "version": "3.1.4", + "version": "4.0.0", "description": "XState tools for Vue", "keywords": [ "state",