Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
@remix-run/server-runtime
Advanced tools
Changelog
v2.9.2
Date: 2024-05-10
In 2.9.2 we've enhanced the type-safety when opting into the future.unstable_singleFetch
feature. Previously, we added the response
stub to LoaderFunctionArgs
and used type overrides for inference on useLoaderData
, etc., but we found that it wasn't quite enough.
With this release we're introducing new functions to assist the type-inference when using single fetch - defineLoader
/defineAction
and their client-side counterparts defineClientLoader
and nd defineClientAction
. These are identity functions; they don't modify your loader or action at runtime. Rather, they exist solely for type-safety by providing types for args and by ensuring valid return types.
export const loader = defineLoader(({ request }) => {
// ^? Request
return { a: 1, b: () => 2 };
// ^ type error: `b` is not serializable
});
Note that defineLoader
and defineAction
are not technically necessary for defining loaders and actions if you aren't concerned with type-safety:
// this totally works! and typechecking is happy too!
export const loader = () => {
return { a: 1 };
};
This means that you can opt-in to defineLoader
incrementally, one loader at a time.
Please see the Single Fetch docs for more information.
@remix-run/dev
- Vite: Fix dest already exists
error when running remix vite:build
(#9305)@remix-run/dev
- Vite: Fix issue resolving critical CSS during development when route files are located outside of the app directory (#9194)@remix-run/dev
- Vite: Remove @remix-run/node
from Vite plugin's optimizeDeps.include
list since it was unnecessary and resulted in Vite warnings when not depending on this package (#9287)@remix-run/dev
- Vite: Clean up redundant ?client-route=1
imports in development (#9395)@remix-run/dev
- Vite: Ensure Babel config files are not referenced when applying the react-refresh
Babel transform within the Remix Vite plugin (#9241)@remix-run/react
- Type-safety for single-fetch: defineLoader
, defineClientLoader
, defineAction
, defineClientAction
(#9372)@remix-run/react
- Single Fetch: Add undefined
to useActionData
type override (#9322)@remix-run/react
- Single Fetch: Allow a nonce
to be set on single fetch stream transfer inline scripts via <RemixServer>
(#9364)@remix-run/server-runtime
- Single Fetch: Don't log thrown response stubs via handleError
(#9369)@remix-run/server-runtime
- Single Fetch: Automatically wrap resource route naked object returns in json()
for back-compat in v2 (and log deprecation warning) (#9349)@remix-run/server-runtime
- Single Fetch: Pass response
stub to resource route handlers (#9349)@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog: v2.9.1...v2.9.2
Readme
Remix supports multiple server runtimes:
Support for each runtime is provided by a corresponding Remix package:
This package defines a "Remix server runtime interface" that each runtime package must conform to.
Each Remix server runtime package MUST:
interface.ts
reexport.ts
Each Remix server runtime package MAY:
FAQs
Server runtime for Remix
We found that @remix-run/server-runtime demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).