@remix-run/node 1.6.4 → 1.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # `@remix-run/node`
2
+
3
+ ## 1.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - We enhanced the type signatures of `loader`/`action` and `useLoaderData`/`useActionData` to make it possible to infer the data type from return type of its related server function.
8
+
9
+ ```tsx
10
+ import type { LoaderArgs } from "@remix-run/node";
11
+
12
+ export async function loader(args: LoaderArgs) {
13
+ return json({ greeting: "Hello!" }); // TypedResponse<{ greeting: string }>
14
+ }
15
+
16
+ export default function App() {
17
+ let data = useLoaderData<typeof loader>(); // { greeting: string }
18
+ return <div>{data.greeting}</div>;
19
+ }
20
+ ```
21
+
22
+ See the discussion in [#1254](https://github.com/remix-run/remix/pull/1254) for more context.
23
+
24
+ - Updated dependencies
25
+ - `@remix-run/server-runtime`
package/dist/base64.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/crypto.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/fetch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/globals.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/index.d.ts CHANGED
@@ -7,4 +7,4 @@ export { createFileUploadHandler as unstable_createFileUploadHandler, NodeOnDisk
7
7
  export { createCookie, createCookieSessionStorage, createMemorySessionStorage, createSessionStorage, } from "./implementations";
8
8
  export { createReadableStreamFromReadable, readableStreamToString, writeAsyncIterableToWritable, writeReadableStreamToWritable, } from "./stream";
9
9
  export { createRequestHandler, createSession, isCookie, isSession, json, MaxPartSizeExceededError, redirect, unstable_composeUploadHandlers, unstable_createMemoryUploadHandler, unstable_parseMultipartFormData, } from "@remix-run/server-runtime";
10
- export type { ActionFunction, AppData, AppLoadContext, Cookie, CookieOptions, CookieParseOptions, CookieSerializeOptions, CookieSignatureOptions, CreateRequestHandlerFunction, DataFunctionArgs, EntryContext, ErrorBoundaryComponent, HandleDataRequestFunction, HandleDocumentRequestFunction, HeadersFunction, HtmlLinkDescriptor, HtmlMetaDescriptor, LinkDescriptor, LinksFunction, LoaderFunction, MemoryUploadHandlerFilterArgs, MemoryUploadHandlerOptions, MetaDescriptor, MetaFunction, PageLinkDescriptor, RequestHandler, RouteComponent, RouteHandle, ServerBuild, ServerEntryModule, Session, SessionData, SessionIdStorageStrategy, SessionStorage, UploadHandler, UploadHandlerPart, } from "@remix-run/server-runtime";
10
+ export type { ActionArgs, ActionFunction, AppData, AppLoadContext, Cookie, CookieOptions, CookieParseOptions, CookieSerializeOptions, CookieSignatureOptions, CreateRequestHandlerFunction, DataFunctionArgs, EntryContext, ErrorBoundaryComponent, HandleDataRequestFunction, HandleDocumentRequestFunction, HeadersFunction, HtmlLinkDescriptor, HtmlMetaDescriptor, LinkDescriptor, LinksFunction, LoaderArgs, LoaderFunction, MemoryUploadHandlerFilterArgs, MemoryUploadHandlerOptions, MetaDescriptor, MetaFunction, PageLinkDescriptor, RequestHandler, RouteComponent, RouteHandle, ServerBuild, ServerEntryModule, Session, SessionData, SessionIdStorageStrategy, SessionStorage, UploadHandler, UploadHandlerPart, } from "@remix-run/server-runtime";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/stream.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import type { Readable, Writable } from "stream";
3
4
  export declare function writeReadableStreamToWritable(stream: ReadableStream, writable: Writable): Promise<void>;
4
5
  export declare function writeAsyncIterableToWritable(iterable: AsyncIterable<Uint8Array>, writable: Writable): Promise<void>;
package/dist/stream.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/node v1.6.4
2
+ * @remix-run/node v1.6.5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix-run/node",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "Node.js platform abstractions for Remix",
5
5
  "bugs": {
6
6
  "url": "https://github.com/remix-run/remix/issues"
@@ -15,7 +15,7 @@
15
15
  "typings": "dist/index.d.ts",
16
16
  "sideEffects": false,
17
17
  "dependencies": {
18
- "@remix-run/server-runtime": "1.6.4",
18
+ "@remix-run/server-runtime": "1.6.5",
19
19
  "@remix-run/web-fetch": "^4.1.3",
20
20
  "@remix-run/web-file": "^3.0.2",
21
21
  "@remix-run/web-stream": "^1.0.3",