Skip to content

v0.2.0

Latest
Compare
Choose a tag to compare
@CahidArda CahidArda released this 21 Nov 09:07
b108d18

What's Changed

Features:

  • Update client.cancel to allow canceling with url and cancelling all by @CahidArda in #26
  • context.cancel to cancel the current workflow by @CahidArda in #8

Fixes:

Migration from 0.1.x to 0.2.0

If you were using the workflow client to cancel workflows by id, you should update it like:

import { Client } from "@upstash/workflow";
const client = new Client(...)
client.cancel({
- workflowRunId: "runId"
+ ids: "runId"
})

context.waitForEvent should be updated like:

await context.waitForEvent(
  "wait step",
  "eventId"
- "10s"
+ { timeout: "10s" }
)

failureFunction parameters should be updated as an object:

failureFunction: async (
-  context, failStatus, failResponse, failHeaders
+  { context, failStatus, failResponse, failHeaders }
) => { ... }

If you were importing and using the errors QStashWorkflowError or QStashWorkflowAbort, they are now renamed as WorkflowError and WorkflowAbort.

New Contributors

Full Changelog: v0.1.5...v0.2.0