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 (beta) #3964

Merged
merged 1 commit into from
Apr 23, 2023
Merged

Version Packages (beta) #3964

merged 1 commit into from
Apr 23, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 13, 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 next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

[email protected]

Major Changes

  • #898 26986f417 Thanks @davidkpiano! - Sending a string event to actor.send('some string') will now throw a proper error message.

  • #3957 423c5ab72 Thanks @davidkpiano! - The machine .schema property is now .types:

    const machine = createMachine({
      // schema: { ... }
      types: {} as {
        context: { ... };
        events: { ... };
        // ...
      }
    });

    And the .tsTypes property is now .types.typegen:

    const machine = createMachine({
      // tsTypes: { ... }
      types: {} as {
        typegen: {};
        context: { ... };
        events: { ... };
        // ...
      }
    });
  • #3968 eecb31b8f Thanks @davidkpiano! - The createEmptyActor() function has been added to make it easier to create actors that do nothing ("empty" actors). This is useful for testing, or for some integrations such as useActor(actor) in @xstate/react that require an actor:

    import { createEmptyActor } from 'xstate';
    
    const SomeComponent = (props) => {
      // props.actor may be undefined
      const [state, send] = useActor(props.actor ?? createEmptyActor());
    
      // ...
    };
  • #3966 61db63bf4 Thanks @davidkpiano! - You can now import the following from xstate:

    import {
      // actions
      // sendTo (removed)
      pure,
    
      // interpret helpers
      waitFor,
    
      // actor functions
      fromPromise,
      fromObservable,
      fromCallback,
      fromEventObservable,
      fromTransition,
    
      // guard functions
      stateIn,
      not,
      and,
      or
    }

    The send action was removed from exports; use sendTo(...) or raise(...) instead.

Patch Changes

  • #3959 ead287257 Thanks @davidkpiano! - Unresolved promises will now be properly persisted. The current behavior is to restart a promise that is unresolved.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 13, 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 0610aa4:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@github-actions github-actions bot force-pushed the changeset-release/next branch 2 times, most recently from 93a9909 to 40c5f6c Compare April 20, 2023 12:26
@github-actions github-actions bot force-pushed the changeset-release/next branch from 40c5f6c to 0610aa4 Compare April 20, 2023 14:19
@davidkpiano davidkpiano merged commit 107d981 into next Apr 23, 2023
@davidkpiano davidkpiano deleted the changeset-release/next branch April 23, 2023 13:43
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