You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`durable-functions` is the Azure Functions Durable provider for JavaScript, built on `@microsoft/durabletask-js`. You author Durable Functions apps with the familiar `app.orchestration` / `app.activity` / `app.entity` model, and the provider talks to the Durable Task backend over the Functions host's gRPC channel.
8
8
9
-
This is a new major version that supersedes the legacy [`durable-functions`](https://github.com/Azure/azure-functions-durable-js) package. New and existing (classic v3) orchestration, activity, and entity code all run on the same gRPC engine.
9
+
This package supersedes the legacy [`durable-functions`](https://github.com/Azure/azure-functions-durable-js) package. New and existing (classic v3) orchestration, activity, and entity code all run on the same gRPC engine.
10
10
11
11
## Why it is needed
12
12
@@ -20,6 +20,24 @@ This is a new major version that supersedes the legacy [`durable-functions`](htt
20
20
-**Client** — `getClient(context)` returns a `DurableFunctionsClient` for scheduling, querying, signaling, and managing instances, plus HTTP management-payload helpers (`createCheckStatusResponse`, `createHttpManagementPayload`) for durable HTTP starters.
21
21
-**Classic (v3) compatibility** — orchestrators and entities written in the legacy `context.df.*` style, `RetryOptions`, `EntityId`, and the deprecated client aliases are adapted onto the core engine.
22
22
23
+
## Migrating from durable-functions v3
24
+
25
+
This provider keeps classic `context.df.*` orchestrators and entities working, but a few surfaces
26
+
changed. See [`CHANGELOG.md`](./CHANGELOG.md) for the full list; the highlights:
27
+
28
+
-**Node.js >= 22** is required (v3 supported Node 18/20).
29
+
-**Classic contexts no longer extend `InvocationContext`** — only `df` plus replay-safe log helpers
30
+
are available (no `invocationId` / `functionName` / `extraInputs`).
31
+
-**Task result shape follows the core SDK** — use `isComplete` / `isFailed` / `getResult()` instead
32
+
of v3's `isCompleted` / `isFaulted` / `result`. `context.df.createTimer(...)` still returns a
33
+
cancelable `TimerTask` for the timeout-race pattern.
34
+
-**`client.getStatus()` may return `undefined`** and honors only `showInput` (`showHistory` /
35
+
`showHistoryOutput` are ignored); **`client.startNew()` drops the `version` option**.
36
+
-**Some v3 top-level exports were removed** — `DummyOrchestrationContext` / `DummyEntityContext`,
37
+
`DurableError` / `AggregatedError`, and `ManagedIdentityTokenSource` / `TokenSource`.
38
+
`TaskFailedError` is re-exported from the core SDK; use the core `TestOrchestrationWorker` /
39
+
`TestOrchestrationClient` for orchestration unit tests.
40
+
23
41
## Getting started
24
42
25
43
```typescript
@@ -47,4 +65,4 @@ app.http("startHello", {
47
65
48
66
## Status
49
67
50
-
This package is an early preview (`4.0.0-alpha.0`); APIs may change before the stable release.
68
+
This package is an early preview (`0.4.0`); APIs may change before the stable release.
0 commit comments