Skip to content

Latest commit

 

History

History
225 lines (139 loc) · 5.18 KB

CHANGELOG.md

File metadata and controls

225 lines (139 loc) · 5.18 KB

@remix-run/cloudflare

1.14.0

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.14.0

1.13.0

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.13.0

1.12.0

Minor Changes

  • Deprectated createCloudflareKVSessionStorage in favor of createWorkersKVSessionStorage (#2542)

Patch Changes

  • Updated RequestHandler type to match other adapter types (#4884)
  • Updated dependencies:
    • @remix-run/server-runtime@1.12.0

1.11.1

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.11.1

1.11.0

Patch Changes

1.10.1

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.10.1

1.10.0

Patch Changes

  • Export V2_HtmlMetaDescriptor and V2_MetaFunction types from runtime packages (#4943)
  • Updated dependencies:
    • @remix-run/server-runtime@1.10.0

1.9.0

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.9.0

1.8.2

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.8.2

1.8.1

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.8.1

1.8.0

Minor Changes

  • Importing functions and types from the remix package is deprecated, and all (#3284) exported modules will be removed in the next major release. For more details, see the release notes for 1.4.0 where these changes were first announced.

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.8.0

1.7.6

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.6

1.7.5

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.5

1.7.4

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.4

1.7.3

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.3

1.7.2

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.2

1.7.1

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.1

1.7.0

Minor Changes

  • We've added a new type: SerializeFrom. This is used to infer the (#4013) JSON-serialized return type of loaders and actions.

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.7.0

1.6.8

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.6.8

1.6.7

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.6.7

1.6.6

Patch Changes

  • Updated dependencies:
    • @remix-run/server-runtime@1.6.6

1.6.5

Patch Changes

  • 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.

    To enable this feature, you will need to use the LoaderArgs type from @remix-run/cloudflare instead of typing the function directly:

    - import type { LoaderFunction } from "@remix-run/cloudflare";
    + import type { LoaderArgs } from "@remix-run/cloudflare";
    
    - export const loader: LoaderFunction = async (args) => {
    -   return json<LoaderData>(data);
    - }
    + export async function loader(args: LoaderArgs) {
    +   return json(data);
    + }

    Then you can infer the loader data by using typeof loader as the type variable in useLoaderData:

    - let data = useLoaderData() as LoaderData;
    + let data = useLoaderData<typeof loader>();

    The API above is exactly the same for your route action and useActionData via the ActionArgs type.

    With this change you no longer need to manually define a LoaderData type (huge time and typo saver!), and we serialize all values so that useLoaderData can't return types that are impossible over the network, such as Date objects or functions.

    See the discussions in #1254 and #3276 for more context.

  • Updated dependencies

    • @remix-run/server-runtime@1.6.5