Skip to content

Commit

Permalink
[v5] Remove FSM-related code (#4265)
Browse files Browse the repository at this point in the history
* Remove FSM stuff from packages

* remove mentions of `/fsm` entrypoints from docs

* remove redundant preconstruct configs

* remove mentions of `@xstate/fsm` from `.changeset` dir

* Remove `@xstate/fsm` itself

* Changeset

* add extra changeset

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
  • Loading branch information
davidkpiano and Andarist committed Sep 12, 2023
1 parent c8de2ce commit 1153b3f
Show file tree
Hide file tree
Showing 68 changed files with 95 additions and 6,024 deletions.
1 change: 0 additions & 1 deletion .changeset/perfect-jokes-lie.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
'xstate': patch
'@xstate/fsm': patch
'@xstate/react': patch
'@xstate/vue': patch
---
Expand Down
3 changes: 0 additions & 3 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"initialVersions": {
"xstate": "4.7.3",
"@xstate/analytics": "0.0.1",
"@xstate/fsm": "1.1.0",
"@xstate/graph": "1.0.0",
"@xstate/immer": "0.0.1",
"@xstate/react": "1.0.0-rc.0",
Expand Down Expand Up @@ -124,7 +123,6 @@
"shy-cobras-ring",
"shy-gifts-shake",
"shy-walls-develop",
"six-pans-warn",
"sixty-hornets-allow",
"sixty-rules-heal",
"slow-apples-dance",
Expand Down Expand Up @@ -152,7 +150,6 @@
"twenty-fishes-fix",
"wise-wombats-invite",
"witty-hounds-invent",
"young-chefs-prove",
"young-laws-hope"
]
}
1 change: 0 additions & 1 deletion .changeset/quick-lizards-thrive.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
'xstate': minor
'@xstate/fsm': minor
'@xstate/graph': minor
'@xstate/react': minor
'@xstate/test': minor
Expand Down
6 changes: 6 additions & 0 deletions .changeset/silly-chefs-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@xstate/solid': minor
'@xstate/svelte': major
---

FSM-related functions have been removed.
6 changes: 6 additions & 0 deletions .changeset/silly-chefs-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@xstate/react': major
'@xstate/vue': major
---

FSM-related functions have been removed.
5 changes: 0 additions & 5 deletions .changeset/six-pans-warn.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/young-chefs-prove.md

This file was deleted.

1 change: 0 additions & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"packages": [
"packages/core",
"packages/xstate-fsm",
"packages/xstate-graph",
"packages/xstate-react",
"packages/xstate-test"
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ It uses event-driven programming, state machines, statecharts, and the actor mod
## Packages

- 🤖 `xstate` - Core finite state machine and statecharts library + interpreter
- [🔬 `@xstate/fsm`](https://github.com/statelyai/xstate/tree/main/packages/xstate-fsm) - Minimal finite state machine library
- [📉 `@xstate/graph`](https://github.com/statelyai/xstate/tree/main/packages/xstate-graph) - Graph traversal utilities for XState
- [⚛️ `@xstate/react`](https://github.com/statelyai/xstate/tree/main/packages/xstate-react) - React hooks and utilities for using XState in React applications
- [💚 `@xstate/vue`](https://github.com/statelyai/xstate/tree/main/packages/xstate-vue) - Vue composition functions and utilities for using XState in Vue applications
Expand Down
3 changes: 0 additions & 3 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ module.exports = {
'/packages/xstate-react/',
'/packages/xstate-vue/',
'/packages/xstate-graph/',
'/packages/xstate-fsm/',
'/packages/xstate-test/',
'/packages/xstate-immer/',
'/packages/xstate-inspect/',
Expand Down Expand Up @@ -269,7 +268,6 @@ module.exports = {
'/fr/packages/xstate-react/',
'/fr/packages/xstate-vue/',
'/fr/packages/xstate-graph/',
'/fr/packages/xstate-fsm/',
'/fr/packages/xstate-test/',
'/fr/packages/xstate-immer/',
'/fr/packages/xstate-inspect/',
Expand Down Expand Up @@ -393,7 +391,6 @@ module.exports = {
'packages/xstate-react/',
'packages/xstate-vue/',
'packages/xstate-graph/',
'packages/xstate-fsm/',
'packages/xstate-test/',
'packages/xstate-immer/',
'packages/xstate-inspect/',
Expand Down
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ JavaScript and TypeScript [finite state machines](https://en.wikipedia.org/wiki/
## Packages

- 🤖 `xstate` - Core finite state machine and statecharts library + interpreter
- [🔬 `@xstate/fsm`](https://github.com/statelyai/xstate/tree/main/packages/xstate-fsm) - Minimal finite state machine library
- [📉 `@xstate/graph`](https://github.com/statelyai/xstate/tree/main/packages/xstate-graph) - Graph traversal utilities for XState
- [⚛️ `@xstate/react`](https://github.com/statelyai/xstate/tree/main/packages/xstate-react) - React hooks and utilities for using XState in React applications
- [💚 `@xstate/vue`](https://github.com/statelyai/xstate/tree/main/packages/xstate-vue) - Vue composition functions and utilities for using XState in Vue applications
Expand Down
16 changes: 9 additions & 7 deletions docs/fr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Vous débutez avec les machines d'état et les diagrammes d'état ? [Lire notre
## Packages

- 🤖 `xstate` - Machine à états finis de base et bibliothèque de diagrammes d'états + interpréteur
- [🔬 `@xstate/fsm`](https://github.com/statelyai/xstate/tree/main/packages/xstate-fsm) - Bibliothèque minimale de machines à états finis
- [📉 `@xstate/graph`](https://github.com/statelyai/xstate/tree/main/packages/xstate-graph) - Graph traversal utilities for XState
- [⚛️ `@xstate/react`](https://github.com/statelyai/xstate/tree/main/packages/xstate-react) - Hooks et utilitaires React pour utiliser XState dans les applications React
- [💚 `@xstate/vue`](https://github.com/statelyai/xstate/tree/main/packages/xstate-vue) - Fonctions et utilitaires de composition Vue.js pour utiliser XState dans les applications Vue.js
Expand Down Expand Up @@ -206,8 +205,9 @@ const lightMachine = createMachine({

const currentState = 'green';

const nextState = lightMachine.transition(currentState, { type: 'TIMER' })
.value;
const nextState = lightMachine.transition(currentState, {
type: 'TIMER'
}).value;

// => 'yellow'
```
Expand Down Expand Up @@ -261,8 +261,9 @@ const lightMachine = createMachine({

const currentState = 'yellow';

const nextState = lightMachine.transition(currentState, { type: 'TIMER' })
.value;
const nextState = lightMachine.transition(currentState, {
type: 'TIMER'
}).value;
// => {
// red: 'walk'
// }
Expand Down Expand Up @@ -375,8 +376,9 @@ const wordMachine = createMachine({
}
});

const boldState = wordMachine.transition('bold.off', { type: 'TOGGLE_BOLD' })
.value;
const boldState = wordMachine.transition('bold.off', {
type: 'TOGGLE_BOLD'
}).value;

// {
// bold: 'on',
Expand Down
16 changes: 9 additions & 7 deletions docs/fr/packages/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ JavaScript and TypeScript [finite state machines](https://en.wikipedia.org/wiki/
## Packages

- 🤖 `xstate` - Core finite state machine and statecharts library + interpreter
- [🔬 `@xstate/fsm`](https://github.com/statelyai/xstate/tree/main/packages/xstate-fsm) - Minimal finite state machine library
- [📉 `@xstate/graph`](https://github.com/statelyai/xstate/tree/main/packages/xstate-graph) - Graph traversal utilities for XState
- [⚛️ `@xstate/react`](https://github.com/statelyai/xstate/tree/main/packages/xstate-react) - React hooks and utilities for using XState in React applications
- [`@xstate/test`](https://github.com/statelyai/xstate/tree/main/packages/xstate-test) - Model-based testing utilities for XState
Expand Down Expand Up @@ -116,8 +115,9 @@ const lightMachine = createMachine({

const currentState = 'green';

const nextState = lightMachine.transition(currentState, { type: 'TIMER' })
.value;
const nextState = lightMachine.transition(currentState, {
type: 'TIMER'
}).value;

// => 'yellow'
```
Expand Down Expand Up @@ -171,8 +171,9 @@ const lightMachine = createMachine({

const currentState = 'yellow';

const nextState = lightMachine.transition(currentState, { type: 'TIMER' })
.value;
const nextState = lightMachine.transition(currentState, {
type: 'TIMER'
}).value;
// => {
// red: 'walk'
// }
Expand Down Expand Up @@ -262,8 +263,9 @@ const wordMachine = createMachine({
}
});

const boldState = wordMachine.transition('bold.off', { type: 'TOGGLE_BOLD' })
.value;
const boldState = wordMachine.transition('bold.off', {
type: 'TOGGLE_BOLD'
}).value;

// {
// bold: 'on',
Expand Down

0 comments on commit 1153b3f

Please sign in to comment.