Skip to content

Releases: triggerdotdev/trigger.dev

@trigger.dev/sdk@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Minor Changes

  • Added query.execute() which lets you query your Trigger.dev data using TRQL (Trigger Query Language) and returns results as typed JSON rows or CSV. It supports configurable scope (environment, project, or organization), time filtering via period or from/to ranges, and a format option for JSON or CSV output. (#3060)

    import { query } from "@trigger.dev/sdk";
    import type { QueryTable } from "@trigger.dev/sdk";
    
    // Basic untyped query
    const result = await query.execute("SELECT run_id, status FROM runs LIMIT 10");
    
    // Type-safe query using QueryTable to pick specific columns
    const typedResult = await query.execute<QueryTable<"runs", "run_id" | "status" | "triggered_at">>(
      "SELECT run_id, status, triggered_at FROM runs LIMIT 10"
    );
    typedResult.results.forEach((row) => {
      console.log(row.run_id, row.status); // Fully typed
    });
    
    // Aggregation query with inline types
    const stats = await query.execute<{ status: string; count: number }>(
      "SELECT status, COUNT(*) as count FROM runs GROUP BY status",
      { scope: "project", period: "30d" }
    );
    
    // CSV export
    const csv = await query.execute("SELECT run_id, status FROM runs", {
      format: "csv",
      period: "7d",
    });
    console.log(csv.results); // Raw CSV string

Patch Changes

  • Add maxDelay option to debounce feature. This allows setting a maximum time limit for how long a debounced run can be delayed, ensuring execution happens within a specified window even with continuous triggers. (#2984)

    await myTask.trigger(payload, {
      debounce: {
        key: "my-key",
        delay: "5s",
        maxDelay: "30m", // Execute within 30 minutes regardless of continuous triggers
      },
    });
  • Aligned the SDK's getRunIdForOptions logic with the Core package to handle semantic targets (root, parent) in root tasks. (#2874)

  • Export AnyOnStartAttemptHookFunction type to allow defining onStartAttempt hooks for individual tasks. (#2966)

  • Fixed a minor issue in the deployment command on distinguishing between local builds for the cloud vs local builds for self-hosting setups. (#3070)

  • Updated dependencies:

    • @trigger.dev/core@4.4.0

@trigger.dev/schema-to-json@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Patch Changes

  • Updated dependencies:
    • @trigger.dev/core@4.4.0

@trigger.dev/rsc@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Patch Changes

  • Updated dependencies:
    • @trigger.dev/core@4.4.0

@trigger.dev/redis-worker@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Patch Changes

  • Updated dependencies:
    • @trigger.dev/core@4.4.0

@trigger.dev/react-hooks@4.4.0

19 Feb 13:43
84a00b6

Choose a tag to compare

Patch Changes

  • Fix onComplete callback firing prematurely when the realtime stream disconnects before the run finishes. (#2929)
  • Updated dependencies:
    • @trigger.dev/core@4.4.0

@trigger.dev/python@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Patch Changes

  • Updated dependencies:
    • @trigger.dev/core@4.4.0
    • @trigger.dev/sdk@4.4.0
    • @trigger.dev/build@4.4.0

@trigger.dev/core@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Patch Changes

  • Add maxDelay option to debounce feature. This allows setting a maximum time limit for how long a debounced run can be delayed, ensuring execution happens within a specified window even with continuous triggers. (#2984)

    await myTask.trigger(payload, {
      debounce: {
        key: "my-key",
        delay: "5s",
        maxDelay: "30m", // Execute within 30 minutes regardless of continuous triggers
      },
    });
  • Fixed a minor issue in the deployment command on distinguishing between local builds for the cloud vs local builds for self-hosting setups. (#3070)

  • fix: vendor superjson to fix ESM/CJS compatibility (#2949)

    Bundle superjson during build to avoid ERR_REQUIRE_ESM errors on Node.js versions that don't support require(ESM) by default (< 22.12.0) and AWS Lambda which intentionally disables it.

  • Add Vercel integration support to API schemas: commitSHA and integrationDeployments on deployment responses, and source field for environment variable imports. (#2994)

@trigger.dev/build@4.4.0

19 Feb 13:44
84a00b6

Choose a tag to compare

Patch Changes

  • Updated dependencies:
    • @trigger.dev/core@4.4.0

trigger.dev@4.3.3

23 Jan 18:00
700fe91

Choose a tag to compare

Patch Changes

  • Updated dependencies:
    • @trigger.dev/core@4.3.3
    • @trigger.dev/build@4.3.3
    • @trigger.dev/schema-to-json@4.3.3

@trigger.dev/sdk@4.3.3

23 Jan 18:00
700fe91

Choose a tag to compare

Patch Changes

  • Add support for AI SDK v6 (Vercel AI SDK) (#2919)

    • Updated peer dependency to allow ai@^6.0.0 alongside v4 and v5
    • Updated internal code to handle async validation from AI SDK v6's Schema type
  • Expose user-provided idempotency key and scope in task context. ctx.run.idempotencyKey now returns the original key passed to idempotencyKeys.create() instead of the hash, and ctx.run.idempotencyKeyScope shows the scope ("run", "attempt", or "global"). (#2903)

  • Updated dependencies:

    • @trigger.dev/core@4.3.3