Releases: remix-run/remix
v1.6.6
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
- @vorcigernix made their first contribution in #3718
- @TAGraves made their first contribution in #3763
- @nickytonline made their first contribution in #3754
- @Synvox made their first contribution in #3767
- @Drew-Daniels made their first contribution in #3770
- @jasonadelia made their first contribution in #3788
- @plondon made their first contribution in #3799
- @esamattis made their first contribution in #3797
- @runmoore made their first contribution in #3798
- @awthwathje made their first contribution in #3804
- @alextes made their first contribution in #3813
- @gst4r made their first contribution in #3433
- @dvargas92495 made their first contribution in #2803
- @chipit24 made their first contribution in #3823
- @vincecao made their first contribution in #3834
- @itsMapleLeaf made their first contribution in #3766
Full Changelog: v1.6.5...v1.6.6
v1.6.5
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
@remix-run/cloudflare
@remix-run/cloudflare-workers
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/node
@remix-run/react
@remix-run/server-runtime
@remix-run/vercel
New Contributors
- @ronnylt made their first contribution in #3681
- @vmosyaykin made their first contribution in #3698
- @garand made their first contribution in #859
- @kiancross made their first contribution in #3716
Full Changelog: v1.6.4...v1.6.5
v1.6.4
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 forremix.config
. This allows you to define custom directories to watch while runningremix dev
(#3188).
New Contributors
- @justsml made their first contribution in #3602
- @christophertrudel made their first contribution in #3188
- @manan30 made their first contribution in #3631
- @juliaqiuxy made their first contribution in #3598
- @lensbart made their first contribution in #3595
- @federicoestevez made their first contribution in #3644
- @shashankboosi made their first contribution in #3642
- @justinsalasdev made their first contribution in #3547
- @guatedude2 made their first contribution in #3637
Full Changelog: v1.6.3...v1.6.4
v1.6.3
v1.6.2
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
- @cmd-johnson made their first contribution in #1316
- @ahabhgk made their first contribution in #3526
- @bgschiller made their first contribution in #2804
- @binajmen made their first contribution in #3558
- @jimniels made their first contribution in #3557
- @alisd23 made their first contribution in #3579
Full Changelog: v1.6.1...v1.6.2-pre.0
v1.6.1
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
- @mush159 made their first contribution in #3485
- @JeffBeltran made their first contribution in #3491
- @ni554n made their first contribution in #3517
- @vlindhol made their first contribution in #3511
- @davecranwell-vocovo made their first contribution in #3458
Full Changelog: v1.6.0...v1.6.1
v1.6.0
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 theremix dev
script (#3447)
🐛 Bug fixes
- Fixed cookies to default to
sameSite: "lax"
to better align with browsers (#2388) - Normalized
imageSrcSet
/imageSizes
props forlinks
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
- @jiahao-c made their first contribution in #3216
- @apeltop made their first contribution in #3242
- @nvh95 made their first contribution in #3249
- @realjokele made their first contribution in #3266
- @JNaftali made their first contribution in #3253
- @turkerdev made their first contribution in #3274
- @udasitharani made their first contribution in #2332
- @colinhacks made their first contribution in #3268
- @johnpolacek made their first contribution in #3329
- @RATIU5 made their first contribution in #3345
- @penx made their first contribution in #3353
- @dgurns made their first contribution in #3368
- @jrubins made their first contribution in #3418
- @sebz made their first contribution in #3384
Full Changelog: v1.5.1...v1.6.0
v1.5.1
v1.5.0
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:
- a brand new
@remix-run/deno
package - 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 usingprefetch-intent
(#2938)
⚠️ Unstable API changes
unstable_parseMultipartFormData
no longer operates on a Node.jsstream
, this has been changed to anAsyncIterable<Uint8Array>
calleddata
to bring this functionality to all platforms (#2736)unstable_parseMultipartFormData
no longer parses fields automatically for you; instead useunstable_composeUploadHandlers
to combine multiple upload handlers (#2736)
New Contributors
- @chiangs made their first contribution in #2960
- @kbariotis made their first contribution in #2275
- @arvindell made their first contribution in #3031
- @cloudy9101 made their first contribution in #3045
- @achinchen made their first contribution in #3042
- @vkrol made their first contribution in #3068
- @JulesBlm made their first contribution in #3077
- @chenxsan made their first contribution in #3033
- @dogukanakkaya made their first contribution in #2441
- @michaeldebetaz made their first contribution in #3043
- @frontsideair made their first contribution in #3019
- @youbicode made their first contribution in #3111
- @penspinner made their first contribution in #2309
- @konradkalemba made their first contribution in #3144
- @nexxeln made their first contribution in #3119
- @alireza-bonab made their first contribution in #2865
- @DNLHC made their first contribution in #3154
- @Jannis-Morgenstern made their first contribution in #3167
- @janhoogeveen made their first contribution in #3141
- @bmarvinb made their first contribution in #3198
Full Changelog: v1.4.3...v1.5.0