From d40a822af09dc793eca4bb9df9e4b01ce0cb50b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 5 Aug 2022 14:31:56 +0200 Subject: [PATCH] Version Packages (#3366) Co-authored-by: github-actions[bot] --- .changeset/famous-clouds-bow.md | 5 ----- .changeset/nine-frogs-grow.md | 10 ---------- .changeset/pretty-dots-push.md | 5 ----- .changeset/quiet-toes-promise.md | 5 ----- .changeset/silly-dancers-attack.md | 5 ----- .changeset/slow-cheetahs-try.md | 7 ------- .changeset/spotty-trainers-march.md | 5 ----- .changeset/unlucky-sloths-tell.md | 5 ----- .changeset/weak-singers-jog.md | 5 ----- packages/core/CHANGELOG.md | 27 ++++++++++++++++++++++++++ packages/core/package.json | 2 +- packages/xstate-analytics/package.json | 2 +- packages/xstate-graph/package.json | 2 +- packages/xstate-immer/package.json | 2 +- packages/xstate-inspect/package.json | 2 +- packages/xstate-react/CHANGELOG.md | 8 ++++++++ packages/xstate-react/package.json | 4 ++-- packages/xstate-scxml/package.json | 2 +- packages/xstate-svelte/package.json | 2 +- packages/xstate-test/package.json | 2 +- packages/xstate-vue/package.json | 2 +- 21 files changed, 46 insertions(+), 63 deletions(-) delete mode 100644 .changeset/famous-clouds-bow.md delete mode 100644 .changeset/nine-frogs-grow.md delete mode 100644 .changeset/pretty-dots-push.md delete mode 100644 .changeset/quiet-toes-promise.md delete mode 100644 .changeset/silly-dancers-attack.md delete mode 100644 .changeset/slow-cheetahs-try.md delete mode 100644 .changeset/spotty-trainers-march.md delete mode 100644 .changeset/unlucky-sloths-tell.md delete mode 100644 .changeset/weak-singers-jog.md diff --git a/.changeset/famous-clouds-bow.md b/.changeset/famous-clouds-bow.md deleted file mode 100644 index 3367ea501e..0000000000 --- a/.changeset/famous-clouds-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"xstate": patch ---- - -Added a dev-only error when `forwardTo` accidentally ends up trying to forward an event to an undefined actor. Such a situation indicates a logical error and risks an infinite loop. diff --git a/.changeset/nine-frogs-grow.md b/.changeset/nine-frogs-grow.md deleted file mode 100644 index 2182b556c1..0000000000 --- a/.changeset/nine-frogs-grow.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'xstate': minor ---- - -A new [`predictableActionArguments`](https://xstate.js.org/docs/guides/actions.html) feature flag has been added that allows you to opt into some fixed behaviors that will be the default in v5. With this flag: - -- XState will always call an action with the event directly responsible for the related transition, -- you also automatically opt-into [`preserveActionOrder`](https://xstate.js.org/docs/guides/context.html#action-order). - -Please be aware that you might not able to use `state` from the `meta` argument when using this flag. diff --git a/.changeset/pretty-dots-push.md b/.changeset/pretty-dots-push.md deleted file mode 100644 index bbc49f7326..0000000000 --- a/.changeset/pretty-dots-push.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"xstate": patch ---- - -Call the `complete` callback of the subscribed `observer` when an interpreter gets stopped. diff --git a/.changeset/quiet-toes-promise.md b/.changeset/quiet-toes-promise.md deleted file mode 100644 index 38e174fb4e..0000000000 --- a/.changeset/quiet-toes-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@xstate/react': patch ---- - -Add `shallowEqual` helper comparator function. diff --git a/.changeset/silly-dancers-attack.md b/.changeset/silly-dancers-attack.md deleted file mode 100644 index 7b9865b52f..0000000000 --- a/.changeset/silly-dancers-attack.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'xstate': patch ---- - -Fixed an issue with parallel regions not always being correctly reentered on external transitions of the containing parallel state targeting another region within that parallel state. diff --git a/.changeset/slow-cheetahs-try.md b/.changeset/slow-cheetahs-try.md deleted file mode 100644 index a895c30844..0000000000 --- a/.changeset/slow-cheetahs-try.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'xstate': minor ---- - -All `exit` actions in the machine will now be correctly resolved and executed when a machine gets stopped or reaches its top-level final state. Previously, the actions were not correctly resolved and that was leading to runtime errors. - -To implement this fix in a reliable way, a new internal event has been introduced: `{ type: 'xstate.stop' }` and when the machine stops its execution, all exit handlers of the current state (i.e. the active state nodes) will be called with that event. You should always assume that an exit handler might be called with that event. diff --git a/.changeset/spotty-trainers-march.md b/.changeset/spotty-trainers-march.md deleted file mode 100644 index 477ceb272a..0000000000 --- a/.changeset/spotty-trainers-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'xstate': patch ---- - -The types for `state.nextEvents` are now properly typed to the actual event types of the machine. Original PR: #1115 (Thanks @alexreardon!) diff --git a/.changeset/unlucky-sloths-tell.md b/.changeset/unlucky-sloths-tell.md deleted file mode 100644 index c2f71d04ee..0000000000 --- a/.changeset/unlucky-sloths-tell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'xstate': patch ---- - -Fixed an issue with targeted ancestors not being correctly reentered during external transitions. diff --git a/.changeset/weak-singers-jog.md b/.changeset/weak-singers-jog.md deleted file mode 100644 index 0d80acea8c..0000000000 --- a/.changeset/weak-singers-jog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@xstate/react': patch ---- - -Fixed an issue with `useSelector` always computing fresh snapshots internally for uninitialized services. This avoids the internal `useSyncExternalStore` from warning about the snapshot value not being cached properly. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index b9912f9d64..da60794b7b 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,32 @@ # xstate +## 4.33.0 + +### Minor Changes + +- [#3289](https://github.com/statelyai/xstate/pull/3289) [`c0a147e25`](https://github.com/statelyai/xstate/commit/c0a147e256e9d32d2bbe4bc098839c9dee25213a) Thanks [@Andarist](https://github.com/Andarist)! - A new [`predictableActionArguments`](https://xstate.js.org/docs/guides/actions.html) feature flag has been added that allows you to opt into some fixed behaviors that will be the default in v5. With this flag: + + - XState will always call an action with the event directly responsible for the related transition, + - you also automatically opt-into [`preserveActionOrder`](https://xstate.js.org/docs/guides/context.html#action-order). + + Please be aware that you might not able to use `state` from the `meta` argument when using this flag. + +* [#3126](https://github.com/statelyai/xstate/pull/3126) [`37b751cb3`](https://github.com/statelyai/xstate/commit/37b751cb3c80073d6f559f0eba2ae3619a643e63) Thanks [@Andarist](https://github.com/Andarist)! - All `exit` actions in the machine will now be correctly resolved and executed when a machine gets stopped or reaches its top-level final state. Previously, the actions were not correctly resolved and that was leading to runtime errors. + + To implement this fix in a reliable way, a new internal event has been introduced: `{ type: 'xstate.stop' }` and when the machine stops its execution, all exit handlers of the current state (i.e. the active state nodes) will be called with that event. You should always assume that an exit handler might be called with that event. + +### Patch Changes + +- [#3178](https://github.com/statelyai/xstate/pull/3178) [`6badd2ba3`](https://github.com/statelyai/xstate/commit/6badd2ba3642391bee640aa4914003ad57f2e703) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Added a dev-only error when `forwardTo` accidentally ends up trying to forward an event to an undefined actor. Such a situation indicates a logical error and risks an infinite loop. + +* [#3453](https://github.com/statelyai/xstate/pull/3453) [`368ed9b1c`](https://github.com/statelyai/xstate/commit/368ed9b1cd0ea2df8cbf6662b352455afae7abfa) Thanks [@pixtron](https://github.com/pixtron)! - Call the `complete` callback of the subscribed `observer` when an interpreter gets stopped. + +- [#3422](https://github.com/statelyai/xstate/pull/3422) [`e35493f59`](https://github.com/statelyai/xstate/commit/e35493f59d277ca57f0982417d5ba3bca0a352ed) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with parallel regions not always being correctly reentered on external transitions of the containing parallel state targeting another region within that parallel state. + +* [#3447](https://github.com/statelyai/xstate/pull/3447) [`e93754d7a`](https://github.com/statelyai/xstate/commit/e93754d7a65d8c143bcb0070e8412ca4ebc9e523) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The types for `state.nextEvents` are now properly typed to the actual event types of the machine. Original PR: #1115 (Thanks @alexreardon!) + +- [#3424](https://github.com/statelyai/xstate/pull/3424) [`88d540eb8`](https://github.com/statelyai/xstate/commit/88d540eb8e0b659c9621cc5c365bd626a000c1d7) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with targeted ancestors not being correctly reentered during external transitions. + ## 4.32.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index e40801b920..0f5995508a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "xstate", - "version": "4.32.1", + "version": "4.33.0", "description": "Finite State Machines and Statecharts for the Modern Web.", "main": "lib/index.js", "module": "es/index.js", diff --git a/packages/xstate-analytics/package.json b/packages/xstate-analytics/package.json index aea8b0e1f5..0442eec008 100644 --- a/packages/xstate-analytics/package.json +++ b/packages/xstate-analytics/package.json @@ -35,7 +35,7 @@ "url": "https://github.com/statelyai/xstate/issues" }, "peerDependencies": { - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "devDependencies": { "jest": "^26.6.3", diff --git a/packages/xstate-graph/package.json b/packages/xstate-graph/package.json index d8c370df45..45ade5b849 100644 --- a/packages/xstate-graph/package.json +++ b/packages/xstate-graph/package.json @@ -37,7 +37,7 @@ "url": "https://github.com/statelyai/xstate/issues" }, "peerDependencies": { - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "devDependencies": { "jest": "^26.6.3", diff --git a/packages/xstate-immer/package.json b/packages/xstate-immer/package.json index 31d894adcb..801e0e57a8 100644 --- a/packages/xstate-immer/package.json +++ b/packages/xstate-immer/package.json @@ -38,7 +38,7 @@ "dependencies": {}, "peerDependencies": { "immer": "^9.0.6", - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "devDependencies": { "immer": "^9.0.6", diff --git a/packages/xstate-inspect/package.json b/packages/xstate-inspect/package.json index 8cb0769554..106607fbbf 100644 --- a/packages/xstate-inspect/package.json +++ b/packages/xstate-inspect/package.json @@ -53,7 +53,7 @@ "peerDependencies": { "@types/ws": "^8.0.0", "ws": "^8.0.0", - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "peerDependenciesMeta": { "@types/ws": { diff --git a/packages/xstate-react/CHANGELOG.md b/packages/xstate-react/CHANGELOG.md index e062bffc3b..edd3c80975 100644 --- a/packages/xstate-react/CHANGELOG.md +++ b/packages/xstate-react/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.0.1 + +### Patch Changes + +- [#3456](https://github.com/statelyai/xstate/pull/3456) [`131d429ab`](https://github.com/statelyai/xstate/commit/131d429ab350aaca371c4c7974829c621a50c024) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Add `shallowEqual` helper comparator function. + +* [#3500](https://github.com/statelyai/xstate/pull/3500) [`0dfc6d92f`](https://github.com/statelyai/xstate/commit/0dfc6d92f6950b3eb78e0693ae3b0abe5751bf42) Thanks [@Andarist](https://github.com/Andarist)! - Fixed an issue with `useSelector` always computing fresh snapshots internally for uninitialized services. This avoids the internal `useSyncExternalStore` from warning about the snapshot value not being cached properly. + ## 3.0.0 ### Major Changes diff --git a/packages/xstate-react/package.json b/packages/xstate-react/package.json index 355362f8ba..42bbb15f37 100644 --- a/packages/xstate-react/package.json +++ b/packages/xstate-react/package.json @@ -1,6 +1,6 @@ { "name": "@xstate/react", - "version": "3.0.0", + "version": "3.0.1", "description": "XState tools for React", "keywords": [ "state", @@ -54,7 +54,7 @@ "peerDependencies": { "@xstate/fsm": "^2.0.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "peerDependenciesMeta": { "@xstate/fsm": { diff --git a/packages/xstate-scxml/package.json b/packages/xstate-scxml/package.json index 1601e390f9..637c5e7423 100644 --- a/packages/xstate-scxml/package.json +++ b/packages/xstate-scxml/package.json @@ -35,7 +35,7 @@ }, "dependencies": { "xml-js": "^1.6.11", - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "devDependencies": { "@scion-scxml/test-framework": "^2.0.15", diff --git a/packages/xstate-svelte/package.json b/packages/xstate-svelte/package.json index 920bcde4b7..3c93db3731 100644 --- a/packages/xstate-svelte/package.json +++ b/packages/xstate-svelte/package.json @@ -47,7 +47,7 @@ "peerDependencies": { "@xstate/fsm": "^2.0.0", "svelte": "^3.24.1", - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "peerDependenciesMeta": { "@xstate/fsm": { diff --git a/packages/xstate-test/package.json b/packages/xstate-test/package.json index b9dfefeed5..20c68e5161 100644 --- a/packages/xstate-test/package.json +++ b/packages/xstate-test/package.json @@ -40,7 +40,7 @@ "url": "https://github.com/statelyai/xstate/issues" }, "peerDependencies": { - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "devDependencies": { "jest": "^26.6.3", diff --git a/packages/xstate-vue/package.json b/packages/xstate-vue/package.json index 41872f9e56..4c1a0b7a9d 100644 --- a/packages/xstate-vue/package.json +++ b/packages/xstate-vue/package.json @@ -46,7 +46,7 @@ "peerDependencies": { "@xstate/fsm": "^2.0.0", "vue": "^3.0.0", - "xstate": "^4.32.1" + "xstate": "^4.33.0" }, "peerDependenciesMeta": { "@xstate/fsm": {