Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More ā†’
Socket
Sign inDemoInstall
Socket

@vercel/remix

Package Overview
Dependencies
Maintainers
9
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/remix - npm Package Versions

23
ā€¦
14

2.15.1

Diff

Changelog

Source

v2.15.1

Date: 2024-12-09

Patch Changes

  • create-remix - Move fs-extra from devDependencies to dependencies (#10300)

Full Changelog: v2.15.0...v2.15.1

vercel-release-bot
published 2.15.0 ā€¢

Changelog

Source

v2.15.0

Date: 2024-11-19

Patch Changes

  • Stabilize the future.v3_routeConfig future flag, replacing future.unstable_routeConfig. This enables support for routes.ts to assist with the migration to React Router v7. (#10236)

    Note that if you had already enabled the future.unstable_routeConfig flag, your route config in app/routes.ts is no longer defined via the routes export and must now be defined via the default export.

    import { type RouteConfig } from "@remix-run/route-config";
    
    -export const routes: RouteConfig = [];
    +export default [] satisfies RouteConfig;
    
vercel-release-bot
published 2.14.0 ā€¢

Changelog

Source

v2.14.0

Date: 2024-11-08

Minor Changes

  • Deprecate SerializeFrom in favor of generics because it will be removed in React Router v7 (#10173)

  • Add deprecation warning to @remix-run/eslint-config (#10174)

  • Add support for routes.ts behind future.unstable_routeConfig flag to assist with the migration to React Router v7. (#10107)

    Config-based routing is the new default in React Router v7, configured via the routes.ts file in the app directory. Support for routes.ts and its related APIs in Remix are designed as a migration path to help minimize the number of changes required when moving your Remix project over to React Router v7. While some new packages have been introduced within the @remix-run scope, these new packages only exist to keep the code in routes.ts as similar as possible to the equivalent code for React Router v7.

    When the unstable_routeConfig future flag is enabled, Remix's built-in file system routing will be disabled and your project will opted into React Router v7's config-based routing.

    To enable the flag, in your vite.config.ts file:

    remix({
      future: {
        unstable_routeConfig: true,
      },
    });
    

    A minimal routes.ts file to support Remix's built-in file system routing looks like this:

    // app/routes.ts
    import { flatRoutes } from "@remix-run/fs-routes";
    import type { RouteConfig } from "@remix-run/route-config";
    
    export const routes: RouteConfig = flatRoutes();
    
  • Log deprecation warnings for v3 future flags (#10126)

    • Add @deprecated annotations to json/defer utilities

Patch Changes

  • @remix-run/react - Fix defaultShouldRevalidate value when using Single Fetch (#10139)
  • @remix-run/server-runtime - Update externally-accessed resource routes warning to cover null usage as well (#10145)

Updated Dependencies

Changes by Package

Full Changelog: v2.13.1...v2.14.0

vercel-release-bot
published 2.13.1 ā€¢

Changelog

Source

v2.13.1

Date: 2024-10-11

Patch Changes

  • @remix-run/dev - Revert future.v3_optimizeDeps back to future.unstable_optimizeDeps as it was not intended to stabilize in Remix v2 (#10099)

Full Changelog: v2.13.0...v2.13.1

vercel-release-bot
published 2.12.0 ā€¢

Changelog

Source

v2.12.0

Date: 2024-09-09

What's Changed

Future Flag for Automatic Dependency Optimization (unstable)

You can now opt-in to automatic dependency optimization during development by using the future.unstable_optimizeDeps future flag. For details, check out the docs at Guides > Dependency optimization. For users who were previously working around this limitation, you no longer need to explicitly add routes to Vite's optimizeDeps.entries nor do you need to disable the remix-dot-server plugin.

Improved Single Fetch Type Safety (unstable)
  • If you were already using single-fetch types:
    • Remove the "@remix-run/react/future/single-fetch.d.ts" override from tsconfig.json > compilerOptions > types
    • Remove defineLoader, defineAction, defineClientLoader, defineClientAction helpers from your route modules
    • Replace UIMatch_SingleFetch type helper with the original UIMatch
    • Replace MetaArgs_SingleFetch type helper with the original MetaArgs

Then you are ready for the new type safety setup:

// vite.config.ts

declare module "@remix-run/server-runtime" {
  interface Future {
    unstable_singleFetch: true; // šŸ‘ˆ enable _types_ for single-fetch
  }
}

export default defineConfig({
  plugins: [
    remix({
      future: {
        unstable_singleFetch: true, // šŸ‘ˆ enable single-fetch
      },
    }),
  ],
});

For more information, see Guides > Single Fetch in our docs.

Updates to Single Fetch Revalidation Behavior (unstable)

With Single Fetch, re-used routes will now revalidate by default on GET navigations. This is aimed at improving caching of Single Fetch calls in the simple case while still allowing users to opt-into the previous behavior for more advanced use cases.

With this new behavior, requests do not need special query params for granular route revalidations out of the box - i.e., GET /a/b/c.data

There are two conditions that will trigger granular revalidation and will exclude certain routes from the single fetch call:

  • If a route opts out of revalidation via shouldRevalidate
  • If a route defines a clientLoader
    • If you call serverLoader() from your clientLoader, that will make a separate HTTP call for just that route loader - i.e., GET /a/b/c.data?_routes=routes/a for a clientLoader in routes/a.tsx

When one or more routes are excluded from the Single Fetch call, the remaining routes that have loaders are included as query params. For example, when navigating to /a/b/c, if A was excluded, and the root route and routes/b had a loader but routes/c did not, the Single Fetch request would be GET /a/b/c.data?_routes=root,routes/b.

For more information, see Guides > Single Fetch in our docs.

Minor Changes

  • @remix-run/dev - New future.unstable_optimizeDeps flag for automatic dependency optimization (#9921)

Patch Changes

  • @remix-run/dev - Handle circular dependencies in modulepreload manifest generation (#9917)
  • @remix-run/dev - Fix dest already exists build errors by only moving SSR assets to the client build directory when they're not already present on disk (#9901)
  • @remix-run/react - Clarify wording in default HydrateFallback console warning (#9899)
  • @remix-run/react - Remove hydration URL check that was originally added for React 17 hydration issues and we no longer support React 17 (#9890)
    • Reverts the logic originally added in Remix v1.18.0 via #6409
    • This was added to resolve an issue that could arise when doing quick back/forward history navigations while JS was loading which would cause a mismatch between the server matches and client matches: #1757
    • This specific hydration issue would then cause this React v17 only looping issue: #1678
    • The URL comparison that we added in 1.18.0 turned out to be subject to false positives of it's own which could also put the user in looping scenarios
    • Remix v2 upgraded it's minimal React version to v18 which eliminated the v17 hydration error loop
    • React v18 handles this hydration error like any other error and does not result in a loop
    • So we can remove our check and thus avoid the false-positive scenarios in which it may also trigger a loop
  • @remix-run/react - Lazy Route Discovery: Sort /__manifest query parameters for better caching (#9888)
  • @remix-run/react - Single Fetch: Improved type safety (#9893)
  • @remix-run/react - Single Fetch: Fix revalidation behavior bugs (#9938)
  • @remix-run/server-runtime - Do not render or try to include a body for 304 responses on document requests (#9955)
  • @remix-run/server-runtime - Single Fetch: Do not try to encode a turbo-stream body into 304 responses (#9941)
  • @remix-run/server-runtime - Single Fetch: Change content type on .data requests to text/x-script to allow Cloudflare compression (#9889)

Updated Dependencies

Changes by Package

Full Changelog: v2.11.2...v2.12.0

vercel-release-bot
published 2.11.2 ā€¢

Changelog

Source

v2.11.2

Date: 2024-08-15

Patch Changes

  • @remix-run/react - Fog of War: Simplify implementation now that React Router handles slug/splat edge cases and tracks previously discovered routes (see https://github.com/remix-run/react-router/pull/11883) (#9860)
    • āš ļø This changes the return signature of the internal /__manifest endpoint since we no longer need the notFoundPaths field
  • @remix-run/react - Fog of War: Update to use renamed unstable_patchRoutesOnNavigation function in RR (see https://github.com/remix-run/react-router/pull/11888) (#9860)
  • @remix-run/server-runtime - Single Fetch: Fix redirects when a basename is present (#9848)
  • @remix-run/server-runtime - Single Fetch: Update turbo-stream to v2.3.0 (#9856)
    • Stabilize object key order for serialized payloads
    • Remove memory limitations payloads sizes

Updated Dependencies

Changes by Package

Full Changelog: v2.11.1...v2.11.2

vercel-release-bot
published 2.11.1 ā€¢

Changelog

Source

v2.11.1

Date: 2024-08-05

Patch Changes

  • @remix-run/react - Revert #9695, stop infinite reload (a7cffe57)

Changes by Package

Full Changelog: v2.11.0...v2.11.1

vercel-release-bot
published 2.11.0 ā€¢

Changelog

Source

v2.11.0

Date: 2024-08-01

What's Changed

Renamed unstable_fogOfWar future flag to unstable_lazyRouteDiscovery (unstable)

We found that the future.unstable_fogOfWar flag name could be a bit confusing without the proper context (notably, the blog post), so we've renamed the flag to future.unstable_lazyRouteDiscovery for clarity. If you had opted into this feature already, please update the name of the flag in your vite.config.ts file (or remix.config.js).

Removed response stub in Single Fetch (unstable)

The original Single Fetch approach was based on an assumption that an eventual middleware implementation would require something like the ResponseStub API so users could mutate status/headers in middleware before/after handlers as well as during handlers. As part of Single Fetch, we wanted to align how response headers would be merged between document and data requests. Thinking response was the future API, we aligned document requests to use the response stub that data requests were using, and we stopped using the headers() function.

However, the realization/alignment between Michael and Ryan on the recent roadmap planning made us realize that the original assumption was incorrect. middleware won't need a response stub - as users can just mutate the Response they get from await next() directly.

Removing that assumption, and still wanting to align how headers get merged between document and data requests, it makes more sense to stick with the current headers() API and align Single Fetch data requests to use that existing API. This was we don't need to introduce any new header-related APIs which will make the adoption of Single Fetch much easier.

With this change:

  • The headers() function will let you control header merging for both document and data requests
  • In most cases, if you were returning json()/defer() without setting a custom status or headers, you can just remove those utility functions and return the raw data
    • āŒ return json({ data: "whatever" });
    • āœ… return { data: "whatever" };
  • If you were returning a custom status or headers via json/defer:
    • We've added a new API-compatible unstable_data utility that will let you send back status/headers alongside your raw data without having to encode it into a Response
  • We will be removing both json and defer in the next major version, but both should still work in Single Fetch in v2 to allow for incremental adoption of the new behavior

āš ļø If you've already adopted Single Fetch in it's unstable state and converted to response stub, you'll need to move those changes back to leveraging the headers() API.

Minor Changes

  • @remix-run/dev - Fog of War: Rename future.unstable_fogOfWar to future.unstable_lazyRouteDiscovery for clarity (#9763)
  • @remix-run/server-runtime - Add a new replace(url, init?) alternative to redirect(url, init?) that performs a history.replaceState instead of a history.pushState on client-side navigation redirects (#9764)
  • @remix-run/server-runtime - Single Fetch: Add a new unstable_data() API as a replacement for json/defer when custom status/headers are needed (#9769)
  • @remix-run/server-runtime - Single Fetch: Remove responseStub in favor of headers (#9769)

Patch Changes

  • @remix-run/dev - Handle absolute Vite base URLs (#9700)
  • @remix-run/react - Change initial hydration route mismatch from a URL check to a matches check to be resistant to URL inconsistencies (#9695)
  • @remix-run/react - Single Fetch: Ensure calls don't include any trailing slash from the pathname (i.e., /path/.data) (#9792)
  • @remix-run/react - Single Fetch: Add undefined to the useRouteLoaderData type override (#9796)

Updated Dependencies

Changes by Package

Full Changelog: v2.10.3...v2.11.0

vercel-release-bot
published 2.10.3 ā€¢

Changelog

Source

v2.10.3

Date: 2024-07-16

Patch Changes

  • @remix-run/architect - Manually joining headers with semi-colons to avoid differences in Remix and node/undici Headers implementation (#9664)
  • @remix-run/react - Log any errors encountered loading a route module prior to reloading the page (#8932)
  • @remix-run/react - Single Fetch (unstable): Proxy request.signal through dataStrategy for loader calls to fix cancellation (#9738)
  • @remix-run/react - Single Fetch (unstable): Adopt React Router's stabilized future.v7_skipActionErrorRevalidation under the hood (#9706)
    • This stabilizes the shouldRevalidate parameter from unstable_actionStatus to actionStatus
    • āš ļø This might be a breaking change for your app if you have opted into single fetch and the unstable_actionStatus parameter

Updated Dependencies

Changes by Package

Full Changelog: v2.10.2...v2.10.3

vercel-release-bot
published 2.10.2 ā€¢

Changelog

Source

v2.10.2

Date: 2024-07-04

Patch Changes

  • @remix-run/react - Forward ref to Form (bdd04217)
  • @remix-run/server-runtime - Fix bug with immutable headers on raw native fetch responses returned from loaders (#9693)

Changes by Package

Full Changelog: v2.10.1...v2.10.2

23
ā€¦
14
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with āš”ļø by Socket Inc