From d39846f260a5a0d97aa5378c907ceb8fb59e0e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Thu, 11 Jan 2024 15:00:30 +0100 Subject: [PATCH] Prepare files for graph and beta releases (#4669) * Revert "Temporarily remove changesets for ignored packages" This reverts commit 5d1eea82c6c91f7811f20cbe4ef4b4a37a716ac7. * remove changesets that are not meant to be published * Prepare files for graph and beta releases --- .../all-quick-lizards-burn.md | 10 ++++++++ .changeset-xstate-test-beta/config.json | 13 ++++++++++ .../graph-angry-seals-sin.md | 25 +++++++++++++++++++ .../graph-grumpy-planes-protect.md | 24 ++++++++++++++++++ .../graph-popular-clocks-melt.md | 14 +++++++++++ .changeset-xstate-test-beta/pre.json | 22 ++++++++++++++++ 6 files changed, 108 insertions(+) create mode 100644 .changeset-xstate-test-beta/all-quick-lizards-burn.md create mode 100644 .changeset-xstate-test-beta/config.json create mode 100644 .changeset-xstate-test-beta/graph-angry-seals-sin.md create mode 100644 .changeset-xstate-test-beta/graph-grumpy-planes-protect.md create mode 100644 .changeset-xstate-test-beta/graph-popular-clocks-melt.md create mode 100644 .changeset-xstate-test-beta/pre.json diff --git a/.changeset-xstate-test-beta/all-quick-lizards-burn.md b/.changeset-xstate-test-beta/all-quick-lizards-burn.md new file mode 100644 index 0000000000..553e7fa031 --- /dev/null +++ b/.changeset-xstate-test-beta/all-quick-lizards-burn.md @@ -0,0 +1,10 @@ +--- +'@xstate/graph': minor +'@xstate/test': minor +--- + +pr: #3727 +author: Andarist +commit: 5fb3c683d + +`exports` field has been added to the `package.json` manifest. It limits what files can be imported from a package - it's no longer possible to import from files that are not considered to be a part of the public API. diff --git a/.changeset-xstate-test-beta/config.json b/.changeset-xstate-test-beta/config.json new file mode 100644 index 0000000000..3901a36777 --- /dev/null +++ b/.changeset-xstate-test-beta/config.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@1.6.3/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "statelyai/xstate" }], + "commit": false, + "linked": [], + "access": "public", + "baseBranch": "main", + "ignore": ["@xstate/immer", "@xstate/inspect", "@xstate/solid"], + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true, + "useCalculatedVersionForSnapshots": true + } +} diff --git a/.changeset-xstate-test-beta/graph-angry-seals-sin.md b/.changeset-xstate-test-beta/graph-angry-seals-sin.md new file mode 100644 index 0000000000..fc818b4bab --- /dev/null +++ b/.changeset-xstate-test-beta/graph-angry-seals-sin.md @@ -0,0 +1,25 @@ +--- +'@xstate/graph': patch +--- + +pr: #4308 +author: davidkpiano +commit: af032db12 + +Traversing state machines that have delayed transitions will now work as expected: + +```ts +const machine = createMachine({ + initial: 'a', + states: { + a: { + after: { + 1000: 'b' + } + }, + b: {} + } +}); + +const paths = getShortestPaths(machine); // works +``` diff --git a/.changeset-xstate-test-beta/graph-grumpy-planes-protect.md b/.changeset-xstate-test-beta/graph-grumpy-planes-protect.md new file mode 100644 index 0000000000..dd25becb37 --- /dev/null +++ b/.changeset-xstate-test-beta/graph-grumpy-planes-protect.md @@ -0,0 +1,24 @@ +--- +'@xstate/graph': major +--- + +pr: #4233 +author: davidkpiano +commit: 3d96d0f95 + +Remove `getMachineShortestPaths` and `getMachineSimplePaths` + +```diff +import { +- getMachineShortestPaths, ++ getShortestPaths, +- getMachineSimplePaths, ++ getSimplePaths +} from '@xstate/graph'; + +-const paths = getMachineShortestPaths(machine); ++const paths = getShortestPaths(machine); + +-const paths = getMachineSimplePaths(machine); ++const paths = getSimplePaths(machine); +``` diff --git a/.changeset-xstate-test-beta/graph-popular-clocks-melt.md b/.changeset-xstate-test-beta/graph-popular-clocks-melt.md new file mode 100644 index 0000000000..7dcbb711a7 --- /dev/null +++ b/.changeset-xstate-test-beta/graph-popular-clocks-melt.md @@ -0,0 +1,14 @@ +--- +'@xstate/graph': major +--- + +pr: #4238 +author: davidkpiano +commit: b4f12a517 + +The steps in the paths returned from functions like `getShortestPaths(...)` and `getSimplePaths(...)` have the following changes: + +- The `step.event` property now represents the `event` object that resulted in the transition to the `step.state`, _not_ the event that comes before the next step. +- The `path.steps` array now includes the target `path.state` as the last step. + - Note: this means that `path.steps` always has at least one step. +- The first `step` now has the `{ type: 'xstate.init' }` event diff --git a/.changeset-xstate-test-beta/pre.json b/.changeset-xstate-test-beta/pre.json new file mode 100644 index 0000000000..9859ba1532 --- /dev/null +++ b/.changeset-xstate-test-beta/pre.json @@ -0,0 +1,22 @@ +{ + "mode": "pre", + "tag": "beta", + "initialVersions": { + "xstate": "5.5.0", + "@xstate/graph": "2.0.0-beta.5", + "@xstate/immer": "0.3.3", + "@xstate/inspect": "0.8.0", + "@xstate/react": "4.0.2", + "@xstate/solid": "0.1.3", + "@xstate/svelte": "3.0.2", + "@xstate/test": "1.0.0-beta.4", + "@xstate/vue": "3.0.3", + "@xstate-repo/jest-utils": "0.0.0" + }, + "changesets": [ + "all-quick-lizards-burn", + "graph-angry-seals-sin", + "graph-grumpy-planes-protect", + "graph-popular-clocks-melt" + ] +}