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

Update XState (main) #150263

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Update XState (main) #150263

merged 1 commit into from
Apr 27, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 4, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@xstate/react (source) ^3.0.2 -> ^3.2.1 age adoption passing confidence
xstate (source) ^4.35.2 -> ^4.37.1 age adoption passing confidence

Release Notes

statelyai/xstate

v3.2.1

Compare Source

Patch Changes

v3.2.0

Compare Source

Minor Changes
  • #​3814 494203b3d Thanks @​Andarist! - The Provider from createActorContext(...) now accepts the options={{...}} prop that takes the same object as the second argument to the useMachine(machine, options) hook.

    These options are no longer passed as the second argument to the createActorContext(machine) function:

    -const SomeContext = createActorContext(someMachine,
    -  { actions: { ... } });
    +const SomeContext = createActorContext(someMachine);
    
    // ...
    
    -<SomeContext.Provider>
    +<SomeContext.Provider options={{ actions: { ... } }}>
    
    // ...

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 '@&#8203;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>
      );
    }

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 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 release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Feb 4, 2023
@renovate renovate bot requested a review from a team February 4, 2023 03:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

@renovate renovate bot force-pushed the renovate/main-xstate branch 2 times, most recently from 9b42e9c to f34401b Compare February 6, 2023 20:02
@weltenwort
Copy link
Member

ℹ️ The type check failures seem to occur because @xstate/react relies on instantiation expressions introduced with TypeScript 4.7. Kibana is still on TypeScript 4.6.

@renovate renovate bot force-pushed the renovate/main-xstate branch 2 times, most recently from f3cef5a to e78802c Compare February 20, 2023 21:06
@renovate renovate bot force-pushed the renovate/main-xstate branch 2 times, most recently from 9f923a0 to acce857 Compare March 10, 2023 17:30
@weltenwort
Copy link
Member

ℹ️ The incompatibility with TS < 4.7 was actually fixed in https://github.com/statelyai/xstate/releases/tag/%40xstate%2Freact%403.2.1 🎉

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
infra 1379 1380 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
infra 2.0MB 2.0MB +1.9KB
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 17 19 +2
securitySolution 399 402 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 18 20 +2
securitySolution 479 482 +3
total +5

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@weltenwort
Copy link
Member

@elasticmachine run elasticsearch-ci/docs

@weltenwort weltenwort merged commit afb36f3 into main Apr 27, 2023
@weltenwort weltenwort deleted the renovate/main-xstate branch April 27, 2023 17:13
@kibanamachine kibanamachine added v8.9.0 backport:skip This commit does not require backporting labels Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants