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

Version Packages #4569

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Version Packages #4569

merged 1 commit into from
Dec 7, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 7, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • #4198 ca58904ad Thanks @davidkpiano! - Introduce toPromise(actor), which creates a promise from an actor that resolves with the actor snapshot's output when done, or rejects with the actor snapshot's error when it fails.

    import { createMachine, createActor, toPromise } from 'xstate';
    
    const machine = createMachine({
      // ...
      states: {
        // ...
        done: { type: 'final', output: 42 }
      }
    });
    
    const actor = createActor(machine);
    
    actor.start();
    
    const output = await toPromise(actor);
    
    console.log(output);
    // => 42

Patch Changes

  • #4568 a5c55fae2 Thanks @Andarist! - Fixed an issue with spawn within assign not returning a narrowed down ActorRef type on TypeScrip 5.0

  • #4570 c11127336 Thanks @Andarist! - Fixed an issue that caused a complete listener to be called instead of the error one when the actor was subscribed after being stopped.

Copy link

codesandbox-ci bot commented Dec 7, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 261a1ef:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@github-actions github-actions bot force-pushed the changeset-release/main branch from 8ae2437 to a02c956 Compare December 7, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant