Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changesets-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-webapp-auth-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🐳 Login to DockerHub
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1

- name: 📥 Download deps
run: pnpm install --frozen-lockfile --filter trigger.dev...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-testbox-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1

- name: 📥 Download CLI deps
run: pnpm install --frozen-lockfile --filter trigger.dev...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-testbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- name: ⎔ Setup active Node 20
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
Comment on lines 69 to +72

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename the step to match the configured Node version.

The step still says Setup active Node 20, but it now installs Node 22.23.1. That makes CI logs misleading when diagnosing version-specific failures.

Suggested fix
-      - name: ⎔ Setup active Node 20
+      - name: ⎔ Setup active Node 22
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: ⎔ Setup active Node 20
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
- name: ⎔ Setup active Node 22
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22.23.1

cache: "pnpm"

- name: 🥟 Setup Bun
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# npm v11.5.1 or newer is required for OIDC support
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# npm v11.5.1 or newer is required for OIDC support
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sdk-compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [blacksmith-4vcpu-ubuntu-2404]
node: ["20.20", "22.12"]
node: ["20.20", "22.23", "24.18", "26.4"]

steps:
- name: ⬇️ Checkout repo
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🥟 Setup Bun
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 🦕 Setup Deno
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

- name: 📥 Download deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
# no cache enabled, we're not installing deps

- name: Download blob reports from GitHub Actions Artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
# no cache enabled, we're not installing deps

- name: Download blob reports from GitHub Actions Artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-webapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
cache: "pnpm"

# ..to avoid rate limits when pulling images
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- name: ⎔ Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20.20.2
node-version: 22.23.1
# no cache enabled, we're not installing deps

- name: Download blob reports from GitHub Actions Artifacts
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.20.2
v22.23.1
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ branch are tagged into a release periodically.

### Prerequisites

- [Node.js](https://nodejs.org/en) version 20.20.2
- [Node.js](https://nodejs.org/en) version 22.23.1
- [pnpm package manager](https://pnpm.io/installation) version 10.33.2
- [Docker](https://www.docker.com/get-started/)
- [protobuf](https://github.com/protocolbuffers/protobuf)
Expand All @@ -49,7 +49,7 @@ branch are tagged into a release periodically.
```
cd trigger.dev
```
3. Ensure you are on the correct version of Node.js (20.20.2). If you are using `nvm`, there is an `.nvmrc` file that will automatically select the correct version of Node.js when you navigate to the repository.
3. Ensure you are on the correct version of Node.js (22.23.1). If you are using `nvm`, there is an `.nvmrc` file that will automatically select the correct version of Node.js when you navigate to the repository.

4. Run `corepack enable` to use the correct version of pnpm (`10.33.2`) as specified in the root `package.json` file.

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_IMAGE=node:20.20.2-bookworm-slim@sha256:2cf067cfed83d5ea958367df9f966191a942351a2df77d6f0193e162b5febfc0
ARG NODE_IMAGE=node:22.23.1-bookworm-slim@sha256:813a7480f28fdadac1f7f5c824bcdad435b5bc1322a5968bbbdef8d058f9dff4

FROM golang:1.26-alpine AS goose_builder
RUN go install github.com/pressly/goose/v3/cmd/goose@v3.27.1
Expand Down
2 changes: 1 addition & 1 deletion internal-packages/clickhouse/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export class ClickhouseClient implements ClickhouseReader, ClickhouseWriter {
}

for (const row of rows) {
const rowData = row.json();
const rowData = row.json() as any[];

const hydratedRow: Record<string, any> = {};
for (let i = 0; i < req.columns.length; i++) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@manypkg/cli": "^0.19.2",
"@playwright/test": "^1.36.2",
"@trigger.dev/database": "workspace:*",
"@types/node": "20.14.14",
"@types/node": "22.20.0",
"@vitest/coverage-v8": "4.1.7",
"autoprefixer": "^10.4.12",
"oxfmt": "^0.54.0",
Expand Down Expand Up @@ -92,7 +92,7 @@
},
"overrides": {
"typescript": "5.5.4",
"@types/node": "20.14.14",
"@types/node": "22.20.0",
"react@^18": "18.3.1",
"react-dom@^18": "18.3.1",
"ai@^6": "6.0.116",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli-v3/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const InitCommandOptions = CommonCommandOptions.extend({
overrideConfig: z.boolean().default(false),
tag: z.string().default(cliVersion),
skipPackageInstall: z.boolean().default(false),
runtime: z.string().default("node"),
runtime: z.string().default("node-24"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== init.ts outline =="
ast-grep outline packages/cli-v3/src/commands/init.ts --view expanded || true

echo
echo "== search BuildRuntime / DEFAULT_RUNTIME =="
rg -n "BuildRuntime|DEFAULT_RUNTIME|runtime:" packages/cli-v3/src -S || true

echo
echo "== relevant slices from init.ts =="
sed -n '1,140p' packages/cli-v3/src/commands/init.ts
echo
sed -n '680,730p' packages/cli-v3/src/commands/init.ts

echo
echo "== any runtime schema defs nearby =="
fd -a ".*runtime.*" packages/cli-v3/src packages -t f 2>/dev/null | head -50

Repository: triggerdotdev/trigger.dev

Length of output: 11742


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== core build runtime definition =="
sed -n '1,220p' packages/core/src/v3/build/runtime.ts

echo
echo "== cli config runtime handling =="
sed -n '170,250p' packages/cli-v3/src/config.ts

echo
echo "== init template/runtime use in generated file =="
rg -n "runtime" packages/cli-v3/src/commands/init.ts packages/cli-v3/src -g '!**/*.map' -S | sed -n '1,120p'

Repository: triggerdotdev/trigger.dev

Length of output: 17619


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== search config/runtime validation schema =="
rg -n "runtime.*zod|BuildRuntime|runtime: .*z\.|z\.enum\\(|trigger.config|TriggerConfig" packages/core packages/cli-v3/src -S | sed -n '1,220p'

echo
echo "== build schema runtime type source =="
sed -n '1,220p' packages/core/src/v3/schemas/build.ts

Repository: triggerdotdev/trigger.dev

Length of output: 25955


Validate --runtime against the shared BuildRuntime schema. z.string() accepts typos, and the bad value is written into the generated trigger.config.*, leaving the scaffold unusable until edited manually.

pkgArgs: z.string().optional(),
gitRef: z.string().default("main"),
javascript: z.boolean().default(false),
Expand Down Expand Up @@ -97,8 +97,8 @@ Examples:
)
.option(
"-r, --runtime <runtime>",
"Which runtime to use for the project. Currently only supports node and bun",
"node"
"Which runtime to use for the project. Supported: node-24 (default, LTS), node-22, node-26, bun",
"node-24"
)
.option("--skip-package-install", "Skip installing the @trigger.dev/sdk package")
.option("--override-config", "Override the existing config file if it exists")
Expand Down
9 changes: 8 additions & 1 deletion packages/cli-v3/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ async function resolveConfig(
["run_engine_v2" as const].concat(config.compatibilityFlags ?? [])
);

const defaultRuntime: BuildRuntime = features.run_engine_v2 ? "node" : DEFAULT_RUNTIME;
const defaultRuntime: BuildRuntime = DEFAULT_RUNTIME;

const mergedConfig = defu(
{
Expand Down Expand Up @@ -283,6 +283,13 @@ async function autoDetectDirs(workingDir: string): Promise<string[]> {
}

function validateConfig(config: TriggerConfig, warn = true) {
if (config.runtime === "node") {
warn &&
prettyWarning(
`The "node" runtime is deprecated (it used Node.js 21 which is EOL). Please migrate to "node-24" (recommended LTS) or "node-22". Update your trigger.config.ts: runtime: "node-24"`
);
}

if (config.additionalFiles && config.additionalFiles.length > 0) {
warn &&
prettyWarning(
Expand Down
15 changes: 10 additions & 5 deletions packages/cli-v3/src/deploy/buildImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -687,19 +687,24 @@ export type GenerateContainerfileOptions = {
entrypoint: string;
};

// "node" (node-21) is deprecated. Existing configs using it will still work but
// new projects default to node-24. Remove in a future major version.
const BASE_IMAGE: Record<BuildRuntime, string> = {
bun: "imbios/bun-node:1.3.3-20-slim@sha256:59d84856a7e31eec83afedadb542f7306f672343b8b265c70d733404a6e8834b",
node: "node:21.7.3-bookworm-slim@sha256:dfc05dee209a1d7adf2ef189bd97396daad4e97c6eaa85778d6f75205ba1b0fb",
"node-22":
"node:22.16.0-bookworm-slim@sha256:048ed02c5fd52e86fda6fbd2f6a76cf0d4492fd6c6fee9e2c463ed5108da0e34",
bun: "imbios/bun-node:1.1.43-22-slim",
node: "node:22.23.1-bookworm-slim",
"node-22": "node:22.23.1-bookworm-slim",
"node-24": "node:24.18.0-bookworm-slim",
"node-26": "node:26.4.0-bookworm-slim",
};
Comment on lines 692 to 698

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify index digests for the image tags before updating BASE_IMAGE.
for image in \
  "imbios/bun-node:1.1.43-22-slim" \
  "node:22.23.1-bookworm-slim" \
  "node:24.18.0-bookworm-slim" \
  "node:26.4.0-bookworm-slim"
do
  docker buildx imagetools inspect "$image" | sed -n '1,40p'
done

Repository: triggerdotdev/trigger.dev

Length of output: 323


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="packages/cli-v3/src/deploy/buildImage.ts"

echo "== outline =="
ast-grep outline "$FILE" --view expanded | sed -n '1,220p'

echo
echo "== relevant slice =="
sed -n '650,740p' "$FILE" | cat -n

Repository: triggerdotdev/trigger.dev

Length of output: 7697


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== BuildRuntime definition =="
rg -n "type BuildRuntime|BuildRuntime" packages/cli-v3/src -g '*.ts' -A4 -B4

echo
echo "== image reference / digest usage in deploy code =="
rg -n "digest|imagetools|`@sha256`|BASE_IMAGE|FROM " packages/cli-v3/src/deploy -g '*.ts' -A3 -B3

echo
echo "== other docker image references in repo =="
rg -n ":[0-9]+\.[0-9]+\.[0-9]+|`@sha256`:|FROM " packages -g '*.ts' -g '*.md' -A2 -B2

Repository: triggerdotdev/trigger.dev

Length of output: 21747


Pin the base images by digest. These FROM references are tag-only, so upstream tag changes can silently alter rebuild inputs; use multi-platform/index digests for all variants, especially the default node-24 image.

Source: Coding guidelines


const DEFAULT_PACKAGES = ["busybox", "ca-certificates", "dumb-init", "git", "openssl"];

export async function generateContainerfile(options: GenerateContainerfileOptions) {
switch (options.runtime) {
case "node":
case "node-22": {
case "node-22":
case "node-24":
case "node-26": {
return await generateNodeContainerfile(options);
}
case "bun": {
Expand Down
10 changes: 8 additions & 2 deletions packages/core/src/v3/build/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { BuildRuntime } from "../schemas/build.js";
import { dedupFlags } from "./flags.js";
import { homedir } from "node:os";

export const DEFAULT_RUNTIME = "node" satisfies BuildRuntime;
export const DEFAULT_RUNTIME = "node-24" satisfies BuildRuntime;

export function binaryForRuntime(runtime: BuildRuntime): string {
switch (runtime) {
case "node":
case "node-22":
case "node-24":
case "node-26":
return "node";
case "bun":
return "bun";
Expand All @@ -22,6 +24,8 @@ export function execPathForRuntime(runtime: BuildRuntime): string {
switch (runtime) {
case "node":
case "node-22":
case "node-24":
case "node-26":
return process.execPath;
case "bun":
if (typeof process.env.BUN_INSTALL === "string") {
Expand Down Expand Up @@ -50,7 +54,9 @@ export function execOptionsForRuntime(
): string {
switch (runtime) {
case "node":
case "node-22": {
case "node-22":
case "node-24":
case "node-26": {
const importEntryPoint = options.loaderEntryPoint
? `--import=${pathToFileURL(options.loaderEntryPoint).href}`
: undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/v3/schemas/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const BuildTarget = z.enum(["dev", "deploy", "unmanaged"]);

export type BuildTarget = z.infer<typeof BuildTarget>;

export const BuildRuntime = z.enum(["node", "node-22", "bun"]);
export const BuildRuntime = z.enum(["node", "node-22", "node-24", "node-26", "bun"]);

export type BuildRuntime = z.infer<typeof BuildRuntime>;

Expand Down
Loading
Loading