-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(runtime): add node-24 (default) and node-26, deprecate node/node-21 #4085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.20.2 | ||
| v22.23.1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 -50Repository: 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.tsRepository: triggerdotdev/trigger.dev Length of output: 25955 Validate |
||
| pkgArgs: z.string().optional(), | ||
| gitRef: z.string().default("main"), | ||
| javascript: z.boolean().default(false), | ||
|
|
@@ -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") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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'
doneRepository: 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 -nRepository: 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 -B2Repository: triggerdotdev/trigger.dev Length of output: 21747 Pin the base images by digest. These 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": { | ||
|
|
||
There was a problem hiding this comment.
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 Node22.23.1. That makes CI logs misleading when diagnosing version-specific failures.Suggested fix
📝 Committable suggestion