Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update xstate monorepo (major) #1489

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 23, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@xstate/vue (source) ^2.0.0 -> ^3.1.2 age adoption passing confidence
xstate (source) ^4.38.3 -> ^5.13.0 age adoption passing confidence

Release Notes

statelyai/xstate (@​xstate/vue)

v3.1.2

Compare Source

Patch Changes
  • #​3804 b53856d28 Thanks @​farskid! - Interpreter options can now be specified in the second argument of createActorContext(machine, options).

v3.1.1

Compare Source

Patch Changes
  • #​3799 51d254692 Thanks @​Andarist! - Fixed an issue that caused the internally used useSyncExternalStore to warn about the computed snapshot not being cached when a not-started machine servive was passed to useActor.

v3.1.0

Compare Source

Minor Changes
  • #​3778 f12248b23 Thanks @​davidkpiano! - The createActorContext(...) helper has been introduced to make global actors easier to use with React. It outputs a React Context object with the following properties:

    • .Provider - The React Context provider
    • .useActor(...) - A hook that can be used to get the current state and send events to the actor
    • .useSelector(...) - A hook that can be used to select some derived state from the actor's state
    • .useActorRef() - A hook that can be used to get a reference to the actor that can be passed to other components

    Usage:

    import { createActorContext } from '@​xstate/react';
    import { someMachine } from './someMachine';
    
    // Create a React Context object that will interpret the machine
    const SomeContext = createActorContext(someMachine);
    
    function SomeComponent() {
      // Get the current state and `send` function
      const [state, send] = SomeContext.useActor();
    
      // Or select some derived state
      const someValue = SomeContext.useSelector((state) => state.context.someValue);
    
      // Or get a reference to the actor
      const actorRef = SomeContext.useActorRef();
    
      return (/* ... */);
    }
    
    function App() {
      return (
        <SomeContext.Provider>
          <SomeComponent />
        </SomeContext.Provider>
      );
    }

v3.0.3

Compare Source

Patch Changes

v3.0.2

Compare Source

Patch Changes
  • #​3752 4190c3fd6 Thanks @​davidkpiano! - Computing the initial state is now consistent with useMachine and useActor, avoiding stale initial state problems with nested machines

v3.0.1

Compare Source

Patch Changes
  • #​3456 131d429ab Thanks @​davidkpiano! - Add shallowEqual helper comparator function.

  • #​3500 0dfc6d92f Thanks @​Andarist! - Fixed an issue with useSelector always computing fresh snapshots internally for uninitialized services. This avoids the internal useSyncExternalStore from warning about the snapshot value not being cached properly.

v3.0.0

Compare Source

Major Changes
  • #​2939 360e85462 Thanks @​Andarist! - This package now accepts React 18 as a peer dep and the implementation has been rewritten to use use-sync-external-store package. This doesn't break compatibility with older versions of React since we are using the shim to keep compatibility with those older versions.

  • #​2939 360e85462 Thanks @​Andarist! - asEffect and asLayoutEffect action creators were removed. They were not fitting the React model that well and could lead to issues as their existence suggested that they are easy to use.

    To execute actions at those exact times you can always either just call your stuff directly from those effects or send events to the machine from those effects and execute explicit actions in response to said events.

  • #​2939 360e85462 Thanks @​Andarist! - The signatures of useMachine and useService integrating with @xstate/fsm were changed. They now only accept a single generic each (TMachine and TService respectively). This has been done to match their signatures with the related hooks that integrate with xstate itself.

Patch Changes
  • #​2939 360e85462 Thanks @​Andarist! - In v2 we have changed signatures of useMachine and useInterpret. Instead of accepting a list of generics they now only support a single generic: TMachine. This change, erroneously, was only introduced to types targeting TS@4.x but the types targeting previous TS releases were still using the older signatures. This has now been fixed and users of older TS versions should now be able to leverage typegen with @xstate/react.

  • #​2939 360e85462 Thanks @​Andarist! - useMachine for xstate now correctly rerenders with the initial state when the internal service is being restarted. This might happen during Fast Refresh and now you shouldn't be able to observe this stale state that didn't match the actual state of the service.

  • #​2939 360e85462 Thanks @​Andarist! - useMachine for @xstate/fsm now starts the service in an effect. This avoids side-effects in render and improves the compatibility with StrictMode.

  • #​2939 360e85462 Thanks @​Andarist! - Implementations given to useMachine targeting @xstate/fsm are now updated in a layout effect. This avoid some stale closure problems for actions that are executed in response to events sent from layout effects.

  • Updated dependencies [360e85462, 360e85462]:


Configuration

📅 Schedule: Branch creation - "before 5am every weekday" in timezone America/New_York, Automerge - "every weekday" in timezone America/New_York.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added dependencies Pull requests that update a dependency file renovate-bot labels Apr 23, 2024
@renovate renovate bot requested a review from a team as a code owner April 23, 2024 06:49
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from b167e07 to 14b75f2 Compare April 24, 2024 06:19
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 14b75f2 to 0ffe366 Compare April 29, 2024 07:32
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 0ffe366 to b864357 Compare April 30, 2024 07:38
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from b864357 to b4820a8 Compare May 1, 2024 06:18
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from b4820a8 to b7e29fb Compare May 2, 2024 04:59
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from b7e29fb to 3ca0d7f Compare May 6, 2024 04:42
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 3ca0d7f to ac867a5 Compare May 6, 2024 07:09
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from ac867a5 to f2d31ed Compare May 7, 2024 05:18
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from f2d31ed to 3b126f0 Compare May 7, 2024 08:24
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 3b126f0 to 7a63253 Compare May 9, 2024 04:50
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 7a63253 to 78ccdcf Compare May 10, 2024 05:21
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 78ccdcf to 72098b9 Compare May 10, 2024 06:51
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 72098b9 to 8e6158d Compare May 16, 2024 06:02
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 6020c47 to 032549c Compare May 23, 2024 06:12
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 032549c to f3cf383 Compare May 24, 2024 04:53
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from f3cf383 to 711c77b Compare May 24, 2024 07:24
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 711c77b to 198d83f Compare May 27, 2024 04:58
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 198d83f to 5bf8f6e Compare May 27, 2024 08:28
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 5bf8f6e to 76b0ec8 Compare May 27, 2024 08:36
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 76b0ec8 to 603391a Compare May 28, 2024 06:44
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 603391a to eb16144 Compare May 29, 2024 04:35
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from eb16144 to d6cfa42 Compare May 30, 2024 08:49
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from d6cfa42 to 478ddd2 Compare June 4, 2024 04:07
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 478ddd2 to cf0f2f3 Compare June 4, 2024 06:59
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from cf0f2f3 to 89a293d Compare June 7, 2024 06:26
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 89a293d to 73e2f9a Compare June 10, 2024 06:38
@renovate renovate bot force-pushed the renovate/major-xstate-monorepo branch from 73e2f9a to 53a1ab0 Compare June 11, 2024 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file renovate-bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant