#3131d9a0bcfc9 Thanks @Andarist! - Fixed an issue with event type being inferred from too many places within createMachine call and possibly ending up as any/AnyEventObject for the entire machine.
#31334feef9d47 Thanks @fw6! - Fixed compatibility with esoteric Mini Program environment where global object was available but global.console wasn't.
#3140502ffe91a Thanks @Andarist! - Fixed an issue with interpreters started using a persisted state not being "resolved" in full. This could cause some things, such as after transitions, not being executed correctly after starting an interpreter like this.
#3147155539c85 Thanks @Andarist! - Fixed a TS inference issue causing some functions to infer the constraint type for the event type even though a StateMachine passed to the function was parametrized with a concrete type for the event. More information can be found here.
#31464cf89b5f9 Thanks @Andarist! - Fixed compatibility of Interpreter with older versions of TypeScript. This ensures that our interpreters can correctly be consumed by functions expecting ActorRef interface (like for example useSelector).
#31397b45fda9e Thanks @Andarist! - InterpreterFrom and ActorRefFrom types used on machines with typegen data should now correctly return types with final/resolved typegen data. The "final" type here means a type that already encodes the information that all required implementations have been provided. Before this change this wouldn't typecheck correctly:
const machine = createMachine({
// this encodes that we still expect `myAction` to be provided
tsTypes: {} as Typegen0
});
const service: InterpreterFrom<typeof machine> = machine.withConfig({
actions: {
myAction: () => {}
}
});
#3097c881c8ca9 Thanks @davidkpiano! - State that is persisted and restored from machine.resolveState(state) will now have the correct state.machine value, so that state.can(...) and other methods will work as expected. See #3096 for more details.
xstate@4.30.5
Patch Changes
#311828e353081 Thanks @Andarist! - Fixed a bundling issue that prevented the keys() export to be preserved in the previous release.
xstate@4.30.4
Patch Changes
#31043706c62f4 Thanks @Andarist! - Fixed ContextFrom helper type to work on typegened machines.
#3113144131bed Thanks @davidkpiano! - The keys() utility function export, which was removed in #3089, is now added back, as older versions of XState libraries may depend on it still. See #3106 for more details.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps xstate from 4.30.0 to 4.30.6.
Release notes
Sourced from xstate's releases.
... (truncated)
Commits
2ac0f68
Version Packages (#3132)155539c
Fixed a TS inference issue causing some functions to infer the constraint typ...c881c8c
Fixstate.can()
from restored state (#3097)e18b241
Add recently addeddist
directory to the list of published files in `@xstat...4cf89b5
Fixed compatibility ofInterpreter
with older versions of TypeScript (#3146)e08030f
Added UMD build of@xstate/inspect
package (#3144)4feef9d
Fixed compatibility with esoteric Mini Program environment (#3133)502ffe9
Fixed an issue with interpreters started using a persisted state not being "r...7b45fda
InterpreterFrom
andActorRefFrom
types used on machines with typegen data...11d815e
Add.vscode/launch.json
to make it easy to debug Jest tests within VS Code ...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)