Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 1, 2022
1 parent 7e17c41 commit ce67afc
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 67 deletions.
5 changes: 0 additions & 5 deletions .changeset/flat-dolls-suffer.md

This file was deleted.

18 changes: 0 additions & 18 deletions .changeset/funny-colts-argue.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rich-tips-dress.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/shy-ties-rescue.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sour-candles-exist.md

This file was deleted.

63 changes: 46 additions & 17 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# xstate

## 4.30.0

### Minor Changes

- [#2965](https://github.com/statelyai/xstate/pull/2965) [`8b8f719c3`](https://github.com/statelyai/xstate/commit/8b8f719c36ab2c09fcd11b529cc6c9c89a06ad2e) Thanks [@satyasinha](https://github.com/satyasinha)! - All actions are now available in the `actions` variable when importing: `import { actions } from 'xstate'`

* [#2892](https://github.com/statelyai/xstate/pull/2892) [`02de3d44f`](https://github.com/statelyai/xstate/commit/02de3d44f8ca87b4dcb4153d3560da7d43ee9d0b) Thanks [@davidkpiano](https://github.com/davidkpiano)! - Persisted state can now be easily restored to a state compatible with the machine without converting it to a `State` instance first:

```js
// Persisting a state
someService.subscribe(state => {
localStorage.setItem('some-state', JSON.stringify(state));
});

// Restoring a state
const stateJson = localStorage.getItem('some-state');

// No need to convert `stateJson` object to a state!
const someService = interpret(someMachine).start(stateJson);
```

### Patch Changes

- [#2982](https://github.com/statelyai/xstate/pull/2982) [`a39145580`](https://github.com/statelyai/xstate/commit/a391455803171dcf03a1a0ec589f9dd603260d63) Thanks [@Andarist](https://github.com/Andarist)! - Marked all phantom properties on the `StateMachine` type as deprecated. This deprioritized them in IDEs so they don't popup as first suggestions during property access.

* [#2992](https://github.com/statelyai/xstate/pull/2992) [`22737adf2`](https://github.com/statelyai/xstate/commit/22737adf211971197f3809f406ac3bee54dc69f0) Thanks [@Andarist](https://github.com/Andarist), [@mattpocock](https://github.com/mattpocock)! - Fixed an issue with `state.context` becoming `any` after `state.matches` when typegen is used.

- [#2981](https://github.com/statelyai/xstate/pull/2981) [`edf60d67b`](https://github.com/statelyai/xstate/commit/edf60d67b3ca58eca96c7853410528c4e4abac7b) Thanks [@Andarist](https://github.com/Andarist)! - Moved an internal `@ts-ignore` to a JSDoc-style comment to fix consuming projects that do not use `skipLibCheck`. Regular inline and block comments are not preserved in the TypeScript's emit.

## 4.29.0

### Minor Changes
Expand Down Expand Up @@ -233,10 +262,10 @@
model.createMachine({
// `ctx` was of type `any`
entry: (ctx) => {},
entry: ctx => {},
exit: assign({
// `ctx` was of type `unknown`
foo: (ctx) => 42
foo: ctx => 42
})
});
```
Expand Down Expand Up @@ -412,11 +441,11 @@
const machine = createMachine({
context: { count: 0 },
entry: [
(ctx) => console.log(ctx.count), // 0
assign({ count: (ctx) => ctx.count + 1 }),
(ctx) => console.log(ctx.count), // 1
assign({ count: (ctx) => ctx.count + 1 }),
(ctx) => console.log(ctx.count) // 2
ctx => console.log(ctx.count), // 0
assign({ count: ctx => ctx.count + 1 }),
ctx => console.log(ctx.count), // 1
assign({ count: ctx => ctx.count + 1 }),
ctx => console.log(ctx.count) // 2
],
preserveActionOrder: true
});
Expand All @@ -425,11 +454,11 @@
const machine = createMachine({
context: { count: 0 },
entry: [
(ctx) => console.log(ctx.count), // 2
assign({ count: (ctx) => ctx.count + 1 }),
(ctx) => console.log(ctx.count), // 2
assign({ count: (ctx) => ctx.count + 1 }),
(ctx) => console.log(ctx.count) // 2
ctx => console.log(ctx.count), // 2
assign({ count: ctx => ctx.count + 1 }),
ctx => console.log(ctx.count), // 2
assign({ count: ctx => ctx.count + 1 }),
ctx => console.log(ctx.count) // 2
]
// preserveActionOrder: false
});
Expand Down Expand Up @@ -628,7 +657,7 @@
});
const service = interpret(machine)
.onTransition((state) => {
.onTransition(state => {
// Read promise value synchronously
const resolvedValue = state.context.promiseRef?.getSnapshot();
// => undefined (if promise not resolved yet)
Expand Down Expand Up @@ -708,7 +737,7 @@
context: { value: 42 },
on: {
INC: {
actions: assign({ value: (ctx) => ctx.value + 1 })
actions: assign({ value: ctx => ctx.value + 1 })
}
}
});
Expand Down Expand Up @@ -968,7 +997,7 @@
```js
// ...
actions: stop((context) => context.someActor);
actions: stop(context => context.someActor);
```
### Patch Changes
Expand Down Expand Up @@ -1206,10 +1235,10 @@
```js
entry: [
choose([
{ cond: (ctx) => ctx > 100, actions: raise('TOGGLE') },
{ cond: ctx => ctx > 100, actions: raise('TOGGLE') },
{
cond: 'hasMagicBottle',
actions: [assign((ctx) => ({ counter: ctx.counter + 1 }))]
actions: [assign(ctx => ({ counter: ctx.counter + 1 }))]
},
{ actions: ['fallbackAction'] }
])
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": "4.29.0",
"version": "4.30.0",
"description": "Finite State Machines and Statecharts for the Modern Web.",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"url": "https://github.com/statelyai/xstate/issues"
},
"peerDependencies": {
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"devDependencies": {
"jest": "^26.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"url": "https://github.com/statelyai/xstate/issues"
},
"peerDependencies": {
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"devDependencies": {
"jest": "^26.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-immer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dependencies": {},
"peerDependencies": {
"immer": "^9.0.6",
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"devDependencies": {
"immer": "^9.0.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"peerDependencies": {
"@xstate/fsm": "^1.6.4",
"react": "^16.8.0 || ^17.0.0",
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"peerDependenciesMeta": {
"@xstate/fsm": {
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-scxml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"xml-js": "^1.6.11",
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"devDependencies": {
"@scion-scxml/test-framework": "^2.0.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"peerDependencies": {
"@xstate/fsm": "^1.6.4",
"svelte": "^3.24.1",
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"peerDependenciesMeta": {
"@xstate/fsm": {
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"url": "https://github.com/statelyai/xstate/issues"
},
"peerDependencies": {
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"devDependencies": {
"jest": "^26.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/xstate-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"peerDependencies": {
"@xstate/fsm": "^1.6.4",
"vue": "^3.0.0",
"xstate": "^4.29.0"
"xstate": "^4.30.0"
},
"peerDependenciesMeta": {
"@xstate/fsm": {
Expand Down

0 comments on commit ce67afc

Please sign in to comment.