statelyai/xstate (xstate)
### [`v5.17.0`](https://togithub.com/statelyai/xstate/releases/tag/xstate%405.17.0)
[Compare Source](https://togithub.com/statelyai/xstate/compare/xstate@5.16.0...xstate@5.17.0)
##### Minor Changes
- [#4979](https://togithub.com/statelyai/xstate/pull/4979) [`a0e9ebcef`](https://togithub.com/statelyai/xstate/commit/a0e9ebcef26552659ac6c2c785c138387eafc766) Thanks [@davidkpiano](https://togithub.com/davidkpiano)! - State IDs are now strongly typed as keys of `snapshot.getMeta()` for state machine actor snapshots.
```ts
const machine = setup({
// ...
}).createMachine({
id: 'root',
initial: 'parentState',
states: {
parentState: {
meta: {},
initial: 'childState',
states: {
childState: {
meta: {}
},
stateWithId: {
id: 'state with id',
meta: {}
}
}
}
}
});
const actor = createActor(machine);
const metaValues = actor.getSnapshot().getMeta();
// Auto-completed keys:
metaValues.root;
metaValues['root.parentState'];
metaValues['root.parentState.childState'];
metaValues['state with id'];
// @ts-expect-error
metaValues['root.parentState.stateWithId'];
// @ts-expect-error
metaValues['unknown state'];
```
##### Patch Changes
- [#5002](https://togithub.com/statelyai/xstate/pull/5002) [`9877d548b`](https://togithub.com/statelyai/xstate/commit/9877d548b3cab1bbc5db4e3a51bbcf223868bd46) Thanks [@davidkpiano](https://togithub.com/davidkpiano)! - Fix an issue where `clearTimeout(undefined)` was sometimes being called, which can cause errors for some clock implementations. See [#5001](https://togithub.com/statelyai/xstate/issues/5001) for details.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - "after 10am every weekday,before 4pm every weekday" in timezone Europe/London.
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
5.16.0
->5.17.0
Release Notes
statelyai/xstate (xstate)
### [`v5.17.0`](https://togithub.com/statelyai/xstate/releases/tag/xstate%405.17.0) [Compare Source](https://togithub.com/statelyai/xstate/compare/xstate@5.16.0...xstate@5.17.0) ##### Minor Changes - [#4979](https://togithub.com/statelyai/xstate/pull/4979) [`a0e9ebcef`](https://togithub.com/statelyai/xstate/commit/a0e9ebcef26552659ac6c2c785c138387eafc766) Thanks [@davidkpiano](https://togithub.com/davidkpiano)! - State IDs are now strongly typed as keys of `snapshot.getMeta()` for state machine actor snapshots. ```ts const machine = setup({ // ... }).createMachine({ id: 'root', initial: 'parentState', states: { parentState: { meta: {}, initial: 'childState', states: { childState: { meta: {} }, stateWithId: { id: 'state with id', meta: {} } } } } }); const actor = createActor(machine); const metaValues = actor.getSnapshot().getMeta(); // Auto-completed keys: metaValues.root; metaValues['root.parentState']; metaValues['root.parentState.childState']; metaValues['state with id']; // @ts-expect-error metaValues['root.parentState.stateWithId']; // @ts-expect-error metaValues['unknown state']; ``` ##### Patch Changes - [#5002](https://togithub.com/statelyai/xstate/pull/5002) [`9877d548b`](https://togithub.com/statelyai/xstate/commit/9877d548b3cab1bbc5db4e3a51bbcf223868bd46) Thanks [@davidkpiano](https://togithub.com/davidkpiano)! - Fix an issue where `clearTimeout(undefined)` was sometimes being called, which can cause errors for some clock implementations. See [#5001](https://togithub.com/statelyai/xstate/issues/5001) for details.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - "after 10am every weekday,before 4pm every weekday" in timezone Europe/London.
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.