@trigger.dev/sdk
4.8.8 · 20 Nov 2026MIT1.7M / weekRepositoryHomepagenpmAtom feed
180 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 4.x · latest line
4.2.0
5 Dec 2025cli: Upgrade bun deployments to v1.3.3
otel: Exported logs and spans will now have matching trace IDs
The
--force-local-buildflag is now renamed to just--local-build
Minor Changes
cli: Upgrade bun deployments to v1.3.3
Patch Changes
otel: Exported logs and spans will now have matching trace IDs
The
--force-local-buildflag is now renamed to just--local-buildcli: Header will always print the correct profile
Add ability to set custom resource properties through trigger.config.ts or via the OTEL_RESOURCE_ATTRIBUTES env var
cli: Implements content-addressable store for the dev CLI build outputs, reducing disk usage
Added support for native build server builds in the deploy command (
--native-build-server)
4.1.1 – 4.1.22 releases that only update dependencies@trigger.dev/core 4.1.2Show each
- 4.1.224 Nov 2025@trigger.dev/core 4.1.2
- 4.1.119 Nov 2025@trigger.dev/core 4.1.1
4.1.0
14 Nov 2025Realtime streams v2
Prevent uncaught errors in the
onSuccess,onComplete, andonFailurelifecycle hooks from failing attempts/runs.Deprecated the
onStartlifecycle hook (which only fires before therunfunction on the first attempt). Replaced withonStartAttemptthat fires before the run function on every attempt:export const taskWithOnStartAttempt = task({ id: "task-with-on-start-attempt", onStartAttempt: async ({ payload, ctx }) => { //... }, run: async (payload: any, { ctx }) => { //... }, }); // Default a global lifecycle hook using tasks tasks.onStartAttempt(({ ctx, payload, task }) => { console.log( `Run ${ctx.run.id} started on task ${task} attempt ${ctx.run.attempt.number}`, ctx.run ); });If you want to execute code before just the first attempt, you can use the
onStartAttemptfunction and checkctx.run.attempt.number === 1:export const taskWithOnStartAttempt = task({ id: "task-with-on-start-attempt", onStartAttempt: async ({ payload, ctx }) => { if (ctx.run.attempt.number === 1) { console.log("Run started on attempt 1", ctx.run); } }, });
Minor Changes
Realtime streams v2
Prevent uncaught errors in the
onSuccess,onComplete, andonFailurelifecycle hooks from failing attempts/runs.Deprecated the
onStartlifecycle hook (which only fires before therunfunction on the first attempt). Replaced withonStartAttemptthat fires before the run function on every attempt:export const taskWithOnStartAttempt = task({ id: "task-with-on-start-attempt", onStartAttempt: async ({ payload, ctx }) => { //... }, run: async (payload: any, { ctx }) => { //... }, }); // Default a global lifecycle hook using tasks tasks.onStartAttempt(({ ctx, payload, task }) => { console.log( `Run ${ctx.run.id} started on task ${task} attempt ${ctx.run.attempt.number}`, ctx.run ); });If you want to execute code before just the first attempt, you can use the
onStartAttemptfunction and checkctx.run.attempt.number === 1:export const taskWithOnStartAttempt = task({ id: "task-with-on-start-attempt", onStartAttempt: async ({ payload, ctx }) => { if (ctx.run.attempt.number === 1) { console.log("Run started on attempt 1", ctx.run); } }, });
4.0.4 – 4.0.74 releases that only update dependencies@trigger.dev/core 4.0.7Show each
- 4.0.711 Nov 2025@trigger.dev/core 4.0.7
- 4.0.63 Nov 2025@trigger.dev/core 4.0.6
- 4.0.528 Oct 2025@trigger.dev/core 4.0.5
- 4.0.418 Sep 2025@trigger.dev/core 4.0.4
4.0.3
18 Sep 2025Added the heartbeats.yield utility to allow tasks that do continuous CPU-heavy work to heartbeat and continue running
Patch Changes
Added the heartbeats.yield utility to allow tasks that do continuous CPU-heavy work to heartbeat and continue running
4.0.1 – 4.0.22 releases that only update dependencies@trigger.dev/core 4.0.2Show each
- 4.0.229 Aug 2025@trigger.dev/core 4.0.2
- 4.0.121 Aug 2025@trigger.dev/core 4.0.1
4.0.0
18 Aug 2025- Breaking
Trigger.dev v4 release. Please see our upgrade to v4 docs to view the full changelog: trigger.dev/docs/upgrade-to-v4
- Deprecated
Deprecate toolTask and replace with
ai.tool(mySchemaTask) - Removed
Removes the
releaseConcurrencyOnWaitpointoption on queues and thereleaseConcurrencyoption on various wait functions. Replaced with the following default behavior:Additionally, environment concurrency limits now have a new "Burst Factor", defaulting to 2.0x. The "Burst Factor" allows the environment-wide concurrency limit to be higher than any individual queue's concurrency limit. For example, if you have an environment concurrency limit of 100, and a Burst Factor of 2.0x, then you can execute up to 200 runs concurrently, but any one task/queue can still only execute 100 runs concurrently.
We've done some work cleaning up the run statuses. The new statuses are:
We've removed the following statuses:
We've also added "boolean" helpers to runs returned via the API and from Realtime:
This change adds the ability to easily detect which runs are being counted against your concurrency limit by filtering for both
EXECUTINGorDEQUEUED.
Major Changes
- Breaking
Trigger.dev v4 release. Please see our upgrade to v4 docs to view the full changelog: trigger.dev/docs/upgrade-to-v4
Patch Changes
Importing from runEngine/index.js breaks non-node runtimes
Run Engine 2.0 (alpha)
Logging large objects is now much more performant and uses less memory
New internal idempotency implementation for trigger and batch trigger to prevent request retries from duplicating work
When you create a Waitpoint token using
wait.createToken()you get a URL back that can be used to complete it by making an HTTP POST request.Support AI SDK 5.0.
ai.toolnow accepts either a schemaTask or a task with a provided jsonSchemaExternal Trace Correlation & OpenTelemetry Package Updates.
Package Previous Version New Version Change Type @opentelemetry/api1.9.0 1.9.0 No change (stable API) @opentelemetry/api-logs0.52.1 0.203.0 Major update @opentelemetry/core- 2.0.1 New dependency @opentelemetry/exporter-logs-otlp-http0.52.1 0.203.0 Major update @opentelemetry/exporter-trace-otlp-http0.52.1 0.203.0 Major update @opentelemetry/instrumentation0.52.1 0.203.0 Major update @opentelemetry/instrumentation-fetch0.52.1 0.203.0 Major update @opentelemetry/resources1.25.1 2.0.1 Major update @opentelemetry/sdk-logs0.52.1 0.203.0 Major update @opentelemetry/sdk-node0.52.1 - Removed (functionality consolidated) @opentelemetry/sdk-trace-base1.25.1 2.0.1 Major update @opentelemetry/sdk-trace-node1.25.1 2.0.1 Major update @opentelemetry/semantic-conventions1.25.1 1.36.0 Minor update
External trace correlation and propagation
We will now correlate your external traces with trigger.dev traces and logs when using our external exporters: ```ts import { defineConfig } from "@trigger.dev/sdk"; import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http"; import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http"; export default defineConfig({ project: process.env.TRIGGER_PROJECT_REF, dirs: ["./src/trigger"], telemetry: { logExporters: [ new OTLPLogExporter({ url: "https://api.axiom.co/v1/logs", headers: { Authorization: `Bearer ${process.env.AXIOM_TOKEN}`, "X-Axiom-Dataset": "test", }, }), ], exporters: [ new OTLPTraceExporter({ url: "https://api.axiom.co/v1/traces", headers: { Authorization: `Bearer ${process.env.AXIOM_TOKEN}`, "X-Axiom-Dataset": "test", }, }), ], }, maxDuration: 3600, }); ``` You can also now propagate your external trace context when calling back into your own backend infra from inside a trigger.dev task: ```ts import { otel, task } from "@trigger.dev/sdk"; import { context, propagation } from "@opentelemetry/api"; async function callNextjsApp() { return await otel.withExternalTrace(async () => { const headersObject = {}; // Now context.active() refers to your external trace context propagation.inject(context.active(), headersObject); const result = await fetch("http://localhost:3000/api/demo-call-from-trigger", { headers: new Headers(headersObject), method: "POST", body: JSON.stringify({ message: "Hello from Trigger.dev", }), }); return result.json(); }); } export const myTask = task({ id: "my-task", run: async (payload: any) => { await callNextjsApp(); }, }); ```Add jsonSchema support when indexing tasks
Fixed an issue with realtime streams that timeout and resume streaming dropping chunks
Added and cleaned up the run ctx param:
New optional properties
ctx.run.parentTaskRunIdandctx.run.rootTaskRunIdreference the current run's root/parent ID.Removed deprecated properties from
ctxAdded a new
ctx.deploymentobject that contains information about the deployment associated with the run.
We also update
metadata.rootandmetadata.parentto work even when the run is a "root" run (meaning it doesn't have a parent or a root associated run). This now works:metadata.root.set("foo", "bar"); metadata.parent.set("baz", 1); metadata.current().foo; // "bar" metadata.current().baz; // 1The envvars.list() and retrieve() functions receive isSecret for each value. Secret values are always redacted.
Fix issue where realtime streams would cut off after 5 minutes
- Deprecated
Deprecate toolTask and replace with
ai.tool(mySchemaTask) Display clickable links in Cursor terminal
- Removed
Removes the
releaseConcurrencyOnWaitpointoption on queues and thereleaseConcurrencyoption on various wait functions. Replaced with the following default behavior:Concurrency is never released when a run is first blocked via a waitpoint, at either the env or queue level.
Concurrency is always released when a run is checkpointed and shutdown, at both the env and queue level.
Additionally, environment concurrency limits now have a new "Burst Factor", defaulting to 2.0x. The "Burst Factor" allows the environment-wide concurrency limit to be higher than any individual queue's concurrency limit. For example, if you have an environment concurrency limit of 100, and a Burst Factor of 2.0x, then you can execute up to 200 runs concurrently, but any one task/queue can still only execute 100 runs concurrently.
We've done some work cleaning up the run statuses. The new statuses are:
PENDING_VERSION: Task is waiting for a version update because it cannot execute without additional information (task, queue, etc.)QUEUED: Task is waiting to be executed by a workerDEQUEUED: Task has been dequeued and is being sent to a worker to start executing.EXECUTING: Task is currently being executed by a workerWAITING: Task has been paused by the system, and will be resumed by the systemCOMPLETED: Task has been completed successfullyCANCELED: Task has been canceled by the userFAILED: Task has failed to complete, due to an error in the systemCRASHED: Task has crashed and won't be retried, most likely the worker ran out of resources, e.g. memory or storageSYSTEM_FAILURE: Task has failed to complete, due to an error in the systemDELAYED: Task has been scheduled to run at a specific timeEXPIRED: Task has expired and won't be executedTIMED_OUT: Task has reached it's maxDuration and has been stopped
We've removed the following statuses:
WAITING_FOR_DEPLOY: This is no longer used, and is replaced byPENDING_VERSIONFROZEN: This is no longer used, and is replaced byWAITINGINTERRUPTED: This is no longer usedREATTEMPTING: This is no longer used, and is replaced byEXECUTING
We've also added "boolean" helpers to runs returned via the API and from Realtime:
isQueued: Returns true when the status isQUEUED,PENDING_VERSION, orDELAYEDisExecuting: Returns true when the status isEXECUTING,DEQUEUED. These count against your concurrency limits.isWaiting: Returns true when the status isWAITING. These do not count against your concurrency limits.isCompleted: Returns true when the status is any of the completed statuses.isCanceled: Returns true when the status isCANCELEDisFailed: Returns true when the status is any of the failed statuses.isSuccess: Returns true when the status isCOMPLETED
This change adds the ability to easily detect which runs are being counted against your concurrency limit by filtering for both
EXECUTINGorDEQUEUED. Add onCancel lifecycle hook
Provide realtime skipColumns option via untamperable public access tokens
Removed triggerAndPoll. It was never recommended so it's been removed.
Improve metadata flushing efficiency by collapsing operations
Upgrade to zod 3.25.76
Specify a region override when triggering a run
Added runs.list filtering for queue and machine
Maintain proper context in metadata.root and parent getters
v4: New lifecycle hooks
- 3.x
3.3.17
4 Mar 2025Add support for two-phase deployments and task version pinning
Patch Changes
Add support for two-phase deployments and task version pinning
3.3.16
13 Feb 2025You can add Alerts in the dashboard. One of these is a webhook, which this change greatly improves.
The main change is that there's now an SDK function to verify and parse them (similar to Stripe SDK).
const event = await webhooks.constructEvent(request, process.env.ALERT_WEBHOOK_SECRET!);
If the signature you provide matches the one from the dashboard when you create the webhook, you will get a nicely typed object back for these three types:
Patch Changes
You can add Alerts in the dashboard. One of these is a webhook, which this change greatly improves.
The main change is that there's now an SDK function to verify and parse them (similar to Stripe SDK).
const event = await webhooks.constructEvent(request, process.env.ALERT_WEBHOOK_SECRET!);
If the signature you provide matches the one from the dashboard when you create the webhook, you will get a nicely typed object back for these three types:
"alert.run.failed"
"alert.deployment.success"
"alert.deployment.failed"
3.3.15
12 Feb 2025Detect ffmpeg OOM errors, added manual OutOfMemoryError
Patch Changes
Detect ffmpeg OOM errors, added manual OutOfMemoryError
3.3.14
11 Feb 2025Added the ability to retry runs that fail with an Out Of Memory (OOM) error on a larger machine.
Patch Changes
Added the ability to retry runs that fail with an Out Of Memory (OOM) error on a larger machine.
3.3.13
4 Feb 2025Fixed issue with asResponse and withResponse not working on runs.retrieve
Patch Changes
Fixed issue with asResponse and withResponse not working on runs.retrieve
3.3.12
24 Jan 2025Only updates a dependency:@trigger.dev/core 3.3.12
3.3.11
17 Jan 2025Add support for specifying machine preset at trigger time. Works with any trigger function:
// Same as usual, will use the machine preset on childTask, defaults to "small-1x" await childTask.trigger({ message: "Hello, world!" }); // This will override the task's machine preset and any defaults. Works with all trigger functions. await childTask.trigger({ message: "Hello, world!" }, { machine: "small-2x" }); await childTask.triggerAndWait({ message: "Hello, world!" }, { machine: "small-2x" }); await childTask.batchTrigger([ { payload: { message: "Hello, world!" }, options: { machine: "micro" } }, { payload: { message: "Hello, world!" }, options: { machine: "large-1x" } }, ]); await childTask.batchTriggerAndWait([ { payload: { message: "Hello, world!" }, options: { machine: "micro" } }, { payload: { message: "Hello, world!" }, options: { machine: "large-1x" } }, ]); await tasks.trigger<typeof childTask>( "child", { message: "Hello, world!" }, { machine: "small-2x" } ); await tasks.batchTrigger<typeof childTask>("child", [ { payload: { message: "Hello, world!" }, options: { machine: "micro" } }, { payload: { message: "Hello, world!" }, options: { machine: "large-1x" } }, ]);
Patch Changes
Add support for specifying machine preset at trigger time. Works with any trigger function:
// Same as usual, will use the machine preset on childTask, defaults to "small-1x" await childTask.trigger({ message: "Hello, world!" }); // This will override the task's machine preset and any defaults. Works with all trigger functions. await childTask.trigger({ message: "Hello, world!" }, { machine: "small-2x" }); await childTask.triggerAndWait({ message: "Hello, world!" }, { machine: "small-2x" }); await childTask.batchTrigger([ { payload: { message: "Hello, world!" }, options: { machine: "micro" } }, { payload: { message: "Hello, world!" }, options: { machine: "large-1x" } }, ]); await childTask.batchTriggerAndWait([ { payload: { message: "Hello, world!" }, options: { machine: "micro" } }, { payload: { message: "Hello, world!" }, options: { machine: "large-1x" } }, ]); await tasks.trigger<typeof childTask>( "child", { message: "Hello, world!" }, { machine: "small-2x" } ); await tasks.batchTrigger<typeof childTask>("child", [ { payload: { message: "Hello, world!" }, options: { machine: "micro" } }, { payload: { message: "Hello, world!" }, options: { machine: "large-1x" } }, ]);
3.3.10
10 Jan 2025Only updates a dependency:@trigger.dev/core 3.3.10
3.3.9
9 Jan 2025Adding ability to update parent run metadata from child runs/tasks
Patch Changes
Adding ability to update parent run metadata from child runs/tasks
3.3.8
8 Jan 2025Only updates a dependency:@trigger.dev/core 3.3.8
3.3.7
13 Dec 2024Fixes an issue in streams where "chunks" could get split across multiple reads
Patch Changes
Fixes an issue in streams where "chunks" could get split across multiple reads
Fixed stopping the run subscription after a run is finished, when using useRealtimeRun or useRealtimeRunWithStreams
Added an
onCompletecallback touseRealtimeRunanduseRealtimeRunWithStreamsOptimized the run subscription to reduce unnecessary updates
3.3.6
10 Dec 2024Realtime streams now powered by electric. Also, this change fixes a realtime bug that was causing too many re-renders, even on records that didn't change
Add option to trigger batched items sequentially, and default to parallel triggering which is faster
Patch Changes
Realtime streams now powered by electric. Also, this change fixes a realtime bug that was causing too many re-renders, even on records that didn't change
Add option to trigger batched items sequentially, and default to parallel triggering which is faster
3.3.3 – 3.3.53 releases that only update dependencies@trigger.dev/core 3.3.5Show each
- 3.3.53 Dec 2024@trigger.dev/core 3.3.5
- 3.3.43 Dec 2024@trigger.dev/core 3.3.4
- 3.3.32 Dec 2024@trigger.dev/core 3.3.3
3.3.2
2 Dec 2024Add one-time use public tokens to trigger and batch trigger
Fix for waiting for realtime streams to finish
Patch Changes
Add one-time use public tokens to trigger and batch trigger
Fix for waiting for realtime streams to finish
3.3.1
29 Nov 2024Fixed the missing icons in trigger spans
Public access token scopes with just tags or just a batch can now access runs that have those tags or are in the batch. Previously, the only way to access a run was to have a specific scope for that exact run.
Patch Changes
Fixed the missing icons in trigger spans
Public access token scopes with just tags or just a batch can now access runs that have those tags or are in the batch. Previously, the only way to access a run was to have a specific scope for that exact run.
3.3.0
28 Nov 2024Improved Batch Triggering:
await myTask.batchTrigger([{ payload: { foo: "bar" } }], { idempotencyKey: "my-key", idempotencyKeyTTL: "60s", }); // Works for individual items as well: await myTask.batchTrigger([ { payload: { foo: "bar" }, options: { idempotencyKey: "my-key", idempotencyKeyTTL: "60s" } }, ]); // And `trigger`: await myTask.trigger({ foo: "bar" }, { idempotencyKey: "my-key", idempotencyKeyTTL: "60s" });Added new batch.trigger and batch.triggerByTask methods that allows triggering multiple different tasks in a single batch:
import { batch } from "@trigger.dev/sdk/v3"; import type { myTask1, myTask2 } from "./trigger/tasks"; // Somewhere in your backend code const response = await batch.trigger<typeof myTask1 | typeof myTask2>([ { id: "task1", payload: { foo: "bar" } }, { id: "task2", payload: { baz: "qux" } }, ]); for (const run of response.runs) { if (run.ok) { console.log(run.output); } else { console.error(run.error); } }Or if you are inside of a task, you can use
triggerByTask:import { batch, task, runs } from "@trigger.dev/sdk/v3"; export const myParentTask = task({ id: "myParentTask", run: async () => { const response = await batch.triggerByTask([ { task: myTask1, payload: { foo: "bar" } }, { task: myTask2, payload: { baz: "qux" } }, ]); const run1 = await runs.retrieve(response.runs[0]); console.log(run1.output); // typed as { foo: string } const run2 = await runs.retrieve(response.runs[1]); console.log(run2.output); // typed as { baz: string } const response2 = await batch.triggerByTaskAndWait([ { task: myTask1, payload: { foo: "bar" } }, { task: myTask2, payload: { baz: "qux" } }, ]); if (response2.runs[0].ok) { console.log(response2.runs[0].output); // typed as { foo: string } } if (response2.runs[1].ok) { console.log(response2.runs[1].output); // typed as { baz: string } } }, }); export const myTask1 = task({ id: "myTask1", run: async () => { return { foo: "bar", }; }, }); export const myTask2 = task({ id: "myTask2", run: async () => { return { baz: "qux", }; }, });Added ability to subscribe to a batch of runs using runs.subscribeToBatch
Minor Changes
Improved Batch Triggering:
The new Batch Trigger endpoint is now asynchronous and supports up to 500 runs per request.
The new endpoint also supports triggering multiple different tasks in a single batch request (support in the SDK coming soon).
The existing
batchTriggermethod now supports the new endpoint, and shouldn't require any changes to your code.Idempotency keys now expire after 24 hours, and you can customize the expiration time when creating a new key by using the
idempotencyKeyTTLparameter:
await myTask.batchTrigger([{ payload: { foo: "bar" } }], { idempotencyKey: "my-key", idempotencyKeyTTL: "60s", }); // Works for individual items as well: await myTask.batchTrigger([ { payload: { foo: "bar" }, options: { idempotencyKey: "my-key", idempotencyKeyTTL: "60s" } }, ]); // And `trigger`: await myTask.trigger({ foo: "bar" }, { idempotencyKey: "my-key", idempotencyKeyTTL: "60s" });
Breaking Changes
- We've removed the `idempotencyKey` option from `triggerAndWait` and `batchTriggerAndWait`, because it can lead to permanently frozen runs in deployed tasks. We're working on upgrading our entire system to support idempotency keys on these methods, and we'll re-add the option once that's complete.
Patch Changes
Added new batch.trigger and batch.triggerByTask methods that allows triggering multiple different tasks in a single batch:
import { batch } from "@trigger.dev/sdk/v3"; import type { myTask1, myTask2 } from "./trigger/tasks"; // Somewhere in your backend code const response = await batch.trigger<typeof myTask1 | typeof myTask2>([ { id: "task1", payload: { foo: "bar" } }, { id: "task2", payload: { baz: "qux" } }, ]); for (const run of response.runs) { if (run.ok) { console.log(run.output); } else { console.error(run.error); } }Or if you are inside of a task, you can use
triggerByTask:import { batch, task, runs } from "@trigger.dev/sdk/v3"; export const myParentTask = task({ id: "myParentTask", run: async () => { const response = await batch.triggerByTask([ { task: myTask1, payload: { foo: "bar" } }, { task: myTask2, payload: { baz: "qux" } }, ]); const run1 = await runs.retrieve(response.runs[0]); console.log(run1.output); // typed as { foo: string } const run2 = await runs.retrieve(response.runs[1]); console.log(run2.output); // typed as { baz: string } const response2 = await batch.triggerByTaskAndWait([ { task: myTask1, payload: { foo: "bar" } }, { task: myTask2, payload: { baz: "qux" } }, ]); if (response2.runs[0].ok) { console.log(response2.runs[0].output); // typed as { foo: string } } if (response2.runs[1].ok) { console.log(response2.runs[1].output); // typed as { baz: string } } }, }); export const myTask1 = task({ id: "myTask1", run: async () => { return { foo: "bar", }; }, }); export const myTask2 = task({ id: "myTask2", run: async () => { return { baz: "qux", }; }, });Added ability to subscribe to a batch of runs using runs.subscribeToBatch
3.2.2
27 Nov 2024Only updates a dependency:@trigger.dev/core 3.2.2
3.2.1
20 Nov 2024React hooks now all accept accessToken and baseURL options so the use of the Provider is no longer necessary
Upgrade zod to latest (3.23.8)
Realtime streams
Patch Changes
React hooks now all accept accessToken and baseURL options so the use of the Provider is no longer necessary
Upgrade zod to latest (3.23.8)
Realtime streams
3.1.2 – 3.2.02 releases that only update dependencies@trigger.dev/core 3.2.0Show each
- 3.2.015 Nov 2024@trigger.dev/core 3.2.0
- 3.1.25 Nov 2024@trigger.dev/core 3.1.2
3.1.1
1 Nov 2024- Removed
Remove browser export condition - not necessary with the react-hooks package that uses core
Patch Changes
- Removed
Remove browser export condition - not necessary with the react-hooks package that uses core
3.1.0
29 Oct 2024Access run status updates in realtime, from your server or from your frontend
Minor Changes
Access run status updates in realtime, from your server or from your frontend
3.0.13
18 Oct 2024README updates
Patch Changes
README updates
3.0.11 – 3.0.122 releases that only update dependencies@trigger.dev/core 3.0.12Show each
- 3.0.129 Oct 2024@trigger.dev/core 3.0.12
- 3.0.118 Oct 2024@trigger.dev/core 3.0.11
3.0.10
4 Oct 2024Adding maxDuration to tasks to allow timing out runs after they exceed a certain number of seconds
Patch Changes
Adding maxDuration to tasks to allow timing out runs after they exceed a certain number of seconds
3.0.9
30 Sep 2024Removed the inline-code accessory from the logs when calling trigger or batchTrigger from a run
Patch Changes
Removed the inline-code accessory from the logs when calling trigger or batchTrigger from a run
3.0.8
26 Sep 2024Add Run metadata to allow for storing up to 4KB of data on a run and update it during the run
Patch Changes
Add Run metadata to allow for storing up to 4KB of data on a run and update it during the run
3.0.7
24 Sep 2024Only updates a dependency:@trigger.dev/core 3.0.7
3.0.6
20 Sep 2024Runs.retrieve() now includes details about related runs (root, parent, and children) as well how how the runs were triggered and if they are in a batch
Patch Changes
Runs.retrieve() now includes details about related runs (root, parent, and children) as well how how the runs were triggered and if they are in a batch
3.0.5
18 Sep 2024Only updates a dependency:@trigger.dev/core 3.0.5
3.0.4
18 Sep 2024Auto-resolve payload/output presigned urls when retrieving a run with runs.retrieve
Patch Changes
Auto-resolve payload/output presigned urls when retrieving a run with runs.retrieve
3.0.2 – 3.0.32 releases that only update dependencies@trigger.dev/core 3.0.3Show each
- 3.0.318 Sep 2024@trigger.dev/core 3.0.3
- 3.0.217 Sep 2024@trigger.dev/core 3.0.2
3.0.1
16 Sep 2024Fixing false-positive package version mismatches
Patch Changes
Fixing false-positive package version mismatches
3.0.0
16 Sep 2024- Breaking
Updates to support Trigger.dev v3
Add machine config and secure zod connection
Implement task.onSuccess/onFailure and config.onSuccess/onFailure
Major Changes
- Breaking
Release 3.0.0
- Breaking
Updates to support Trigger.dev v3
Patch Changes
Add machine config and secure zod connection
Implement task.onSuccess/onFailure and config.onSuccess/onFailure
Configurable log levels in the config file and via env var
Fixes for continuing after waits
New Build System
Fix trigger functions for custom queues
v3: Environment variable management API and SDK, along with resolveEnvVars CLI hook
Fix return type of runs.retrieve, and allow passing the type of the task to runs.retrieve
Make msw a normal dependency (for now) to fix Module Not Found error in Next.js.
It turns out that webpack will "hoist" dynamically imported modules and attempt to resolve them at build time, even though it's an optional peer dep:
Add runs.retrieve management API method to get info about a run by run ID
v3: Usage tracking
Fix for calling trigger and passing a custom queue
Export queue from the SDK
Extract common trigger code into internal functions and add a tasks.batchTriggerAndWait function
v3: Recover from server rate limiting errors in a more reliable way
Rollback to try and fix some dependent attempt issues
Support self-hosters pushing to a custom registry when running deploy
v3: Trigger delayed runs and reschedule them
v3: Export AbortTaskRunError from @trigger.dev/sdk/v3
Added replayRun function to the SDK
Improve the SDK function types and expose a new APIError instead of the APIResult type
You can now add tags to runs and list runs using them
Add configure function to be able to configure the SDK manually
Use global setTimeout to ensure cross-runtime support
Fixed incorrect span timings around checkpoints by implementing a precise wall clock that resets after restores
Adding task with a triggerSource of schedule
Lock SDK and CLI deps on exact core version
Updates the
trigger,batchTriggerand their*AndWaitvariants to use the first parameter for the payload/items, and the second parameter for options.Before:
await yourTask.trigger({ payload: { foo: "bar" }, options: { idempotencyKey: "key_1234" }, }); await yourTask.triggerAndWait({ payload: { foo: "bar" }, options: { idempotencyKey: "key_1234" }, }); await yourTask.batchTrigger({ items: [{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }], }); await yourTask.batchTriggerAndWait({ items: [{ payload: { foo: "bar" } }, { payload: { foo: "baz" } }], });After:
await yourTask.trigger({ foo: "bar" }, { idempotencyKey: "key_1234" }); await yourTask.triggerAndWait({ foo: "bar" }, { idempotencyKey: "key_1234" }); await yourTask.batchTrigger([ { payload: { foo: "bar" } }, { payload: { foo: "baz" } }, ]); await yourTask.batchTriggerAndWait([ { payload: { foo: "bar" } }, { payload: { foo: "baz" } }, ]);We've also changed the API of the
triggerAndWaitresult. Before, if the subtask that was triggered finished with an error, we would automatically "rethrow" the error in the parent task.Now instead we're returning a
TaskRunResultobject that allows you to discriminate between successful and failed runs in the subtask:Before:
try { const result = await yourTask.triggerAndWait({ foo: "bar" }); // result is the output of your task console.log("result", result); } catch (error) { // handle subtask errors here }After:
const result = await yourTask.triggerAndWait({ foo: "bar" }); if (result.ok) { console.log(`Run ${result.id} succeeded with output`, result.output); } else { console.log(`Run ${result.id} failed with error`, result.error); }When using idempotency keys, triggerAndWait and batchTriggerAndWait will still work even if the existing runs have already been completed (or even partially completed, in the case of batchTriggerAndWait)
TaskRunExecutionResult.id is now the run friendlyId, not the attempt friendlyId
A single TaskRun can now have many batchItems, in the case of batchTriggerAndWait while using idempotency keys
A run’s idempotencyKey is now added to the ctx as well as the TaskEvent and displayed in the span view
When resolving batchTriggerAndWait, the runtimes no longer reject promises, leading to an error in the parent task
Move to our global system from AsyncLocalStorage for the current task context storage
Remove unimplemented batchOptions
Add triggerAndWait().unwrap() to more easily get at the output or throw the subtask error
v2: Better handle recovering from platform communication errors by auto-yielding back to the platform in case of temporary API failures
When a v2 run hits the rate limit, reschedule with the reset date
Management SDK overhaul and adding the runs.list API
v3: Adding SDK functions for triggering tasks in a typesafe way, without importing task file
Dynamically import superjson and fix some bundling issues
Added timezone support to schedules
v3: Include presigned urls for downloading large payloads and outputs when using runs.retrieve
Added declarative cron schedules
Added cancelRun to the SDK
Added a new global - Task Catalog - to better handle task metadata
Extracting out all the non-SDK related features from the main @trigger.dev/core/v3 export
Remove msw and retry.interceptFetch
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.