diff --git a/.changeset/pre.json b/.changeset/pre.json index 3366707028..f33402b83d 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -38,6 +38,7 @@ "curvy-feet-guess", "curvy-seahorses-obey", "dirty-birds-sniff", + "dry-geese-dream", "dull-actors-suffer", "eight-guests-wait", "eighty-chefs-return", @@ -66,7 +67,10 @@ "great-kangaroos-confess", "green-brooms-laugh", "grumpy-planes-protect", + "grumpy-shrimps-draw", "happy-kings-destroy", + "happy-kiwis-hear", + "happy-kiwis-scream", "healthy-pumas-pretend", "heavy-apes-tie", "heavy-jeans-arrive", @@ -94,6 +98,8 @@ "metal-mugs-learn", "metal-ties-prove", "modern-ducks-agree", + "modern-moles-greet", + "moody-needles-melt", "nervous-bananas-cover", "new-gorillas-visit", "new-turtles-joke", @@ -102,6 +108,7 @@ "odd-zoos-heal", "old-bulldogs-invent", "olive-geese-punch", + "olive-suns-begin", "olive-zebras-tap", "orange-gorillas-share", "orange-lemons-kick", @@ -171,6 +178,7 @@ "wise-eggs-train", "wise-wombats-invite", "witty-hounds-invent", + "yellow-cups-obey", "young-laws-hope" ] } diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index c9739d84a1..5fde5a3fff 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,60 @@ # xstate +## 5.0.0-beta.35 + +### Major Changes + +- [#4363](https://github.com/statelyai/xstate/pull/4363) [`3513280db`](https://github.com/statelyai/xstate/commit/3513280db56106f0113aac9dc3b9bb603853f085) Thanks [@Andarist](https://github.com/Andarist)! - Removed the ability to target deep descendants with the `initial` property. + +- [#4363](https://github.com/statelyai/xstate/pull/4363) [`3513280db`](https://github.com/statelyai/xstate/commit/3513280db56106f0113aac9dc3b9bb603853f085) Thanks [@Andarist](https://github.com/Andarist)! - Removed the ability to target multiple descendants with the `initial` property. + +- [#4216](https://github.com/statelyai/xstate/pull/4216) [`04cad53e0`](https://github.com/statelyai/xstate/commit/04cad53e07da2beb37520fb3c9e165fbf7b5bf86) Thanks [@Andarist](https://github.com/Andarist)! - Removed the ability to define delayed transitions using an array. Only object variant is supported now: + + ```ts + createMachine({ + initial: 'a', + states: { + a: { + after: { + 10000: 'b', + noon: 'c' + } + } + // ... + } + }); + ``` + +- [#3921](https://github.com/statelyai/xstate/pull/3921) [`0ca1b860c`](https://github.com/statelyai/xstate/commit/0ca1b860c99bac1e9187e3ca392ad3fbb0626b5d) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Spawned actors that have a referenced source (not inline) can be deeply persisted and restored: + + ```ts + const machine = createMachine({ + context: ({ spawn }) => ({ + // This will be persisted + ref: spawn('reducer', { id: 'child' }) + + // This cannot be persisted: + // ref: spawn(fromTransition((s) => s, { count: 42 }), { id: 'child' }) + }) + }).provide({ + actors: { + reducer: fromTransition((s) => s, { count: 42 }) + } + }); + ``` + +### Minor Changes + +- [#4358](https://github.com/statelyai/xstate/pull/4358) [`03ac5c013`](https://github.com/statelyai/xstate/commit/03ac5c013507bcd899416ed0f3f849b939bf1bee) Thanks [@Andarist](https://github.com/Andarist)! - `xstate.done.state.*` events will now be generated recursively for all parallel states on the ancestors path. + +### Patch Changes + +- [#4361](https://github.com/statelyai/xstate/pull/4361) [`1a00b5a54`](https://github.com/statelyai/xstate/commit/1a00b5a54c3dc9b13afc187eac06d912411653cc) Thanks [@Andarist](https://github.com/Andarist)! - Fixed a runtime crash related to machines with their root state's type being final (`createMachine({ type: 'final' })`). + +- [#4357](https://github.com/statelyai/xstate/pull/4357) [`84c46c1ae`](https://github.com/statelyai/xstate/commit/84c46c1ae95cea34355245a12ca2471eca996337) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with not all actions of initial transitions resolving to the initial state of the machine itself being executed. + +- [#4356](https://github.com/statelyai/xstate/pull/4356) [`81b6edafd`](https://github.com/statelyai/xstate/commit/81b6edafd6386d822c3b12c9e12e025ab4f843ad) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with actions of initial transitions being called too many times. + ## 5.0.0-beta.34 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 5ae53bc3ff..e2fc77cd0a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "xstate", - "version": "5.0.0-beta.34", + "version": "5.0.0-beta.35", "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-analytics/package.json b/packages/xstate-analytics/package.json index c1a5ca1f4e..261afd4684 100644 --- a/packages/xstate-analytics/package.json +++ b/packages/xstate-analytics/package.json @@ -41,10 +41,10 @@ "url": "https://github.com/statelyai/xstate/issues" }, "peerDependencies": { - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "devDependencies": { - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" }, "dependencies": {} } diff --git a/packages/xstate-graph/package.json b/packages/xstate-graph/package.json index 67626561c9..55fb839b36 100644 --- a/packages/xstate-graph/package.json +++ b/packages/xstate-graph/package.json @@ -40,10 +40,10 @@ "url": "https://github.com/statelyai/xstate/issues" }, "peerDependencies": { - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "devDependencies": { - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" }, "dependencies": {} } diff --git a/packages/xstate-immer/package.json b/packages/xstate-immer/package.json index 078f09e995..5009f9ce3d 100644 --- a/packages/xstate-immer/package.json +++ b/packages/xstate-immer/package.json @@ -41,10 +41,10 @@ "dependencies": {}, "peerDependencies": { "immer": "^9.0.6 || ^10", - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "devDependencies": { "immer": "^10.0.2", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" } } diff --git a/packages/xstate-inspect/package.json b/packages/xstate-inspect/package.json index 68f584ec53..08494b282a 100644 --- a/packages/xstate-inspect/package.json +++ b/packages/xstate-inspect/package.json @@ -53,12 +53,12 @@ "devDependencies": { "@types/ws": "^8.2.2", "ws": "^8.4.0", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" }, "peerDependencies": { "@types/ws": "^8.0.0", "ws": "^8.0.0", - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "peerDependenciesMeta": { "@types/ws": { diff --git a/packages/xstate-react/package.json b/packages/xstate-react/package.json index 12add91685..b6bb3bb338 100644 --- a/packages/xstate-react/package.json +++ b/packages/xstate-react/package.json @@ -55,7 +55,7 @@ }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "peerDependenciesMeta": { "xstate": { @@ -76,6 +76,6 @@ "jsdom-global": "^3.0.2", "react": "^18.0.0", "react-dom": "^18.0.0", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" } } diff --git a/packages/xstate-solid/package.json b/packages/xstate-solid/package.json index 1b0aa4a9cc..b20f16c80b 100644 --- a/packages/xstate-solid/package.json +++ b/packages/xstate-solid/package.json @@ -49,7 +49,7 @@ }, "peerDependencies": { "solid-js": "^1.6.0", - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "peerDependenciesMeta": { "xstate": { @@ -59,6 +59,6 @@ "devDependencies": { "solid-js": "^1.7.6", "solid-testing-library": "^0.3.0", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" } } diff --git a/packages/xstate-svelte/package.json b/packages/xstate-svelte/package.json index bac5cc15a6..869b5938d8 100644 --- a/packages/xstate-svelte/package.json +++ b/packages/xstate-svelte/package.json @@ -45,7 +45,7 @@ }, "peerDependencies": { "svelte": "^3.24.1 || ^4", - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "peerDependenciesMeta": { "xstate": { @@ -60,6 +60,6 @@ "svelte-check": "^3.2.0", "svelte-jester": "^2.3.2", "svelte-preprocess": "^5.0.0", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" } } diff --git a/packages/xstate-test/package.json b/packages/xstate-test/package.json index 730fd02da3..8bb235b094 100644 --- a/packages/xstate-test/package.json +++ b/packages/xstate-test/package.json @@ -46,11 +46,11 @@ "url": "https://github.com/statelyai/xstate/issues" }, "peerDependencies": { - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "devDependencies": { "strip-ansi": "^5.2.0", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" }, "dependencies": { "@xstate/graph": "2.0.0-beta.5" diff --git a/packages/xstate-vue/package.json b/packages/xstate-vue/package.json index af77fd77bb..6b57153871 100644 --- a/packages/xstate-vue/package.json +++ b/packages/xstate-vue/package.json @@ -43,7 +43,7 @@ }, "peerDependencies": { "vue": "^3.0.0", - "xstate": "^5.0.0-beta.34" + "xstate": "^5.0.0-beta.35" }, "peerDependenciesMeta": { "xstate": { @@ -55,6 +55,6 @@ "@testing-library/vue": "^6.6.1", "@vue/compiler-sfc": "^3.0.11", "vue": "^3.0.11", - "xstate": "5.0.0-beta.34" + "xstate": "5.0.0-beta.35" } }