Update dependency xstate to v5 - #47
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
Author
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: pnpm-lock.yaml |
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.32.0→^5.0.0^4.32.0→^5.0.0Release Notes
statelyai/xstate (xstate)
v5.32.5Compare Source
Patch Changes
345e04cThanks @xianjianlf2! - Sending an event to a stopped actor no longer throws when the event contains unserializable data (e.g. circular references). Previously, the development-only warning that an event was sent to a stopped actor usedJSON.stringifyon the event, which could throw and mask the intended warning. The warning is now emitted safely regardless of the event's contents.v5.32.4Compare Source
Patch Changes
#5589
e913eebThanks @spokodev! - Fixed a bug where targeting a history state that is a direct child of aparallelstate would silently do nothing when that parallel state had not been visited yet and the history state had no default target. The machine now enters the parallel state's initial configuration, matching the behavior of history states inside compound states.v5.32.3Compare Source
Patch Changes
#5575
830db8bThanks @JSap0914! - FixedinitialTransition(andtransition) throwing"Actor with system ID '...' already exists"when the machine contains aninvokewith asystemId.Root cause:
createInertActorScopeusedcreateActor(logic)internally, which eagerly rangetInitialSnapshotduring construction and registered anysystemId-carrying child actors in the system. When the caller then rangetInitialSnapshot(ortransition) via the returned scope, the same system was reused, causing the duplicate-registration error.Fix: After creating the internal actor,
createInertActorScopenow replaces the actor's system reference with a freshly-created system. Child actors spawned by the subsequent caller-drivengetInitialSnapshot/transitioninvocation therefore register into a clean system with no pre-existing entries.#5585
a551a2bThanks @RubenFricke! - Add missing https:// protocol to the Stately Studio link in the READMEv5.32.2Compare Source
Patch Changes
#5548
8a53531Thanks @JSap0914! - fix(core): fall back to wildcard event descriptors when an exact descriptor's guard failsWhen a state has both an exact event descriptor (e.g.
"foo.bar") and a matching wildcard descriptor (e.g."foo.*"), transitions from the exact descriptor are now tried first; if all their guards fail, matching wildcard descriptor transitions are tried as fallback. Previously, the presence of an exact match would prevent any wildcard fallback from being considered, leaving the machine in its current state when the exact descriptor's guard failed.v5.32.1Compare Source
Patch Changes
41c0a5aThanks @joshuaellis! - fix(core): resolve children snapshot union pollution for typed invokev5.32.0Compare Source
Minor Changes
063416dThanks @davidkpiano! - ExportInspectedTransitionEventfromxstate.v5.31.1Compare Source
Patch Changes
#5525
f79ea13Thanks @davidkpiano! - Fixed route transition guards so named guards registered withsetup({ guards })are resolved forroute.guard.v5.31.0Compare Source
Minor Changes
#5429
9d9c1feThanks @davidkpiano! - AddmapState(snapshot, mapper)to map a snapshot to values based on active state(s).#5430
e543599Thanks @davidkpiano! - AddmaxIterationsoption to configure the maximum number of microsteps allowed before throwing an infinite loop error. The default isInfinity(no limit) to avoid breaking existing machines.You can configure it when creating a machine:
v5.30.0Compare Source
Minor Changes
#5493
871857dThanks @davidkpiano! - Add afilterEventsoption toxstate/graphtraversal helpers andcreateTestModel(...)to control which events should be explored from eachstate.
This makes it possible to opt into enabled-only traversal for machine snapshots,
such as when you only want to explore events that currently pass guards:
v5.29.0Compare Source
Minor Changes
#5299
ca8306fThanks @Uniqen! - Addactor.select(selector, equalityFn?)method to derive aReadable<TSelected>from an actor's snapshot. The returned object has.subscribe()(only emits when the selected value changes, usingObject.isby default) and.get()for synchronous access.v5.28.0Compare Source
Minor Changes
#4184
a741fe7Thanks @davidkpiano! - Added routable states. States withroute: {}and an explicitidcan be navigated to from anywhere via a single{ type: 'xstate.route', to: '#id' }event.Routes support guards for conditional navigation:
Patch Changes
ad809a0Thanks @davidkpiano! - Fix: export types so setup() declaration emit works (fixes #5462)v5.27.0Compare Source
Minor Changes
#5457
287b51eThanks @davidkpiano! - AddgetInitialMicrosteps(…)andgetMicrosteps(…)functions that return an array of[snapshot, actions]tuples for each microstep in a transition.v5.26.0Compare Source
Minor Changes
#5406
703c3a1Thanks @davidkpiano! - AddgetNextTransitions(state)utility to get all transitions available from currentstate.v5.25.1Compare Source
Patch Changes
e36e299Thanks @davidkpiano! - FixsystemIdcleanup for nested children onstopChildv5.25.0Compare Source
Minor Changes
#5422
329297bThanks @davidkpiano! - Add partial descriptor support toassertEvent(…)Patch Changes
2eb8274Thanks @assertnotnull! - Fix a bug in Cordova when iterating an empty Mapv5.24.0Compare Source
Minor Changes
#5371
b8ec3b1Thanks @davidkpiano! - Addsetup.extend()method to incrementally extend machine setup configurations with additional actions, guards, and delays. This enables composable and reusable machine setups where extended actions, guards, and delays can reference base actions, guards, and delays and support chaining multiple extensions:v5.23.0Compare Source
Minor Changes
#5387
53dd7f1Thanks @farskid! - Addssystem.getAllthat returns a record of running actors within the system by their system idv5.22.1Compare Source
Patch Changes
#5379
98f9dddThanks @davidkpiano! - Makeactor.systemIdpublic:#5380
e7e5e44Thanks @Nirajkashyap! - fix: remove 'eventType' from required fields in initialTransitionObjectv5.22.0Compare Source
Minor Changes
#5367
76c857eThanks @davidkpiano! - Add type-bound action helpers tosetup():createAction(fn)– create type-safe custom actionssetup().assign(...),setup().sendTo(...),setup().raise(...),setup().log(...),setup().cancel(...),setup().stopChild(...),setup().enqueueActions(...),setup().emit(...),setup().spawnChild(...)– setup-scoped helpers that are fully typed to the setup's context/events/actors/guards/delays/emitted.These helpers return actions that are bound to the specific
setup()they were created from and can be used directly in the machine produced by that setup.v5.21.0Compare Source
Minor Changes
#5364
15e15b5Thanks @davidkpiano! - Added.createStateConfig(…)to the setup API. This makes it possible to create state configs that are strongly typed and modular.v5.20.2Compare Source
Patch Changes
#5351
71387ffThanks @davidkpiano! - Fix: Emit callback errors no longer crash the actorv5.20.1Compare Source
Patch Changes
9a0ae82Thanks @sfc-gh-dperezalvarez! - ExportedInspectedActionEventtypev5.20.0Compare Source
Minor Changes
#5287
e07a7cd8462473188a0fb646a965e61be1ce6ae3Thanks @davidkpiano! - The graph and model-based testing utilities from @xstate/graph (and @xstate/test previously) were moved to the corexstatepackage.v5.19.4Compare Source
Patch Changes
479c74b83fa77c57c48f54cf0e9dcfab5fe6cae5Thanks @ebadyz! - Removed outdatedcontextparameter reference fromprovidemethod documentation.v5.19.3Compare Source
Patch Changes
b453b2d72ba12d0fe46a995f9ccced8000fd0cc9Thanks @chladog! - Add proper history value persistence and restorationv5.19.2Compare Source
Patch Changes
d99df1d8f4fe49145c9974465b65028bf19b365fThanks @Andarist! - Improved compatibility of inferred types in projects withexactOptionalPropertyTypesenabledv5.19.1Compare Source
Patch Changes
#5139
bf6119a7310a878afbf4f5b01f5e24288f9a0f16Thanks @SandroMaglione! - Makespawninput required when defined inside referenced actor:v5.19.0Compare Source
Minor Changes
#4954
8c4b70652acaef2702f32435362e4755679a516dThanks @davidkpiano! - Added a newtransitionfunction that takes an actor logic, a snapshot, and an event, and returns a tuple containing the next snapshot and the actions to execute. This function is a pure function and does not execute the actions itself. It can be used like this:Added a new
initialTransitionfunction that takes an actor logic and an optional input, and returns a tuple containing the initial snapshot and the actions to execute from the initial transition. This function is also a pure function and does not execute the actions itself. It can be used like this:These new functions provide a way to separate the calculation of the next snapshot and actions from the execution of those actions, allowing for more control and flexibility in the transition process.
v5.18.2Compare Source
Patch Changes
25963966c394fc904dc9b701a420b6e204ebe7f7Thanks @davidkpiano! - The inspection event interfaces now expectActorRefLikeinstead ofAnyActorRefv5.18.1Compare Source
Patch Changes
ad38c35c37Thanks @SandroMaglione! - ExportedRequiredActorOptionsKeystype meant to be used by integration packages like@xstate/reactv5.18.0Compare Source
Minor Changes
#5042
54c9d9e6a4Thanks @boneskull! -waitFor()now accepts a{signal: AbortSignal}inWaitForOptions#5006
1ab974547fThanks @davidkpiano! - The state value typings for setup state machine actors (setup({}).createMachine({ ... })) have been improved to represent the actual expected state values.Patch Changes
#5054
853f6daa0bThanks @davidkpiano! - TheCallbackLogicFunctiontype (previouslyInvokeCallback) is now exported. This is the callback function that you pass intofromCallback(callbackLogicFn)to create an actor from a callback function.v5.17.4Compare Source
Patch Changes
d6df8fb470Thanks @Andarist! - Fixed an inference issue that preventedemitused directly insetup(or barecreateMachine) to benefit fromtypes.emittedtypes.v5.17.3Compare Source
Patch Changes
7bed484c38Thanks @davidkpiano! - FixEventFromandContextFromtypesv5.17.2Compare Source
Patch Changes
#5029
88bd87ab41Thanks @davidkpiano! - RevertActorRefFromchange#5011
a275d274deThanks @davidkpiano! - There is a new type helper:ActorRefFromLogic<TLogic>. This type is a stricter form ofActorRefFrom<TLogic>that only accepts actor logic types. See #4997 for more details.v5.17.1Compare Source
Patch Changes
51d4c4fc5Thanks @davidkpiano! - The internal types forStateMachine<...>have been improved so that all type params are required, to prevent errors when using the types. This fixes weird issues like #5008.v5.17.0Compare Source
Minor Changes
#4979
a0e9ebcefThanks @davidkpiano! - State IDs are now strongly typed as keys ofsnapshot.getMeta()for state machine actor snapshots.Patch Changes
9877d548bThanks @davidkpiano! - Fix an issue whereclearTimeout(undefined)was sometimes being called, which can cause errors for some clock implementations. See #5001 for details.v5.16.0Compare Source
Minor Changes
#4996
5be796cd2Thanks @ronvoluted! - The actor snapshotstatustype ('active' | 'done' | 'error' | 'stopped') is now exposed asSnapshotStatus#4981
c4ae156b2Thanks @davidkpiano! - AddedsendParentto theenqueueActionsfeature. This allows users to enqueue actions that send events to the parent actor within theenqueueActionsblock.v5.15.0Compare Source
Minor Changes
#4976
452bce71eThanks @with-heart! - Added exports for actor logic-specificActorReftypes:CallbackActorRef,ObservableActorRef,PromiseActorRef, andTransitionActorRef.Each type represents
ActorRefnarrowed to the corresponding type of logic (the type ofselfwithin the actor's logic):CallbackActorRef: actor created byfromCallbackObservableActorRef: actor created byfromObservableandfromEventObservablePromiseActorRef: actor created byfromPromiseTransitionActorRef: actor created byfromTransition#4949
8aa4c2b90Thanks @davidkpiano! - The TypeGen-related types have been removed from XState, simplifying the internal types without affecting normal XState usage.v5.14.0Compare Source
Minor Changes
#4936
c58b36dc3Thanks @davidkpiano! - Inspecting an actor system viaactor.system.inspect(ev => …)now accepts a function or observer, and returns a subscription:#4942
9caaa1f70Thanks @boneskull! -DoneActorEventandErrorActorEventnow contain propertyactorId, which refers to the ID of the actor the event refers to.#4935
2ac08b700Thanks @davidkpiano! - All actor logic creators now support emitting events:Promise actors
Transition actors
Observable actors
Callback actors
Patch Changes
417f35a11Thanks @boneskull! - Expose typeUnknownActorReffor use when callinggetSnapshot()on an unknownActorRef.v5.13.2Compare Source
Patch Changes
71a7f8692Thanks @davidkpiano! - Actors with emitted events should no longer cause type issues: #4931v5.13.1Compare Source
Patch Changes
#4905
dbeafeb25Thanks @davidkpiano! - You can now use a wildcard to listen for any emitted event from an actor:v5.13.0Compare Source
Minor Changes
#4832
148d8fcefThanks @cevr! -fromPromisenow passes a signal into its creator function.This will be called whenever the state transitions before the promise is resolved. This is useful for cancelling the promise if the state changes.
Patch Changes
#4876
3f6a73b56Thanks @davidkpiano! - XState will now warn when calling built-in actions likeassign,sendTo,raise,emit, etc. directly inside of a custom action. See https://stately.ai/docs/actions#built-in-actions for more details.v5.12.0Compare Source
Minor Changes
#4863
0696adc21Thanks @davidkpiano! - Meta objects for state nodes and transitions can now be specified insetup({ types: … }):v5.11.0Compare Source
Minor Changes
#4806
f4e0ec48cThanks @davidkpiano! - Inline actor logic is now permitted when named actors are present. Defining inline actors will no longer cause a TypeScript error:v5.10.0Compare Source
Minor Changes
#4822
f7f1fbbf3Thanks @davidkpiano! - Theclockandloggerspecified in theoptionsobject ofcreateActor(logic, options)will now propagate to all actors created within the same actor system.v5.9.1Compare Source
Patch Changes
567267ed2Thanks @Andarist! - Add missingemitexportv5.9.0Compare Source
Minor Changes
#4746
b570ba20dThanks @davidkpiano! - The newemit(…)action creator emits events that can be received by listeners. Actors are now event emitters.#4777
4abeed9dfThanks @Andarist! - Added support forparamstoenqueueActionsv5.8.2Compare Source
Patch Changes
9a0120901Thanks @Andarist! - Fixed a type issue that preventsendParentto be accepted bysetupwhendelaysstayed not configured.v5.8.1Compare Source
Patch Changes
4a29f8aabThanks @Andarist! - Correctly use falsy outputs (instead of accidentally converting them toundefined).v5.8.0Compare Source
Minor Changes
a9e3c086fThanks @Andarist! - Revampedsetupand actions types to disallow usage of non-configured implementationsv5.7.1Compare Source
Patch Changes
15b7dd1f0Configuration
📅 Schedule: (UTC)
* 0-3 * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.