From 91f0e3a5e17707eb83f2abd7bd3b64bc5cbed54d Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Fri, 13 Sep 2024 11:08:46 -0400 Subject: [PATCH] Re-export Future through node/cloiudflare/deno packages (#9982) --- .changeset/tender-pears-confess.md | 8 ++++++++ docs/guides/single-fetch.md | 2 +- packages/remix-cloudflare/index.ts | 1 + packages/remix-deno/index.ts | 1 + packages/remix-node/index.ts | 1 + packages/remix-server-runtime/reexport.ts | 1 + 6 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/tender-pears-confess.md diff --git a/.changeset/tender-pears-confess.md b/.changeset/tender-pears-confess.md new file mode 100644 index 00000000000..0c48194d864 --- /dev/null +++ b/.changeset/tender-pears-confess.md @@ -0,0 +1,8 @@ +--- +"@remix-run/cloudflare": patch +"@remix-run/deno": patch +"@remix-run/node": patch +"@remix-run/server-runtime": patch +--- + +Single Fetch: Re-export `interface Future` through `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency diff --git a/docs/guides/single-fetch.md b/docs/guides/single-fetch.md index c3d0f09bc77..3910324237b 100644 --- a/docs/guides/single-fetch.md +++ b/docs/guides/single-fetch.md @@ -153,7 +153,7 @@ You can do this in any file covered by your `tsconfig.json` > `include`. We recommend you do this in your `vite.config.ts` to keep it colocated with the `future.unstable_singleFetch` future flag in the Remix plugin: ```ts -declare module "@remix-run/server-runtime" { +declare module "@remix-run/node" { // or cloudflare, deno, etc. interface Future { unstable_singleFetch: true; } diff --git a/packages/remix-cloudflare/index.ts b/packages/remix-cloudflare/index.ts index ec5fa2a0dc6..f79e1b9d3be 100644 --- a/packages/remix-cloudflare/index.ts +++ b/packages/remix-cloudflare/index.ts @@ -40,6 +40,7 @@ export type { DataFunctionArgs, EntryContext, ErrorResponse, + Future, HandleDataRequestFunction, HandleDocumentRequestFunction, HeadersArgs, diff --git a/packages/remix-deno/index.ts b/packages/remix-deno/index.ts index c82e1b0ae6d..3a16591712e 100644 --- a/packages/remix-deno/index.ts +++ b/packages/remix-deno/index.ts @@ -43,6 +43,7 @@ export type { DataFunctionArgs, EntryContext, ErrorResponse, + Future, HandleDataRequestFunction, HandleDocumentRequestFunction, HandleErrorFunction, diff --git a/packages/remix-node/index.ts b/packages/remix-node/index.ts index 960d3bad3e7..bccdb246f7d 100644 --- a/packages/remix-node/index.ts +++ b/packages/remix-node/index.ts @@ -52,6 +52,7 @@ export type { DataFunctionArgs, EntryContext, ErrorResponse, + Future, HandleDataRequestFunction, HandleDocumentRequestFunction, HeadersArgs, diff --git a/packages/remix-server-runtime/reexport.ts b/packages/remix-server-runtime/reexport.ts index cc7fc46f507..edc81a16615 100644 --- a/packages/remix-server-runtime/reexport.ts +++ b/packages/remix-server-runtime/reexport.ts @@ -8,6 +8,7 @@ export type { ServerEntryModule, } from "./build"; +export type { Future } from "./future"; export type { UploadHandlerPart, UploadHandler } from "./formData"; export type { MemoryUploadHandlerOptions,