Skip to content

Commit ece6ca6

Browse files
committed
Fix issue when using SDK in non-node environments by scoping the stream import with node:
1 parent 6243ae3 commit ece6ca6

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.changeset/new-pants-beg.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/core": patch
3+
---
4+
5+
Fix issue when using SDK in non-node environments by scoping the stream import with node:

packages/core/src/v3/zodfetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { APIConnectionError, APIError } from "./apiErrors";
44
import { RetryOptions } from "./schemas";
55
import { calculateNextRetryDelay } from "./utils/retries";
66
import { FormDataEncoder } from "form-data-encoder";
7-
import { Readable } from "stream";
7+
import { Readable } from "node:stream";
88

99
export const defaultRetryOptions = {
1010
maxAttempts: 3,

packages/core/tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ export default defineConfig({
1616
"./src/v3/prod/index.ts",
1717
"./src/v3/workers/index.ts",
1818
],
19+
external: ["node:stream"],
1920
});

0 commit comments

Comments
 (0)