Skip to content

Commit 4eb0c8c

Browse files
Version Packages
1 parent 8c4b706 commit 4eb0c8c

File tree

16 files changed

+74
-36
lines changed

16 files changed

+74
-36
lines changed

.changeset/four-countries-serve.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/lemon-needles-play.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/core/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# xstate
22

3+
## 5.19.0
4+
5+
### Minor Changes
6+
7+
- [#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:
8+
9+
```ts
10+
import { transition } from 'xstate';
11+
12+
const [nextState, actions] = transition(actorLogic, currentState, event);
13+
// Execute actions as needed
14+
```
15+
16+
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:
17+
18+
```ts
19+
import { initialTransition } from 'xstate';
20+
21+
const [initialState, actions] = initialTransition(actorLogic, input);
22+
// Execute actions as needed
23+
```
24+
25+
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.
26+
327
## 5.18.2
428

529
### Patch Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xstate",
3-
"version": "5.18.2",
3+
"version": "5.19.0",
44
"description": "Finite State Machines and Statecharts for the Modern Web.",
55
"main": "dist/xstate.cjs.js",
66
"module": "dist/xstate.esm.js",

packages/xstate-graph/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @xstate/graph
22

3+
## 3.0.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]:
8+
9+
310
## 2.0.1
411

512
### Patch Changes

packages/xstate-graph/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xstate/graph",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"description": "XState graph utilities",
55
"keywords": [
66
"state",

packages/xstate-react/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 5.0.0
4+
5+
### Patch Changes
6+
7+
- [#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
8+
9+
- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]:
10+
11+
312
## 4.1.3
413

514
### Patch Changes

packages/xstate-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xstate/react",
3-
"version": "4.1.3",
3+
"version": "5.0.0",
44
"description": "XState tools for React",
55
"keywords": [
66
"state",

packages/xstate-solid/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @xstate/solid
22

3+
## 1.0.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`8c4b70652acaef2702f32435362e4755679a516d`](https://github.com/statelyai/xstate/commit/8c4b70652acaef2702f32435362e4755679a516d)]:
8+
9+
310
## 0.2.3
411

512
### Patch Changes

packages/xstate-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xstate/solid",
3-
"version": "0.2.3",
3+
"version": "1.0.0",
44
"description": "XState tools for SolidJS",
55
"keywords": [
66
"state",

0 commit comments

Comments
 (0)