Skip to content

Commit

Permalink
Prepare files for graph and beta releases (#4669)
Browse files Browse the repository at this point in the history
* Revert "Temporarily remove changesets for ignored packages"

This reverts commit 5d1eea8.

* remove changesets that are not meant to be published

* Prepare files for graph and beta releases
  • Loading branch information
Andarist authored Jan 11, 2024
1 parent 073f710 commit d39846f
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .changeset-xstate-test-beta/all-quick-lizards-burn.md
Original file line number Diff line number Diff line change
@@ -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.
13 changes: 13 additions & 0 deletions .changeset-xstate-test-beta/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/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
}
}
25 changes: 25 additions & 0 deletions .changeset-xstate-test-beta/graph-angry-seals-sin.md
Original file line number Diff line number Diff line change
@@ -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
```
24 changes: 24 additions & 0 deletions .changeset-xstate-test-beta/graph-grumpy-planes-protect.md
Original file line number Diff line number Diff line change
@@ -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);
```
14 changes: 14 additions & 0 deletions .changeset-xstate-test-beta/graph-popular-clocks-melt.md
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions .changeset-xstate-test-beta/pre.json
Original file line number Diff line number Diff line change
@@ -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"
]
}

0 comments on commit d39846f

Please sign in to comment.