Skip to content

Commit eac555e

Browse files
Version Packages (#5003)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c895899 commit eac555e

File tree

14 files changed

+77
-76
lines changed

14 files changed

+77
-76
lines changed

.changeset/early-spies-beg.md

-9
This file was deleted.

.changeset/lucky-horses-pay.md

-5
This file was deleted.

.changeset/tall-suits-matter.md

-45
This file was deleted.

packages/core/CHANGELOG.md

+50
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,55 @@
11
# xstate
22

3+
## 5.17.0
4+
5+
### Minor Changes
6+
7+
- [#4979](https://github.com/statelyai/xstate/pull/4979) [`a0e9ebcef`](https://github.com/statelyai/xstate/commit/a0e9ebcef26552659ac6c2c785c138387eafc766) Thanks [@davidkpiano](https://github.com/davidkpiano)! - State IDs are now strongly typed as keys of `snapshot.getMeta()` for state machine actor snapshots.
8+
9+
```ts
10+
const machine = setup({
11+
// ...
12+
}).createMachine({
13+
id: 'root',
14+
initial: 'parentState',
15+
states: {
16+
parentState: {
17+
meta: {},
18+
initial: 'childState',
19+
states: {
20+
childState: {
21+
meta: {}
22+
},
23+
stateWithId: {
24+
id: 'state with id',
25+
meta: {}
26+
}
27+
}
28+
}
29+
}
30+
});
31+
32+
const actor = createActor(machine);
33+
34+
const metaValues = actor.getSnapshot().getMeta();
35+
36+
// Auto-completed keys:
37+
metaValues.root;
38+
metaValues['root.parentState'];
39+
metaValues['root.parentState.childState'];
40+
metaValues['state with id'];
41+
42+
// @ts-expect-error
43+
metaValues['root.parentState.stateWithId'];
44+
45+
// @ts-expect-error
46+
metaValues['unknown state'];
47+
```
48+
49+
### Patch Changes
50+
51+
- [#5002](https://github.com/statelyai/xstate/pull/5002) [`9877d548b`](https://github.com/statelyai/xstate/commit/9877d548b3cab1bbc5db4e3a51bbcf223868bd46) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Fix an issue where `clearTimeout(undefined)` was sometimes being called, which can cause errors for some clock implementations. See https://github.com/statelyai/xstate/issues/5001 for details.
52+
353
## 5.16.0
454

555
### Minor Changes

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xstate",
3-
"version": "5.16.0",
3+
"version": "5.17.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/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
"url": "https://github.com/statelyai/xstate/issues"
4141
},
4242
"peerDependencies": {
43-
"xstate": "^5.16.0"
43+
"xstate": "^5.17.0"
4444
},
4545
"devDependencies": {
46-
"xstate": "5.16.0"
46+
"xstate": "5.17.0"
4747
},
4848
"dependencies": {}
4949
}

packages/xstate-immer/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"dependencies": {},
4242
"peerDependencies": {
4343
"immer": "^9.0.6 || ^10",
44-
"xstate": "^5.16.0"
44+
"xstate": "^5.17.0"
4545
},
4646
"devDependencies": {
4747
"immer": "^10.0.2",
48-
"xstate": "5.16.0"
48+
"xstate": "5.17.0"
4949
}
5050
}

packages/xstate-inspect/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@
5353
"devDependencies": {
5454
"@types/ws": "^8.2.2",
5555
"ws": "^8.4.0",
56-
"xstate": "5.16.0"
56+
"xstate": "5.17.0"
5757
},
5858
"peerDependencies": {
5959
"@types/ws": "^8.0.0",
6060
"ws": "^8.0.0",
61-
"xstate": "^5.16.0"
61+
"xstate": "^5.17.0"
6262
},
6363
"peerDependenciesMeta": {
6464
"@types/ws": {

packages/xstate-react/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
"peerDependencies": {
5757
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
58-
"xstate": "^5.16.0"
58+
"xstate": "^5.17.0"
5959
},
6060
"peerDependenciesMeta": {
6161
"xstate": {
@@ -74,6 +74,6 @@
7474
"react": "^18.0.0",
7575
"react-dom": "^18.0.0",
7676
"rxjs": "^7.8.0",
77-
"xstate": "5.16.0"
77+
"xstate": "5.17.0"
7878
}
7979
}

packages/xstate-solid/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"peerDependencies": {
4545
"solid-js": "^1.6.0",
46-
"xstate": "^5.16.0"
46+
"xstate": "^5.17.0"
4747
},
4848
"peerDependenciesMeta": {
4949
"xstate": {
@@ -53,6 +53,6 @@
5353
"devDependencies": {
5454
"solid-js": "^1.7.6",
5555
"solid-testing-library": "^0.3.0",
56-
"xstate": "5.16.0"
56+
"xstate": "5.17.0"
5757
}
5858
}

packages/xstate-store/CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @xstate/store
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- [#5000](https://github.com/statelyai/xstate/pull/5000) [`eeadb7121`](https://github.com/statelyai/xstate/commit/eeadb7121e8523cf34fe3a299731ca085152c65d) Thanks [@TkDodo](https://github.com/TkDodo)! - - Replace `use-sync-external-store/shim` with `useSyncExternalStore` from React.
8+
- Do not memoize `getSnapshot` in `useSyncExternalStore`.
9+
- Implement `getServerSnapshot` in `useSyncExternalStore`.
10+
- Expect `store` to always be defined in `useSelector`
11+
- Update React types to v18 and testing library to v16.
12+
313
## 1.0.0
414

515
### Major Changes

packages/xstate-store/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@xstate/store",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"description": "Simple stores",
55
"keywords": [
66
"store",
@@ -53,7 +53,7 @@
5353
"immer": "^10.0.2",
5454
"react": "^18.0.0",
5555
"react-dom": "^18.0.0",
56-
"xstate": "^5.9.1"
56+
"xstate": "^5.17.0"
5757
},
5858
"peerDependencies": {
5959
"react": "^18.2.0"

packages/xstate-svelte/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"peerDependencies": {
4747
"svelte": "^3.24.1 || ^4",
48-
"xstate": "^5.16.0"
48+
"xstate": "^5.17.0"
4949
},
5050
"peerDependenciesMeta": {
5151
"xstate": {
@@ -58,6 +58,6 @@
5858
"svelte": "^3.55.1",
5959
"svelte-check": "^3.2.0",
6060
"svelte-preprocess": "^5.0.0",
61-
"xstate": "5.16.0"
61+
"xstate": "5.17.0"
6262
}
6363
}

packages/xstate-vue/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
},
5555
"peerDependencies": {
5656
"vue": "^3.0.0",
57-
"xstate": "^5.16.0"
57+
"xstate": "^5.17.0"
5858
},
5959
"peerDependenciesMeta": {
6060
"xstate": {
@@ -65,6 +65,6 @@
6565
"@testing-library/vue": "^6.6.1",
6666
"@vue/compiler-sfc": "^3.0.11",
6767
"vue": "^3.0.11",
68-
"xstate": "5.16.0"
68+
"xstate": "5.17.0"
6969
}
7070
}

0 commit comments

Comments
 (0)