Skip to content

Releases: remix-run/remix

v1.6.6

29 Jul 19:58
834e077
Compare
Choose a tag to compare

What's Changed

  • We've added support for exporting a links function from .mdx routes (#3801). This is leveraging the fact that MDX (which we use to parse your markdown routes) allows you to declare and export anything:

    ---
    meta:
      title: Welcome to the site
      description: Hello, World!
    ---
    
    export const links = () => [
      {
        rel: "stylesheet",
        href: "/welcome.css",
        media: "(prefers-reduced-motion: no-preference)",
      },
    ];
    
    # My Page
    
    This is **markdown** with links 🎉
  • Fixed a few type-related bugs in @remix-run/react.

Changes by package

New Contributors


Full Changelog: v1.6.5...v1.6.6

v1.6.5

14 Jul 17:22
ee394a0
Compare
Choose a tag to compare

What's Changed

Enhanced types to allow inference of loader / action data

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 your Remix runtime package instead of typing the function directly:

- import type { LoaderFunction } from "@remix-run/[runtime]";
+ import type { LoaderArgs } from "@remix-run/[runtime]";

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

All changes by package

New Contributors


Full Changelog: v1.6.4...v1.6.5

v1.6.4

07 Jul 20:44
Compare
Choose a tag to compare

What's Changed

🐛 Bug fixes

  • Fixed a regression with Node v18.3 by making the detection of IPv4 addresses more durable in @remix-run/serve and @remix-run/dev (#3602)
  • Fix Yarn PnP resolution for empty modules (#3633)

💅 Enhancements

  • Add watchPaths option for remix.config. This allows you to define custom directories to watch while running remix dev (#3188).

New Contributors

Full Changelog: v1.6.3...v1.6.4

v1.6.3

29 Jun 17:06
Compare
Choose a tag to compare

This release fixes issues with some supported deep imports when bundling your server.

v1.6.2

28 Jun 22:23
Compare
Choose a tag to compare

What's Changed

🐛 Bug Fixes

  • Fixed module resolution issues when installing via Yarn 3 (#1316, #3579)
  • Fixed revalidation issues when following multiple redirects (#3460)
  • Fixed private stack validation in the create-remix CLI (#2804)

💅 Enhancements

  • The Remix compiler should tree-shake a bit more aggressively in dev mode, resulting in less dead code (#3588)

New Contributors

Full Changelog: v1.6.1...v1.6.2-pre.0

v1.6.1

22 Jun 15:19
Compare
Choose a tag to compare

What's Changed

This release includes a few small bug fixes and DX improvements. Check out the full changelog to see what's new! ✨

New Contributors

Full Changelog: v1.6.0...v1.6.1

v1.6.0

14 Jun 22:06
Compare
Choose a tag to compare

What Changed?

☠️ Deprecated

Imports from the remix package are now officially deprecated. We added ESLint warnings to help you catch these (#3285). We also provide a codemod to make the necessary changes to prepare for a future breaking change. Run npx @remix-run/dev migrate to initiate the codemod.

See the release notes for v1.4.0 for more details on this change.

💅 Enhancements

  • We now export a few more helpful types from @remix-run/react (#2876)
  • Added a --port flag to the remix dev script (#3447)

🐛 Bug fixes

  • Fixed cookies to default to sameSite: "lax" to better align with browsers (#2388)
  • Normalized imageSrcSet / imageSizes props for links depending on the React version used (#2944)
  • Added some missing dependencies to @remix-run/dev (#3413)
  • Added a fix to use the correct error/catch boundary on SSR action errors (#3436)

New Contributors

Full Changelog: v1.5.1...v1.6.0

v1.5.1

19 May 00:21
Compare
Choose a tag to compare

What's Changed

💅 Enhancements

  • Added Deno to the list of options in the create-remix CLI 🦕 (#3233)

Full Changelog: v1.5.0...v1.5.1

v1.5.0

18 May 20:01
Compare
Choose a tag to compare

Welcome to version 1.5 of Remix. Can you believe that we are already 1.5 years versions old? Time flies when you're building fun web frameworks!

We've got a few things that we're excited to share with this one, so let's get started 💿 💿 💿

Official support for Deno

Your scientists were so preoccupied with whether they could that they didn't stop to think if they should.

Dr. Ian Malcolm, Jurassic Park


A short while ago we rolled out a new adapter with experimental support for building on top of Deno. At long last, the mad scientists at Remix are now ready to announce a major breakthrough:

Remix now officially supports Deno. 🦕

Apart from compiler-related changes, Deno support comes in the form of:

  1. a brand new @remix-run/deno package
  2. an updated Deno template (npx create-remix@latest --template deno)

We couldn't be more excited to see what Deno enables for your future Remix projects. Deno takes a very different approach than most other JS runtimes, and we learned some big lessons while implementing our adapter. For those curious, check out a some tricky Deno-related decisions we made along the way.

It was tough going at times, but as Dr. Malcolm would say: life the compiler finds a way 🦖

Moving closer to The Platform™

One of our driving forces with Remix is to use web standards and get to connect developers more closely to them with our APIs.

In the olden days, the only JavaScript runtime was the one implemented by browsers, but Node changed the game for everyone. In those days, many standards and APIs necessary to build a proper JS server runtime didn't exist, so the good folks working on Node had to invent them for us. Or in many cases we'd get "polyfills" for new standards from third-party libraries like node-fetch.

These were innovative times, and moving quickly allowed devs to ship more quickly. But inconsistency between runtimes also created a lot of problems. Thankfully we are getting closer than ever to consensus-driven solutions, and Remix is moving towards this new, more standardized approach.

We have removed our dependency on node-fetch and moved forward with our own implementation that gets closer to the living Fetch Standard. This opens the door to new features in your loaders and actions—you can now return ReadableStream in the body of your response, which allows you to stream data from your server and paves the way for the new streaming APIs in React 18.

This comes at an exciting time for the web, as just a few weeks ago we saw the formation of a new Web-interoperable Runtimes Community Group. We've never been more optimistic about the web, and we see this change as a necessary first step to embrace its future.


What's Changed

✨ Features

  • Replaced node-fetch with @remix-run/web-fetch for a more standards-based fetch implementation (#2736)
  • Launched official support for Deno (#3117)

💅 Enhancements

  • Made a few improvements in our experimental Netlify Edge adapter (#3107)

🐛 Bug fixes

  • Fixed support for JSX in .js route files (#3059)
  • Fixed issues with package manager detection (#3109)
  • Fixed the packageExports map (#3189)
  • Avoid duplicate loader calls when using prefetch-intent (#2938)

⚠️ Unstable API changes

  • unstable_parseMultipartFormData no longer operates on a Node.js stream, this has been changed to an AsyncIterable<Uint8Array> called data to bring this functionality to all platforms (#2736)
  • unstable_parseMultipartFormData no longer parses fields automatically for you; instead use unstable_composeUploadHandlers to combine multiple upload handlers (#2736)

New Contributors

Full Changelog: v1.4.3...v1.5.0

v1.4.3

27 Apr 22:12
Compare
Choose a tag to compare

This release reverts #2875, which cleans build directories before starting a new build. This behavior caused some unintended problems for some folks using external processes. See #2875 (comment)