You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/upgrading-beta.mdx
+24-39Lines changed: 24 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
---
2
2
title: "Upgrade to new build system"
3
3
sidebarTitle: "Beta Upgrade"
4
-
description: "How to use the new build system preview release"
4
+
description: "How to update to 3.0.0 from the beta"
5
5
---
6
6
7
-
Based on feedback and a steady flow of issues from our previous build system, we're happy to share with you a preview release of our new build system that (hopefully) fixes most of the issues you may have faced.
7
+
The Trigger.dev packages are now at version `3.0.x` in the `latest` tag. This is our first official release of v3 under the latest tag, and we recommend anyone still using packages in the `beta` tag to upgrade to the latest version. This guide will help you upgrade your project to the latest version of Trigger.dev.
8
+
9
+
The major changes in this release are a new build system, which is more flexible and powerful than the previous build system. We've also made some changes to the `trigger.dev` CLI to improve the developer experience.
8
10
9
11
The main features of the new build sytem are:
10
12
@@ -16,26 +18,26 @@ The main features of the new build sytem are:
16
18
17
19
## Update packages
18
20
19
-
To use the new build system, you have to update to use our preview packages. Update the `@trigger.dev/sdk` package in your package.json:
21
+
To use the new build system, you have to update to use our latest packages. Update the `@trigger.dev/sdk` package in your package.json:
You will also need to update your usage of the `trigger.dev` CLI to use the preview release. If you run the CLI via `npx` you can update to the preview release like so:
27
+
You will also need to update your usage of the `trigger.dev` CLI to use the latest release. If you run the CLI via `npx` you can update to the latest release like so:
26
28
27
29
```sh
28
30
# old way
29
-
npx trigger.dev@latest dev
31
+
npx trigger.dev@3.0.0-beta.56 dev
30
32
31
-
# using the preview release
32
-
npx trigger.dev@0.0.0-prerelease-20240911144933 dev
33
+
# using the latest release
34
+
npx trigger.dev@latest dev
33
35
```
34
36
35
-
If you've added the `trigger.dev` CLI to your `devDependencies`, then you should update the version to point to the preview release:
37
+
If you've added the `trigger.dev` CLI to your `devDependencies`, then you should update the version to point to the latest release:
36
38
37
39
```json
38
-
"trigger.dev": "0.0.0-prerelease-20240911144933"
40
+
"trigger.dev": "^3.0.0",
39
41
```
40
42
41
43
Once you do that make sure you re-install your dependencies using `npm i` or the equivalent with your preferred package manager.
@@ -86,7 +88,7 @@ The `additionalFiles` option has been moved to our new build extension system.
86
88
To use build extensions, you'll need to add the `@trigger.dev/build` package to your `devDependencies`:
Now you can import the `syncEnvVars` build extension and use it in your `trigger.config.ts` file:
@@ -184,7 +186,7 @@ export default defineConfig({
184
186
We've created a build extension to support using Prisma in your Trigger.dev tasks. To use this extension, you'll need to add the `@trigger.dev/build` package to your `devDependencies`:
Then you can import the `prismaExtension` build extension and use it in your `trigger.config.ts` file, passing in the path to your Prisma schema file:
@@ -325,7 +327,7 @@ export default defineConfig({
325
327
We no longer run typechecking during the deploy command. This was causing issues with some projects, and we found that it wasn't necessary to run typechecking during the deploy command. If you want to run typechecking before deploying to Trigger.dev, you can run the `tsc` command before running the `deploy` command.
This will save the build output and print the path to the build output directory. If you face any issues with deploying, please include the build output in your issue report.
@@ -359,8 +361,8 @@ This will save the build output and print the path to the build output directory
359
361
You can now pass the path to your local `.env` file using the `--env-file` flag during `dev` and `deploy` commands:
360
362
361
363
```sh
362
-
npx trigger.dev@0.0.0-prerelease-20240911144933 dev --env-file ../../.env
@@ -397,15 +399,15 @@ Then you can start debugging your tasks code by selecting the `Trigger.dev: Dev`
397
399
You can now authenticate the `dev` command using the `TRIGGER_ACCESS_TOKEN` environment variable. Previously this was only supported in the `deploy` command.
398
400
399
401
```sh
400
-
TRIGGER_ACCESS_TOKEN=<your access token> npx trigger.dev@0.0.0-prerelease-20240911144933 dev
402
+
TRIGGER_ACCESS_TOKEN=<your access token> npx trigger.dev@latest dev
401
403
```
402
404
403
405
### Better deploy support for self-hosters
404
406
405
407
You can now specify a custom registry and namespace when deploying via a self-hosted instance of Trigger.dev:
All you have to do is create a repository in dockerhub that matches the project ref of your Trigger.dev project (e.g. `proj_rrkpdguyagvsoktglnod`)
@@ -420,20 +422,3 @@ All you have to do is create a repository in dockerhub that matches the project
420
422
421
423
- Path aliases are not yet support in your `trigger.config.ts` file. To workaround this issue you'll need to rewrite path aliases to their relative paths. (See [this](https://github.com/unjs/jiti/issues/166) and [this](https://knip.dev/reference/known-issues#path-aliases-in-config-files)) for more info.
422
424
- `*.test.ts`and `.spec.ts` files inside the trigger dirs will be bundled and could cause issues. You'll need to move these files outside of the trigger dirs to avoid this issue.
423
-
424
-
## Changelog
425
-
426
-
### Changes and fixes in `0.0.0-prerelease-20240911144933`
427
-
428
-
- Fixed an issue where empty env vars in dev runs were overriding local `.env` file values.
429
-
- Fixed an issue when importing v2 `@trigger.dev/sdk` would throw an error because of a missing package.json
430
-
- Fixed node10 moduleResolution with some types
431
-
- Added the ability to push to a custom registry when deploying to a self-hosted instance of Trigger.dev
432
-
- Fix stuck dev runs when a child run fails with a process.exit
433
-
- No longer ignoring `--project-ref` in the `deploy` command
434
-
- No longer ignoring the `--config` option in the `deploy` command
435
-
- Fixed the flushing of logs to the server when deployed.
436
-
- `emitDecoratorMetadata`build extension now works when tsconfig.json file extends another tsconfig.json file
437
-
- We now have the ability to force certain packages to be external (i.e. not be bundled), starting with `headers-generator`
438
-
- You can now call `init` with the `--javascript` flag to initialize a project with JavaScript instead of TypeScript
439
-
- Add support for Prisma TypedSQL in the prisma extension
0 commit comments