Skip to content

Commit 62b6485

Browse files
committed
rename node-22 runtime to node-test and only use node 21 for now
1 parent 4f38f20 commit 62b6485

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

packages/cli-v3/src/deploy/buildImage.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,18 +473,22 @@ export type GenerateContainerfileOptions = {
473473
entrypoint: string;
474474
};
475475

476+
const NODE_21_IMAGE =
477+
"node:21.7.3-bookworm-slim@sha256:dfc05dee209a1d7adf2ef189bd97396daad4e97c6eaa85778d6f75205ba1b0fb";
478+
479+
const NODE_TEST_IMAGE = NODE_21_IMAGE;
480+
476481
const BASE_IMAGE: Record<BuildRuntime, string> = {
477-
node: "node:21.7.3-bookworm-slim@sha256:dfc05dee209a1d7adf2ef189bd97396daad4e97c6eaa85778d6f75205ba1b0fb",
478-
"node-22":
479-
"node:22.12.0-bookworm-slim@sha256:a4b757cd491c7f0b57f57951f35f4e85b7e1ad54dbffca4cf9af0725e1650cd8",
482+
node: NODE_21_IMAGE,
483+
"node-test": NODE_TEST_IMAGE,
480484
};
481485

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

484488
export async function generateContainerfile(options: GenerateContainerfileOptions) {
485489
switch (options.runtime) {
486490
case "node":
487-
case "node-22": {
491+
case "node-test": {
488492
return await generateNodeContainerfile(options);
489493
}
490494
}

packages/core/src/v3/build/runtime.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const DEFAULT_RUNTIME = "node" satisfies BuildRuntime;
88
export function binaryForRuntime(runtime: BuildRuntime): string {
99
switch (runtime) {
1010
case "node":
11-
case "node-22":
11+
case "node-test":
1212
return "node";
1313
default:
1414
throw new Error(`Unsupported runtime ${runtime}`);
@@ -18,7 +18,7 @@ export function binaryForRuntime(runtime: BuildRuntime): string {
1818
export function execPathForRuntime(runtime: BuildRuntime): string {
1919
switch (runtime) {
2020
case "node":
21-
case "node-22":
21+
case "node-test":
2222
return process.execPath;
2323
default:
2424
throw new Error(`Unsupported runtime ${runtime}`);
@@ -37,7 +37,7 @@ export function execOptionsForRuntime(
3737
): string {
3838
switch (runtime) {
3939
case "node":
40-
case "node-22": {
40+
case "node-test": {
4141
const importEntryPoint = options.loaderEntryPoint
4242
? `--import=${pathToFileURL(options.loaderEntryPoint).href}`
4343
: undefined;

packages/core/src/v3/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export type CompatibilityFlagFeatures = {
2121

2222
export type TriggerConfig = {
2323
/**
24+
* The runtime to use for your trigger.dev tasks.
25+
*
2426
* @default "node"
2527
*/
2628
runtime?: BuildRuntime;

packages/core/src/v3/schemas/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const BuildTarget = z.enum(["dev", "deploy", "unmanaged"]);
1313

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

16-
export const BuildRuntime = z.enum(["node", "node-22"]);
16+
export const BuildRuntime = z.enum(["node", "node-test"]);
1717

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

0 commit comments

Comments
 (0)