Skip to content

Commit 5c3b039

Browse files
committed
Changes all references from /sdk/v3 to /sdk
1 parent 65d907f commit 5c3b039

File tree

94 files changed

+321
-321
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+321
-321
lines changed

docs/apikeys.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The default URL is `https://api.trigger.dev`.
3939
If you prefer to manually configure the SDK, you can call the `configure` method:
4040

4141
```ts
42-
import { configure } from "@trigger.dev/sdk/v3";
42+
import { configure } from "@trigger.dev/sdk";
4343
import { myTask } from "./trigger/myTasks";
4444

4545
configure({

docs/config/config-file.mdx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import NodeVersions from "/snippets/node-versions.mdx";
1111
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:
1212

1313
```ts trigger.config.ts
14-
import { defineConfig } from "@trigger.dev/sdk/v3";
14+
import { defineConfig } from "@trigger.dev/sdk";
1515

1616
export default defineConfig({
1717
// Your project ref (you can see it on the Project settings page in the dashboard)
@@ -53,7 +53,7 @@ The config file handles a lot of things, like:
5353
You can specify the directories where your tasks are located using the `dirs` option:
5454

5555
```ts trigger.config.ts
56-
import { defineConfig } from "@trigger.dev/sdk/v3";
56+
import { defineConfig } from "@trigger.dev/sdk";
5757

5858
export default defineConfig({
5959
project: "<project ref>",
@@ -66,7 +66,7 @@ If you omit the `dirs` option, we will automatically detect directories that are
6666
We will search for TypeScript and JavaScript files in the specified directories and include them in the build process. We automatically exclude files that have `.test` or `.spec` in the name, but you can customize this by specifying glob patterns in the `ignorePatterns` option:
6767

6868
```ts trigger.config.ts
69-
import { defineConfig } from "@trigger.dev/sdk/v3";
69+
import { defineConfig } from "@trigger.dev/sdk";
7070

7171
export default defineConfig({
7272
project: "<project ref>",
@@ -80,7 +80,7 @@ export default defineConfig({
8080
You can add lifecycle functions to get notified when any task starts, succeeds, or fails using `onStart`, `onSuccess` and `onFailure`:
8181

8282
```ts trigger.config.ts
83-
import { defineConfig } from "@trigger.dev/sdk/v3";
83+
import { defineConfig } from "@trigger.dev/sdk";
8484

8585
export default defineConfig({
8686
project: "<project ref>",
@@ -111,7 +111,7 @@ We use OpenTelemetry (OTEL) for our run logs. This means you get a lot of inform
111111
Here we add Prisma and OpenAI instrumentations to your `trigger.config.ts` file.
112112

113113
```ts trigger.config.ts
114-
import { defineConfig } from "@trigger.dev/sdk/v3";
114+
import { defineConfig } from "@trigger.dev/sdk";
115115
import { PrismaInstrumentation } from "@prisma/instrumentation";
116116
import { OpenAIInstrumentation } from "@traceloop/instrumentation-openai";
117117

@@ -152,7 +152,7 @@ You can also configure custom telemetry exporters to send your traces and logs t
152152
Then, configure the exporters in your `trigger.config.ts` file:
153153

154154
```ts trigger.config.ts
155-
import { defineConfig } from "@trigger.dev/sdk/v3";
155+
import { defineConfig } from "@trigger.dev/sdk";
156156
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
157157
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
158158

@@ -196,7 +196,7 @@ Make sure to set the `AXIOM_API_TOKEN` and `AXIOM_DATASET` environment variables
196196
It's important to note that you cannot configure exporters using `OTEL_*` environment variables, as they would conflict with our internal telemetry. Instead you should configure the exporters via passing in arguments to the `OTLPTraceExporter` and `OTLPLogExporter` constructors. For example, here is how you can configure exporting to Honeycomb:
197197

198198
```ts trigger.config.ts
199-
import { defineConfig } from "@trigger.dev/sdk/v3";
199+
import { defineConfig } from "@trigger.dev/sdk";
200200
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
201201
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
202202

@@ -235,7 +235,7 @@ export default defineConfig({
235235
We currently only officially support the `node` runtime, but you can try our experimental `bun` runtime by setting the `runtime` option in your config file:
236236

237237
```ts trigger.config.ts
238-
import { defineConfig } from "@trigger.dev/sdk/v3";
238+
import { defineConfig } from "@trigger.dev/sdk";
239239

240240
export default defineConfig({
241241
project: "<project ref>",
@@ -255,7 +255,7 @@ See our [Bun guide](/guides/frameworks/bun) for more information.
255255
You can specify the default machine for all tasks in your project:
256256

257257
```ts trigger.config.ts
258-
import { defineConfig } from "@trigger.dev/sdk/v3";
258+
import { defineConfig } from "@trigger.dev/sdk";
259259

260260
export default defineConfig({
261261
project: "<project ref>",
@@ -271,7 +271,7 @@ See our [machines documentation](/machines) for more information.
271271
You can set the log level for your project:
272272

273273
```ts trigger.config.ts
274-
import { defineConfig } from "@trigger.dev/sdk/v3";
274+
import { defineConfig } from "@trigger.dev/sdk";
275275

276276
export default defineConfig({
277277
project: "<project ref>",
@@ -287,7 +287,7 @@ The `logLevel` only determines which logs are sent to the Trigger.dev instance w
287287
You can set the default `maxDuration` for all tasks in your project:
288288

289289
```ts trigger.config.ts
290-
import { defineConfig } from "@trigger.dev/sdk/v3";
290+
import { defineConfig } from "@trigger.dev/sdk";
291291

292292
export default defineConfig({
293293
project: "<project ref>",
@@ -303,7 +303,7 @@ See our [maxDuration guide](/runs/max-duration) for more information.
303303
You can customize the build process using the `build` option:
304304

305305
```ts trigger.config.ts
306-
import { defineConfig } from "@trigger.dev/sdk/v3";
306+
import { defineConfig } from "@trigger.dev/sdk";
307307

308308
export default defineConfig({
309309
project: "<project ref>",
@@ -326,7 +326,7 @@ export default defineConfig({
326326
All code is bundled by default, but you can exclude some packages from the bundle using the `external` option:
327327

328328
```ts trigger.config.ts
329-
import { defineConfig } from "@trigger.dev/sdk/v3";
329+
import { defineConfig } from "@trigger.dev/sdk";
330330

331331
export default defineConfig({
332332
project: "<project ref>",
@@ -342,7 +342,7 @@ When a package is excluded from the bundle, it will be added to a dynamically ge
342342
Each entry in the external should be a package name, not necessarily the import path. For example, if you want to exclude the `ai` package, but you are importing `ai/rsc`, you should just include `ai` in the `external` array:
343343

344344
```ts trigger.config.ts
345-
import { defineConfig } from "@trigger.dev/sdk/v3";
345+
import { defineConfig } from "@trigger.dev/sdk";
346346

347347
export default defineConfig({
348348
project: "<project ref>",
@@ -363,7 +363,7 @@ export default defineConfig({
363363
You can customize the `jsx` options that are passed to `esbuild` using the `jsx` option:
364364

365365
```ts trigger.config.ts
366-
import { defineConfig } from "@trigger.dev/sdk/v3";
366+
import { defineConfig } from "@trigger.dev/sdk";
367367

368368
export default defineConfig({
369369
project: "<project ref>",
@@ -390,7 +390,7 @@ See the [esbuild JSX documentation](https://esbuild.github.io/content-types/#jsx
390390
You can add custom [import conditions](https://esbuild.github.io/api/#conditions) to your build using the `conditions` option:
391391

392392
```ts trigger.config.ts
393-
import { defineConfig } from "@trigger.dev/sdk/v3";
393+
import { defineConfig } from "@trigger.dev/sdk";
394394

395395
export default defineConfig({
396396
project: "<project ref>",

docs/config/extensions/additionalFiles.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the additionalFiles build extension to copy additional files t
77
Import the `additionalFiles` build extension and use it in your `trigger.config.ts` file:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { additionalFiles } from "@trigger.dev/build/extensions/core";
1212

1313
export default defineConfig({

docs/config/extensions/additionalPackages.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the additionalPackages build extension to include additional p
77
Import the `additionalPackages` build extension and use it in your `trigger.config.ts` file:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { additionalPackages } from "@trigger.dev/build/extensions/core";
1212

1313
export default defineConfig({
@@ -22,7 +22,7 @@ export default defineConfig({
2222
This allows you to include additional packages in the build that are not automatically included via imports. This is useful if you want to install a package that includes a CLI tool that you want to invoke in your tasks via `exec`. We will try to automatically resolve the version of the package but you can specify the version by using the `@` symbol:
2323

2424
```ts
25-
import { defineConfig } from "@trigger.dev/sdk/v3";
25+
import { defineConfig } from "@trigger.dev/sdk";
2626

2727
export default defineConfig({
2828
project: "<project ref>",

docs/config/extensions/aptGet.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the aptGet build extension to install system packages into the
77
You can install system packages into the deployed image using the `aptGet` extension:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { aptGet } from "@trigger.dev/build/extensions/core";
1212

1313
export default defineConfig({
@@ -22,7 +22,7 @@ export default defineConfig({
2222
If you want to install a specific version of a package, you can specify the version like this:
2323

2424
```ts
25-
import { defineConfig } from "@trigger.dev/sdk/v3";
25+
import { defineConfig } from "@trigger.dev/sdk";
2626

2727
export default defineConfig({
2828
project: "<project ref>",

docs/config/extensions/audioWaveform.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the audioWaveform build extension to add support for Audio Wav
77
Previously, we installed [Audio Waveform](https://github.com/bbc/audiowaveform) in the build image. That's been moved to a build extension:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { audioWaveform } from "@trigger.dev/build/extensions/audioWaveform";
1212

1313
export default defineConfig({

docs/config/extensions/custom.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Build extensions allow you to hook into the build system and customize the build
2020
Build extensions are added to your `trigger.config.ts` file, with a required `name` and optional build hook functions. Here's a simple example of a build extension that just logs a message when the build starts:
2121

2222
```ts
23-
import { defineConfig } from "@trigger.dev/sdk/v3";
23+
import { defineConfig } from "@trigger.dev/sdk";
2424

2525
export default defineConfig({
2626
project: "my-project",
@@ -45,7 +45,7 @@ You can also extract that out into a function instead of defining it inline, in
4545
</Note>
4646

4747
```ts
48-
import { defineConfig } from "@trigger.dev/sdk/v3";
48+
import { defineConfig } from "@trigger.dev/sdk";
4949
import { BuildExtension } from "@trigger.dev/build";
5050

5151
export default defineConfig({
@@ -72,7 +72,7 @@ function myExtension(): BuildExtension {
7272
This allows the extension to add additional dependencies to the list of externals for the build. This is useful for dependencies that are not included in the bundle, but are expected to be available at runtime.
7373

7474
```ts
75-
import { defineConfig } from "@trigger.dev/sdk/v3";
75+
import { defineConfig } from "@trigger.dev/sdk";
7676

7777
export default defineConfig({
7878
project: "my-project",
@@ -94,7 +94,7 @@ export default defineConfig({
9494
This hook runs before the build starts. It receives the `BuildContext` object as an argument.
9595

9696
```ts
97-
import { defineConfig } from "@trigger.dev/sdk/v3";
97+
import { defineConfig } from "@trigger.dev/sdk";
9898

9999
export default defineConfig({
100100
project: "my-project",
@@ -114,7 +114,7 @@ export default defineConfig({
114114
If you want to add an esbuild plugin, you must do so in the `onBuildStart` hook. Here's an example of adding a custom esbuild plugin:
115115

116116
```ts
117-
import { defineConfig } from "@trigger.dev/sdk/v3";
117+
import { defineConfig } from "@trigger.dev/sdk";
118118

119119
export default defineConfig({
120120
project: "my-project",
@@ -144,7 +144,7 @@ export default defineConfig({
144144
You can use the `BuildContext.target` property to determine if the build is for `dev` or `deploy`:
145145

146146
```ts
147-
import { defineConfig } from "@trigger.dev/sdk/v3";
147+
import { defineConfig } from "@trigger.dev/sdk";
148148

149149
export default defineConfig({
150150
project: "my-project",
@@ -170,7 +170,7 @@ export default defineConfig({
170170
This hook runs after the build completes. It receives the `BuildContext` object and a `BuildManifest` object as arguments. This is where you can add in one or more `BuildLayer`'s to the context.
171171

172172
```ts
173-
import { defineConfig } from "@trigger.dev/sdk/v3";
173+
import { defineConfig } from "@trigger.dev/sdk";
174174

175175
export default defineConfig({
176176
project: "my-project",

docs/config/extensions/emitDecoratorMetadata.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the emitDecoratorMetadata build extension to enable support fo
77
If you need support for the `emitDecoratorMetadata` typescript compiler option, import the `emitDecoratorMetadata` build extension and use it in your `trigger.config.ts` file:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { emitDecoratorMetadata } from "@trigger.dev/build/extensions/typescript";
1212

1313
export default defineConfig({

docs/config/extensions/esbuildPlugin.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the esbuildPlugin build extension to add existing or custom es
77
You can easily add existing or custom esbuild plugins to your build process using the `esbuildPlugin` extension:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { esbuildPlugin } from "@trigger.dev/build/extensions";
1212
import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
1313

docs/config/extensions/ffmpeg.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: "Use the ffmpeg build extension to include FFmpeg in your project"
77
You can add the `ffmpeg` build extension to your build process:
88

99
```ts
10-
import { defineConfig } from "@trigger.dev/sdk/v3";
10+
import { defineConfig } from "@trigger.dev/sdk";
1111
import { ffmpeg } from "@trigger.dev/build/extensions/core";
1212

1313
export default defineConfig({
@@ -26,7 +26,7 @@ By default, this will install the version of `ffmpeg` that is available in the D
2626
If you need FFmpeg 7.x, you can pass `{ version: "7" }` to the extension. This will install a static build of FFmpeg 7.x instead of using the Debian package:
2727

2828
```ts
29-
import { defineConfig } from "@trigger.dev/sdk/v3";
29+
import { defineConfig } from "@trigger.dev/sdk";
3030
import { ffmpeg } from "@trigger.dev/build/extensions/core";
3131

3232
export default defineConfig({

0 commit comments

Comments
 (0)