Skip to content

V5 (WIP)#898

Merged
Andarist merged 1192 commits intomainfrom
next
Dec 1, 2023
Merged

V5 (WIP)#898
Andarist merged 1192 commits intomainfrom
next

Conversation

@davidkpiano
Copy link
Member

@davidkpiano davidkpiano commented Dec 26, 2019

This PR is a placeholder PR for the ongoing V5 work.

@changeset-bot
Copy link

changeset-bot bot commented Dec 26, 2019

🦋 Changeset detected

Latest commit: d3d6149

The changes in this PR will be included in the next version bump.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@davidkpiano davidkpiano requested a review from Andarist December 26, 2019 18:30
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 30, 2019

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 3555928:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@github-actions github-actions bot mentioned this pull request Feb 3, 2020
@davidkpiano davidkpiano added this to the 5.0 milestone Jun 26, 2021
@ghost
Copy link

ghost commented Nov 12, 2021

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 2, 2022

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 d3d6149:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

Andarist and others added 11 commits July 7, 2023 09:46
* Drop support for `TransitionsConfigArray`

* fix types + test

* add more tests

* add changeset
…tored and resolved (#4127)

* Refactor builtin actions in order to remove the fake callable signature

* Declassify the builtin actions

* Fix and cleanup types

* add extra type tests to raise

* Provide `action` to action implementations again

* Bring back .type for builtins

* Convert string action to an object form when creating action args

* Temporarily serialize~ actions in machine definition to pass JSON schema test

* Fixed `.after` cancellation

* Hoist `toSerializableActon`

* add changeset

* Remove outdated comment
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
# Conflicts:
#	packages/core/CHANGELOG.md
#	packages/core/package.json
#	packages/core/src/actions.ts
#	packages/core/src/index.ts
#	packages/core/src/types.ts
#	packages/core/test/actions.test.ts
#	packages/xstate-analytics/package.json
#	packages/xstate-graph/package.json
#	packages/xstate-immer/package.json
#	packages/xstate-inspect/package.json
#	packages/xstate-react/package.json
#	packages/xstate-scxml/package.json
#	packages/xstate-solid/package.json
#	packages/xstate-svelte/package.json
#	packages/xstate-test/package.json
#	packages/xstate-vue/package.json
* Require machine context if defined

* Oops

* Update packages/core/src/types.ts

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Okay Svelte

* Fix types

* Fix tests

* Add changeset

* Revert irrelevant files

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Add self to promise

* Add self for transitions

* Add self to observable + event observable

* Add self to callbacks

* Fix type

* Add changeset

* Update .changeset/orange-pillows-deny.md

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Add test + onSnapshot support for transition actors

* Revert "Add test + onSnapshot support for transition actors"

This reverts commit 542b37d.

* Add test

* Fix types

* Update packages/core/src/types.ts

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* POC for actor types

* Remove patterns.ts

* Fix types sorta

* Remove ActorMap

* Add changeset

* Improve state.children

* Add InputFrom and actor behavior input

* Types WIP

* PromiseActorEvents

* Undo

* Fix most type errors

* Get types passing

* Update packages/xstate-solid/test/useMachine.test.tsx

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Change changeset

* Fix types

* Fix test type

* Clean up ActorImpl types

* Fix import

* Fix import

* Fix

* Tweak how `TActors` are passed around

* Stick to the `.logic` prop

* add some type tests for actor types

* tweak things

* Removed TActions from state

* Fix Svelte type issues

* Add `TInput` to `TransitionActorLogic`

* tweak small things

* require actor IDs when they are configured

* small tweaks

* Tweak changeset

* Tweak how actor type is distributed in `InvokeConfig`

* disallow inline actors when the actor type is provided

* Fix `GenerateActorEvents`

* Fixed `TInvokeSrcNameMap` usage in `GenerateActorEvents`

* fixed tests

* Add comments explaining `GenerateActorEvents`

* fixed test

* remove old hack

* Compute `State['children']` more accurately

* fixed ComputeChildren type

* Add test and fix the children being a union

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Andarist and others added 28 commits November 29, 2023 15:09
* Strongly type state value

* Satisfy the typegen

* small tweaks

* Pass around `TStateValue` instead of `TConfig`

* Type `MachineSnapshot<...>['value']` correctly

* remove code related to typegen and `state.matches`

* remove outdated comment

* first stab at `ToTestStateValue`

* add some extra ts-expect-errors

* cast `machineSnapshotMatches`

* Fixed `ToTestStateValue`

* add missing initial property

* Revert "remove code related to typegen and `state.matches`"

This reverts commit 6e19c9a.

* support typegen

* Fixed assertions in typegen tests

* add more test cases, fix one case

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Refactor callback logic to not send self-event

* Changeset

* Attach to scope so @Andarist can fix it later

* use a `WeakMap` to keep callback instance around

* deduplicate observable event types

* unify promise event types with the convention used elsewhere

* add a tets case

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update templates

* Update to latest
* Further errors-related adjuments

* tweak tests and comments

* add changeset

* Update .changeset/olive-months-shave.md

Co-authored-by: David Khourshid <davidkpiano@gmail.com>

---------

Co-authored-by: David Khourshid <davidkpiano@gmail.com>
…-less actors (#4523)

* Fixed an issue with contextual parameters in input factories of input-less actors

* Changeset

---------

Co-authored-by: David Khourshid <davidkpiano@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update `@xstate/svelte`

* prefer useActor

* tweak things

* fixed type errors

* yet another type error

* changesets
* createAction POC

* Add guard evaluation

* Goodbye, pure and choose

* exec -> enqueue

* Rename to enqueueActions

* More renaming

* fixed types

* move `enqueueActions` to its own file and tweak the related types

* Reimplement `pure` using `enqueueActions`

* `guard` -> `check`

* Add changeset

* revert test changes

* add tests

* Remove `PureAction` reference

* add type tests

* fixed a typo

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update after events

* Changeset

* Use more predictable generated IDs

* Update packages/core/src/utils.ts

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Adjust after event types and invoke IDs further (#4524)

* drop one extra hash

* Update .changeset/weak-swans-care.md

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Remove `pure` and `choose`

* remove invalid comment

* Changeset

---------

Co-authored-by: David Khourshid <davidkpiano@gmail.com>
* Remove xstate-analytics

* remove moar files

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Fixed order of type parameters in `ActorRef`

* Changeset

---------

Co-authored-by: David Khourshid <davidkpiano@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rename `state` to `snapshot` in many variables and signatures

* Rename snapshot-related methods on the logic

* Deprecate options.state

* Changeset

---------

Co-authored-by: David Khourshid <davidkpiano@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Remove `escalate`

* Changeset

---------

Co-authored-by: David Khourshid <davidkpiano@gmail.com>
* For onError, rename event.data -> event.error

* Changeset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@Andarist Andarist merged commit 28a44bd into main Dec 1, 2023
@Andarist Andarist deleted the next branch December 1, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.