41a486ea7e
🚀 Publish Trigger.dev Docker / typecheck (push) Failing after 0s
🚀 Publish Trigger.dev Docker / publish-webapp (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-worker (push) Has been skipped
🚀 Publish Trigger.dev Docker / publish-worker-v4 (push) Has been skipped
🚀 Publish Trigger.dev Docker / units (push) Failing after 5s
🧭 Helm Chart Release / lint-and-test (push) Has been cancelled
🧭 Helm Chart Release / release (push) Has been cancelled
## Summary
1 improvement, 1 bug fix.
## Improvements
- Fail attempts on uncaught exceptions instead of hanging to
`MAX_DURATION_EXCEEDED`. A Node `EventEmitter` (e.g. `node-redis`)
emitting `"error"` with no `.on("error", ...)` listener escalates to
`uncaughtException`, which the worker previously reported but did not
act on — runs drifted to maxDuration with empty attempts. They now fail
fast with the original error and status `FAILED`, and respect the task's
normal retry policy. You should still attach `.on("error", ...)`
listeners to long-lived clients to handle errors gracefully.
([#3529](https://github.com/triggerdotdev/trigger.dev/pull/3529))
## Bug fixes
- Fix dev workers spinning at 100% CPU after the parent CLI disconnects.
Orphaned `trigger-dev-run-worker` (and indexer) processes were caught in
an `uncaughtException` feedback loop: a periodic IPC send via
`process.send` would throw `ERR_IPC_CHANNEL_CLOSED` once the parent
closed the channel, which re-entered the same handler that itself called
`process.send`, scheduled via `setImmediate` and amplified by
source-map-support's `prepareStackTrace`. Fixed by (1) silently dropping
packets in `ZodIpcConnection` when the channel is disconnected, (2)
adding a `process.on("disconnect", ...)` handler in dev workers so they
exit cleanly when the CLI closes the IPC channel, and (3) wrapping all
`uncaughtException`-path `process.send` calls in a `safeSend` guard that
checks `process.connected` and swallows synchronous throws.
([#3491](https://github.com/triggerdotdev/trigger.dev/pull/3491))
<details>
<summary>Raw changeset output</summary>
# Releases
## @trigger.dev/build@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
## trigger.dev@4.4.6
### Patch Changes
- Fix dev workers spinning at 100% CPU after the parent CLI disconnects.
Orphaned `trigger-dev-run-worker` (and indexer) processes were caught in
an `uncaughtException` feedback loop: a periodic IPC send via
`process.send` would throw `ERR_IPC_CHANNEL_CLOSED` once the parent
closed the channel, which re-entered the same handler that itself called
`process.send`, scheduled via `setImmediate` and amplified by
source-map-support's `prepareStackTrace`. Fixed by (1) silently dropping
packets in `ZodIpcConnection` when the channel is disconnected, (2)
adding a `process.on("disconnect", ...)` handler in dev workers so they
exit cleanly when the CLI closes the IPC channel, and (3) wrapping all
`uncaughtException`-path `process.send` calls in a `safeSend` guard that
checks `process.connected` and swallows synchronous throws.
([#3491](https://github.com/triggerdotdev/trigger.dev/pull/3491))
- Fail attempts on uncaught exceptions instead of hanging to
`MAX_DURATION_EXCEEDED`. A Node `EventEmitter` (e.g. `node-redis`)
emitting `"error"` with no `.on("error", ...)` listener escalates to
`uncaughtException`, which the worker previously reported but did not
act on — runs drifted to maxDuration with empty attempts. They now fail
fast with the original error and status `FAILED`, and respect the task's
normal retry policy. You should still attach `.on("error", ...)`
listeners to long-lived clients to handle errors gracefully.
([#3529](https://github.com/triggerdotdev/trigger.dev/pull/3529))
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
- `@trigger.dev/build@4.4.6`
- `@trigger.dev/schema-to-json@4.4.6`
## @trigger.dev/core@4.4.6
### Patch Changes
- Fix dev workers spinning at 100% CPU after the parent CLI disconnects.
Orphaned `trigger-dev-run-worker` (and indexer) processes were caught in
an `uncaughtException` feedback loop: a periodic IPC send via
`process.send` would throw `ERR_IPC_CHANNEL_CLOSED` once the parent
closed the channel, which re-entered the same handler that itself called
`process.send`, scheduled via `setImmediate` and amplified by
source-map-support's `prepareStackTrace`. Fixed by (1) silently dropping
packets in `ZodIpcConnection` when the channel is disconnected, (2)
adding a `process.on("disconnect", ...)` handler in dev workers so they
exit cleanly when the CLI closes the IPC channel, and (3) wrapping all
`uncaughtException`-path `process.send` calls in a `safeSend` guard that
checks `process.connected` and swallows synchronous throws.
([#3491](https://github.com/triggerdotdev/trigger.dev/pull/3491))
- Fail attempts on uncaught exceptions instead of hanging to
`MAX_DURATION_EXCEEDED`. A Node `EventEmitter` (e.g. `node-redis`)
emitting `"error"` with no `.on("error", ...)` listener escalates to
`uncaughtException`, which the worker previously reported but did not
act on — runs drifted to maxDuration with empty attempts. They now fail
fast with the original error and status `FAILED`, and respect the task's
normal retry policy. You should still attach `.on("error", ...)`
listeners to long-lived clients to handle errors gracefully.
([#3529](https://github.com/triggerdotdev/trigger.dev/pull/3529))
## @trigger.dev/python@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
- `@trigger.dev/build@4.4.6`
- `@trigger.dev/sdk@4.4.6`
## @trigger.dev/react-hooks@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
## @trigger.dev/redis-worker@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
## @trigger.dev/rsc@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
## @trigger.dev/schema-to-json@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
## @trigger.dev/sdk@4.4.6
### Patch Changes
- Updated dependencies:
- `@trigger.dev/core@4.4.6`
</details>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
130 lines
3.1 KiB
JSON
130 lines
3.1 KiB
JSON
{
|
|
"name": "@trigger.dev/sdk",
|
|
"version": "4.4.6",
|
|
"description": "trigger.dev Node.JS SDK",
|
|
"license": "MIT",
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/triggerdotdev/trigger.dev",
|
|
"directory": "packages/trigger-sdk"
|
|
},
|
|
"type": "module",
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"tshy": {
|
|
"selfLink": false,
|
|
"main": true,
|
|
"module": true,
|
|
"project": "./tsconfig.build.json",
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": "./src/v3/index.ts",
|
|
"./v3": "./src/v3/index.ts",
|
|
"./ai": "./src/v3/ai.ts"
|
|
},
|
|
"sourceDialects": [
|
|
"@triggerdotdev/source"
|
|
]
|
|
},
|
|
"typesVersions": {
|
|
"*": {
|
|
"v3": [
|
|
"dist/commonjs/v3/index.d.ts"
|
|
],
|
|
"ai": [
|
|
"dist/commonjs/v3/ai.d.ts"
|
|
]
|
|
}
|
|
},
|
|
"scripts": {
|
|
"clean": "rimraf dist .tshy .tshy-build .turbo",
|
|
"build": "tshy && pnpm run update-version",
|
|
"dev": "tshy --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest",
|
|
"update-version": "tsx ../../scripts/updateVersion.ts",
|
|
"check-exports": "attw --pack ."
|
|
},
|
|
"dependencies": {
|
|
"@opentelemetry/api": "1.9.0",
|
|
"@opentelemetry/semantic-conventions": "1.36.0",
|
|
"@trigger.dev/core": "workspace:4.4.6",
|
|
"chalk": "^5.2.0",
|
|
"cronstrue": "^2.21.0",
|
|
"debug": "^4.3.4",
|
|
"evt": "^2.4.13",
|
|
"slug": "^6.0.0",
|
|
"ulid": "^2.3.0",
|
|
"uncrypto": "^0.1.3",
|
|
"ws": "^8.11.0"
|
|
},
|
|
"devDependencies": {
|
|
"@arethetypeswrong/cli": "^0.15.4",
|
|
"@types/debug": "^4.1.7",
|
|
"@types/slug": "^5.0.3",
|
|
"@types/ws": "^8.5.3",
|
|
"ai": "^6.0.0",
|
|
"encoding": "^0.1.13",
|
|
"rimraf": "^6.0.1",
|
|
"tshy": "^3.0.2",
|
|
"tsx": "4.17.0",
|
|
"typed-emitter": "^2.1.0",
|
|
"zod": "3.25.76"
|
|
},
|
|
"peerDependencies": {
|
|
"zod": "^3.0.0 || ^4.0.0",
|
|
"ai": "^4.2.0 || ^5.0.0 || ^6.0.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"ai": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"engines": {
|
|
"node": ">=18.20.0"
|
|
},
|
|
"exports": {
|
|
"./package.json": "./package.json",
|
|
".": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/index.ts",
|
|
"types": "./dist/esm/v3/index.d.ts",
|
|
"default": "./dist/esm/v3/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/index.d.ts",
|
|
"default": "./dist/commonjs/v3/index.js"
|
|
}
|
|
},
|
|
"./v3": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/index.ts",
|
|
"types": "./dist/esm/v3/index.d.ts",
|
|
"default": "./dist/esm/v3/index.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/index.d.ts",
|
|
"default": "./dist/commonjs/v3/index.js"
|
|
}
|
|
},
|
|
"./ai": {
|
|
"import": {
|
|
"@triggerdotdev/source": "./src/v3/ai.ts",
|
|
"types": "./dist/esm/v3/ai.d.ts",
|
|
"default": "./dist/esm/v3/ai.js"
|
|
},
|
|
"require": {
|
|
"types": "./dist/commonjs/v3/ai.d.ts",
|
|
"default": "./dist/commonjs/v3/ai.js"
|
|
}
|
|
}
|
|
},
|
|
"main": "./dist/commonjs/v3/index.js",
|
|
"types": "./dist/commonjs/v3/index.d.ts",
|
|
"module": "./dist/esm/v3/index.js"
|
|
}
|