Skip to content

Commit 05b6259

Browse files
committed
Adds 2 snippets to reference node.js version for v3 and v4
1 parent fda9565 commit 05b6259

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

docs/config/config-file.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ description: "This file is used to configure your project and how it's built."
66

77
import ScrapingWarning from "/snippets/web-scraping-warning.mdx";
88
import BundlePackages from "/snippets/bundle-packages.mdx";
9+
import NodeVersions from "/snippets/node-versions.mdx";
910

1011
The `trigger.config.ts` file is used to configure your Trigger.dev project. It is a TypeScript file at the root of your project that exports a default configuration object. Here's an example:
1112

@@ -245,6 +246,10 @@ export default defineConfig({
245246

246247
See our [Bun guide](/guides/frameworks/bun) for more information.
247248

249+
### Node.js versions
250+
251+
<NodeVersions />
252+
248253
## Default machine
249254

250255
You can specify the default machine for all tasks in your project:

docs/snippets/node-versions.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Trigger.dev runs your tasks on specific Node.js versions depending on the version you're using:
2+
3+
- **v3**: Uses Node.js `21.7.3`
4+
- **v4**: Uses Node.js `21.7.3` by default, or Node.js `22.12.0` if you set `runtime: "node-22"` in your `trigger.config.ts`
5+
6+
In v4, you can specify `runtime: "node-22"` to use Node.js 22 like this:
7+
8+
```ts trigger.config.ts
9+
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
11+
export default defineConfig({
12+
project: "<project ref>",
13+
// Your other config settings...
14+
runtime: "node-22", // Uses Node.js 22.12.0
15+
});
16+
```

docs/upgrade-to-v4.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@ title: "Upgrading to v4"
33
description: "What's new in v4, how to upgrade, and breaking changes."
44
---
55

6+
import NodeVersions from "/snippets/node-versions.mdx";
7+
68
## What's new in v4?
79

810
[Read our blog post](https://trigger.dev/blog/v4-beta-launch) for an overview of the new features.
911

12+
### Node.js 22 support
13+
14+
<NodeVersions />
15+
1016
### Wait tokens
1117

1218
In addition to waiting for a specific duration, or waiting for a child task to complete, you can now create and wait for a token to be completed, giving you more flexibility and the ability to wait for arbitrary conditions. For example, you can send the token to a Slack channel, and only complete the token when the user has clicked an "Approve" button.

0 commit comments

Comments
 (0)