Skip to content

Commit

Permalink
Version Packages (#5050)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Aug 30, 2024
1 parent 8c35da9 commit 26aabae
Show file tree
Hide file tree
Showing 15 changed files with 118 additions and 120 deletions.
11 changes: 0 additions & 11 deletions .changeset/mean-news-sell.md

This file was deleted.

24 changes: 0 additions & 24 deletions .changeset/mean-peaches-decide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/pretty-chicken-lie.md

This file was deleted.

63 changes: 0 additions & 63 deletions .changeset/two-hounds-march.md

This file was deleted.

76 changes: 76 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,81 @@
# xstate

## 5.18.0

### Minor Changes

- [#5042](https://github.com/statelyai/xstate/pull/5042) [`54c9d9e6a4`](https://github.com/statelyai/xstate/commit/54c9d9e6a49ab8af8b58d700ed967536f9c06fb4) Thanks [@boneskull](https://github.com/boneskull)! - `waitFor()` now accepts a `{signal: AbortSignal}` in `WaitForOptions`

- [#5006](https://github.com/statelyai/xstate/pull/5006) [`1ab974547f`](https://github.com/statelyai/xstate/commit/1ab974547f2e1f1b656279f144f6b88a4419d87e) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The state value typings for setup state machine actors (`setup({}).createMachine({ ... })`) have been improved to represent the actual expected state values.

```ts
const machine = setup({}).createMachine({
initial: 'green',
states: {
green: {},
yellow: {},
red: {
initial: 'walk',
states: {
walk: {},
wait: {},
stop: {}
}
},
emergency: {
type: 'parallel',
states: {
main: {
initial: 'blinking',
states: {
blinking: {}
}
},
cross: {
initial: 'blinking',
states: {
blinking: {}
}
}
}
}
}
});

const actor = createActor(machine).start();

const stateValue = actor.getSnapshot().value;

if (stateValue === 'green') {
// ...
} else if (stateValue === 'yellow') {
// ...
} else if ('red' in stateValue) {
stateValue;
// {
// red: "walk" | "wait" | "stop";
// }
} else {
stateValue;
// {
// emergency: {
// main: "blinking";
// cross: "blinking";
// };
// }
}
```

### Patch Changes

- [#5054](https://github.com/statelyai/xstate/pull/5054) [`853f6daa0b`](https://github.com/statelyai/xstate/commit/853f6daa0b58bab6ea4153043f9efcfb18d18172) Thanks [@davidkpiano](https://github.com/davidkpiano)! - The `CallbackLogicFunction` type (previously `InvokeCallback`) is now exported. This is the callback function that you pass into `fromCallback(callbackLogicFn)` to create an actor from a callback function.

```ts
import { type CallbackLogicFunction } from 'xstate';
// ...
```

## 5.17.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xstate",
"version": "5.17.4",
"version": "5.18.0",
"description": "Finite State Machines and Statecharts for the Modern Web.",
"main": "dist/xstate.cjs.js",
"module": "dist/xstate.esm.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/xstate-graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"url": "https://github.com/statelyai/xstate/issues"
},
"peerDependencies": {
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"devDependencies": {
"xstate": "5.17.4"
"xstate": "5.18.0"
},
"dependencies": {}
}
4 changes: 2 additions & 2 deletions packages/xstate-immer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
"dependencies": {},
"peerDependencies": {
"immer": "^9.0.6 || ^10",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"devDependencies": {
"immer": "^10.0.2",
"xstate": "5.17.4"
"xstate": "5.18.0"
}
}
4 changes: 2 additions & 2 deletions packages/xstate-inspect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
"devDependencies": {
"@types/ws": "^8.2.2",
"ws": "^8.4.0",
"xstate": "5.17.4"
"xstate": "5.18.0"
},
"peerDependencies": {
"@types/ws": "^8.0.0",
"ws": "^8.0.0",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"peerDependenciesMeta": {
"@types/ws": {
Expand Down
4 changes: 2 additions & 2 deletions packages/xstate-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"peerDependenciesMeta": {
"xstate": {
Expand All @@ -74,6 +74,6 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"rxjs": "^7.8.0",
"xstate": "5.17.4"
"xstate": "5.18.0"
}
}
4 changes: 2 additions & 2 deletions packages/xstate-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"peerDependencies": {
"solid-js": "^1.6.0",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"peerDependenciesMeta": {
"xstate": {
Expand All @@ -53,6 +53,6 @@
"devDependencies": {
"solid-js": "^1.7.6",
"solid-testing-library": "^0.3.0",
"xstate": "5.17.4"
"xstate": "5.18.0"
}
}
25 changes: 25 additions & 0 deletions packages/xstate-store/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @xstate/store

## 2.3.0

### Minor Changes

- [#5056](https://github.com/statelyai/xstate/pull/5056) [`8c35da9a72`](https://github.com/statelyai/xstate/commit/8c35da9a72bf067a275335d0391ce9ab85ed8a12) Thanks [@steveadams](https://github.com/steveadams)! - You can now use the xstate/store package with SolidJS.

Import `useSelector` from `@xstate/store/solid`. Select the data you want via `useSelector(…)` and send events using `store.send(eventObject)`:

```tsx
import { donutStore } from './donutStore.ts';
import { useSelector } from '@xstate/store/solid';

function DonutCounter() {
const donutCount = useSelector(donutStore, (state) => state.context.donuts);

return (
<div>
<button onClick={() => donutStore.send({ type: 'addDonut' })}>
Add donut ({donutCount()})
</button>
</div>
);
}
```

## 2.2.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/xstate-store/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xstate/store",
"version": "2.2.1",
"version": "2.3.0",
"description": "Simple stores",
"keywords": [
"store",
Expand Down Expand Up @@ -64,7 +64,7 @@
"react-dom": "^18.0.0",
"solid-js": "^1.7.6",
"solid-testing-library": "^0.3.0",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"peerDependencies": {
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/xstate-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"peerDependencies": {
"svelte": "^3.24.1 || ^4",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"peerDependenciesMeta": {
"xstate": {
Expand All @@ -58,6 +58,6 @@
"svelte": "^3.55.1",
"svelte-check": "^3.2.0",
"svelte-preprocess": "^5.0.0",
"xstate": "5.17.4"
"xstate": "5.18.0"
}
}
4 changes: 2 additions & 2 deletions packages/xstate-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"peerDependencies": {
"vue": "^3.0.0",
"xstate": "^5.17.4"
"xstate": "^5.18.0"
},
"peerDependenciesMeta": {
"xstate": {
Expand All @@ -65,6 +65,6 @@
"@testing-library/vue": "^6.6.1",
"@vue/compiler-sfc": "^3.0.11",
"vue": "^3.0.11",
"xstate": "5.17.4"
"xstate": "5.18.0"
}
}

0 comments on commit 26aabae

Please sign in to comment.