Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade undici to 7.x and expose re-exports in Undici module #4149

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/serious-eels-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/platform-node": minor
---

upgrade undici to 7.x and expose re-exports in Undici module
2 changes: 1 addition & 1 deletion packages/platform-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"dependencies": {
"@effect/platform-node-shared": "workspace:^",
"mime": "^3.0.0",
"undici": "^6.19.7",
"undici": "^7.1.0",
"ws": "^8.18.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-node/src/NodeHttpClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import type * as Layer from "effect/Layer"
import type * as Scope from "effect/Scope"
import type * as Http from "node:http"
import type * as Https from "node:https"
import type * as Undici from "undici"
import * as internal from "./internal/httpClient.js"
import * as internalUndici from "./internal/httpClientUndici.js"
import type * as Undici from "./Undici.js"

/**
* @since 1.0.0
Expand Down
9 changes: 9 additions & 0 deletions packages/platform-node/src/Undici.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @since 1.0.0
*/

/**
* @since 1.0.0
* @category undici
*/
export * from "undici"
5 changes: 5 additions & 0 deletions packages/platform-node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ export * as NodeWorker from "./NodeWorker.js"
* @since 1.0.0
*/
export * as NodeWorkerRunner from "./NodeWorkerRunner.js"

/**
* @since 1.0.0
*/
export * as Undici from "./Undici.js"
5 changes: 2 additions & 3 deletions packages/platform-node/src/internal/httpClientUndici.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import * as Layer from "effect/Layer"
import * as Option from "effect/Option"
import type * as Scope from "effect/Scope"
import type * as Stream from "effect/Stream"
import * as Undici from "undici"
import type * as NodeClient from "../NodeHttpClient.js"
import * as NodeStream from "../NodeStream.js"
import * as Undici from "../Undici.js"

/** @internal */
export const Dispatcher = Context.GenericTag<NodeClient.Dispatcher, Undici.Dispatcher>(
Expand Down Expand Up @@ -58,8 +58,7 @@ export const make = (dispatcher: Undici.Dispatcher): Client.HttpClient =>
body,
// leave timeouts to Effect.timeout etc
headersTimeout: 60 * 60 * 1000,
bodyTimeout: 0,
throwOnError: false
bodyTimeout: 0
}),
catch: (cause) =>
new Error.RequestError({
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading