Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06af15c

Browse files
authored
chore: Prepare CHANGELOG for 0.14.0 release (temporalio#354)
1 parent 38b7558 commit 06af15c

File tree

1 file changed

+130
-0
lines changed

1 file changed

+130
-0
lines changed

CHANGELOG.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,136 @@ All notable changes to this project will be documented in this file.
44

55
Breaking changes marked with a :boom:
66

7+
## [0.14.0] - 2021-11-03
8+
9+
### Bug Fixes
10+
11+
- Add missing index.d.ts to published files in core-bridge package ([#347](https://github.com/temporalio/sdk-typescript/pull/347))
12+
- [`docs`] Update algolia index name ([#350](https://github.com/temporalio/sdk-typescript/pull/350))
13+
- [`core`] Update core to gain infinite poll retries ([#355](https://github.com/temporalio/sdk-typescript/pull/355))
14+
- [`worker`] Fix Worker possible hang after graceful shutdown period expires ([#356](https://github.com/temporalio/sdk-typescript/pull/356))
15+
16+
### Features
17+
18+
- :boom: [`workflow`] Rename `createActivityHandle` to `proxyActivities` ([#351](https://github.com/temporalio/sdk-typescript/pull/351))
19+
- The function's usage remains the same, only the name was changed.
20+
21+
Before:
22+
23+
```ts
24+
import { createActivityHandle } from '@temporalio/workflow';
25+
import type * as activities from './activities';
26+
27+
const { greet } = createActivityHandle<typeof activities>({
28+
startToCloseTimeout: '1 minute',
29+
});
30+
```
31+
32+
After:
33+
34+
```ts
35+
import { proxyActivities } from '@temporalio/workflow';
36+
import type * as activities from './activities';
37+
38+
const { greet } = proxyActivities<typeof activities>({
39+
startToCloseTimeout: '1 minute',
40+
});
41+
```
42+
43+
Reasoning:
44+
45+
- Clarify that the method returns a proxy
46+
- Avoid confusion with `WorkflowHandle`
47+
48+
- :boom: [`workflow`] Rename `setListener` to `setHandler` ([#352](https://github.com/temporalio/sdk-typescript/pull/352))
49+
50+
BREAKING CHANGE: The function's usage remains the same, only the name was changed.
51+
52+
Before:
53+
54+
```ts
55+
import { defineSignal, setListener, condition } from '@temporalio/workflow';
56+
import { unblockSignal } from './definitions';
57+
58+
export const unblockSignal = defineSignal('unblock');
59+
60+
export async function myWorkflow() {
61+
let isBlocked = true;
62+
setListener(unblockSignal, () => void (isBlocked = false));
63+
await condition(() => !isBlocked);
64+
}
65+
```
66+
67+
After:
68+
69+
```ts
70+
import { defineSignal, setHandler, condition } from '@temporalio/workflow';
71+
import { unblockSignal } from './definitions';
72+
73+
export const unblockSignal = defineSignal('unblock');
74+
75+
export async function myWorkflow() {
76+
let isBlocked = true;
77+
setHandler(unblockSignal, () => void (isBlocked = false));
78+
await condition(() => !isBlocked);
79+
}
80+
```
81+
82+
Reasoning:
83+
84+
- It was our go-to name initially but we decided against it when to avoid confusion with the `WorkflowHandle` concept
85+
- Handling seems more accurate about what the function is doing than listening
86+
- With listeners it sounds like you can set multiple listeners, and handler doesn't
87+
88+
- [`worker`] Add SIGUSR2 to default list of shutdown signals ([#346](https://github.com/temporalio/sdk-typescript/pull/346))
89+
- :boom: [`client`] Use failure classes for WorkflowClient errors
90+
91+
- Error handling for `WorkflowClient` and `WorkflowHandle` `execute` and `result` methods now throw
92+
`WorkflowFailedError` with the specific `TemporalFailure` as the cause.
93+
The following error classes were renamed:
94+
95+
- `WorkflowExecutionFailedError` was renamed `WorkflowFailedError`.
96+
- `WorkflowExecutionContinuedAsNewError` was renamed
97+
`WorkflowContinuedAsNewError`.
98+
99+
Before:
100+
101+
```ts
102+
try {
103+
await WorkflowClient.execute(myWorkflow, { taskQueue: 'example' });
104+
} catch (err) {
105+
if (err instanceof WorkflowExecutionFailedError && err.cause instanceof ApplicationFailure) {
106+
console.log('Workflow failed');
107+
} else if (err instanceof WorkflowExecutionTimedOutError) {
108+
console.log('Workflow timed out');
109+
} else if (err instanceof WorkflowExecutionTerminatedError) {
110+
console.log('Workflow terminated');
111+
} else if (err instanceof WorkflowExecutionCancelledError) {
112+
console.log('Workflow cancelled');
113+
}
114+
}
115+
```
116+
117+
After:
118+
119+
```ts
120+
try {
121+
await WorkflowClient.execute(myWorkflow, { taskQueue: 'example' });
122+
} catch (err) {
123+
if (err instanceof WorkflowFailedError) {
124+
) {
125+
if (err.cause instanceof ApplicationFailure) {
126+
console.log('Workflow failed');
127+
} else if (err.cause instanceof TimeoutFailure) {
128+
console.log('Workflow timed out');
129+
} else if (err.cause instanceof TerminatedFailure) {
130+
console.log('Workflow terminated');
131+
} else if (err.cause instanceof CancelledFailure) {
132+
console.log('Workflow cancelled');
133+
}
134+
}
135+
```
136+
7137
## [0.13.0] - 2021-10-29
8138
9139
### Bug Fixes

0 commit comments

Comments
 (0)