Skip to content

Commit 80c7222

Browse files
authored
Merge pull request #482 from igorkamyshev/next-013
Release 0.13
2 parents 99acd3f + 4ca5fa5 commit 80c7222

34 files changed

+744
-80
lines changed

.changeset/few-penguins-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farfetched/core": minor
3+
---
4+
5+
Add _Event_ `.forceDeactivate` to _Barrier_

.changeset/friendly-ducks-rush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farfetched/core": minor
3+
---
4+
5+
Runtime deprecation warnings about `concurrency` field in `createJsonQuery` and `createJsonMutation`

.changeset/happy-socks-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farfetched/core": minor
3+
---
4+
5+
Pass response original `headers` to `mapData` callback in `createJsonQuery`

.changeset/plenty-suns-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farfetched/core": minor
3+
---
4+
5+
Runtime deprecation warning in `attachOperation`

.changeset/red-mails-destroy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farfetched/core": minor
3+
---
4+
5+
Add _Event_ `.performed` to _Barrier_

.changeset/thin-cougars-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@farfetched/core": minor
3+
---
4+
5+
Pass response original `headers` to `mapData` callback in `createJsonMutation`

apps/website/docs/.vitepress/config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ export default withMermaid(
295295
{
296296
text: 'How to',
297297
items: [
298-
{ text: 'Server side rendering', link: '/recipes/ssr' },
298+
{ text: 'Server Side Rendering', link: '/recipes/ssr' },
299299
{ text: 'Testing', link: '/recipes/testing' },
300300
{
301301
text: 'Vite',
@@ -305,6 +305,10 @@ export default withMermaid(
305305
text: 'Base URL for all operations',
306306
link: '/recipes/base_url',
307307
},
308+
{
309+
text: 'Barrier Circuit Breaker',
310+
link: '/recipes/barrier_circuit_breaker',
311+
},
308312
],
309313
},
310314
{
@@ -403,6 +407,7 @@ export default withMermaid(
403407
{
404408
text: 'Releases',
405409
items: [
410+
{ text: 'v0.13 Naiharn', link: '/releases/0-13' },
406411
{ text: 'v0.12 Talat Noi', link: '/releases/0-12' },
407412
{ text: 'v0.11 Namtok Ngao', link: '/releases/0-11' },
408413
{ text: 'v0.10 Namtok Than Sadet', link: '/releases/0-10' },

apps/website/docs/api/factories/create_json_mutation.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,19 @@ Config fields:
2828
- `contract`: [_Contract_](/api/primitives/contract) allows you to validate the response and decide how your application should treat it — as a success response or as a failed one.
2929
- `validate?`: [_Validator_](/api/primitives/validator) allows you to dynamically validate received data.
3030
- `mapData?`: optional mapper for the response data, available overloads:
31-
- `({ result, params }) => mapped`
32-
- `{ source: Store, fn: ({ result, params }, source) => mapped }`
31+
32+
- `(res) => mapped`
33+
- `{ source: Store, fn: (data, res) => mapped }`
34+
35+
`res` object contains:
36+
37+
- `result`: parsed and validated response data
38+
- `params`: params which were passed to the [_Mutation_](/api/primitives/mutation)
39+
- `headers`: <Badge type="tip" text="since v0.13" /> raw response headers
40+
3341
- `status.expected`: `number` or `Array<number>` of expected HTTP status codes, if the response status code is not in the list, the mutation will be treated as failed
3442

35-
- `concurrency?`: concurrency settings for the [_Query_](/api/primitives/query)
43+
- `concurrency?`: concurrency settings for the [_Mutation_](/api/primitives/mutation)
3644
::: danger Deprecation warning
3745

3846
This field is deprecated since [v0.12](/releases/0-12) and will be removed in v0.14. Use [`concurrency` operator](/api/operators/concurrency) instead.

apps/website/docs/api/factories/create_json_query.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,15 @@ Config fields:
3030
- `contract`: [_Contract_](/api/primitives/contract) allows you to validate the response and decide how your application should treat it — as a success response or as a failed one.
3131
- `validate?`: [_Validator_](/api/primitives/validator) allows you to dynamically validate received data.
3232
- `mapData?`: optional mapper for the response data, available overloads:
33-
- `({ result, params }) => mapped`
34-
- `{ source: Store, fn: (data, { result, params }) => mapped }`
33+
34+
- `(res) => mapped`
35+
- `{ source: Store, fn: (data, res) => mapped }`
36+
37+
`res` object contains:
38+
39+
- `result`: parsed and validated response data
40+
- `params`: params which were passed to the [_Query_](/api/primitives/query)
41+
- `headers`: <Badge type="tip" text="since v0.13" /> raw response headers
3542

3643
- `concurrency?`: concurrency settings for the [_Query_](/api/primitives/query)
3744
::: danger Deprecation warning

apps/website/docs/api/primitives/barrier.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ For user-land code, it is a read-only object that have the following properties:
1515
## `deactivated`
1616

1717
[_Event_](https://effector.dev/en/api/effector/event/) that will be triggered when the _Barrier_ is deactivated.
18+
19+
## `performed` <Badge type="tip" text="since v0.13" />
20+
21+
[_Event_](https://effector.dev/en/api/effector/event/) that triggers every time when all Barrier's performers are finished.
22+
23+
## `forceDeactivate` <Badge type="tip" text="since v0.13" />
24+
25+
[_Event_](https://effector.dev/en/api/effector/event/) that can be called to forcely deactivate Barrier.

0 commit comments

Comments
 (0)