Skip to content

Commit e7b529c

Browse files
chore(deps): update all non-major dependencies (examples & templates) (minor) (#7050)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@react-router/dev](https://reactrouter.com) ([source](https://redirect.github.com/remix-run/react-router/tree/HEAD/packages/react-router-dev)) | [`7.2.0` -> `7.3.0`](https://renovatebot.com/diffs/npm/@react-router%2fdev/7.2.0/7.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@react-router%2fdev/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-router%2fdev/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-router%2fdev/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-router%2fdev/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@react-router/node](https://redirect.github.com/remix-run/react-router) ([source](https://redirect.github.com/remix-run/react-router/tree/HEAD/packages/react-router-node)) | [`7.2.0` -> `7.3.0`](https://renovatebot.com/diffs/npm/@react-router%2fnode/7.2.0/7.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@react-router%2fnode/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-router%2fnode/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-router%2fnode/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-router%2fnode/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@react-router/serve](https://redirect.github.com/remix-run/react-router) ([source](https://redirect.github.com/remix-run/react-router/tree/HEAD/packages/react-router-serve)) | [`7.2.0` -> `7.3.0`](https://renovatebot.com/diffs/npm/@react-router%2fserve/7.2.0/7.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@react-router%2fserve/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-router%2fserve/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-router%2fserve/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-router%2fserve/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [eslint](https://eslint.org) ([source](https://redirect.github.com/eslint/eslint)) | [`9.21.0` -> `9.22.0`](https://renovatebot.com/diffs/npm/eslint/9.21.0/9.22.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint/9.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint/9.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint/9.21.0/9.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint/9.21.0/9.22.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [react-router](https://redirect.github.com/remix-run/react-router) ([source](https://redirect.github.com/remix-run/react-router/tree/HEAD/packages/react-router)) | [`7.2.0` -> `7.3.0`](https://renovatebot.com/diffs/npm/react-router/7.2.0/7.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-router/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-router/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-router/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-router/7.2.0/7.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>remix-run/react-router (@&#8203;react-router/dev)</summary> ### [`v7.3.0`](https://redirect.github.com/remix-run/react-router/blob/HEAD/packages/react-router-dev/CHANGELOG.md#730) [Compare Source](https://redirect.github.com/remix-run/react-router/compare/@react-router/[email protected]...@react-router/[email protected]) ##### Patch Changes - Fix support for custom client `build.rollupOptions.output.entryFileNames` ([#&#8203;13098](https://redirect.github.com/remix-run/react-router/pull/13098)) - Fix usage of `prerender` option when `serverBundles` option has been configured or provided by a preset, e.g. `vercelPreset` from `@vercel/react-router` ([#&#8203;13082](https://redirect.github.com/remix-run/react-router/pull/13082)) - Fix support for custom `build.assetsDir` ([#&#8203;13077](https://redirect.github.com/remix-run/react-router/pull/13077)) - Remove unused dependencies ([#&#8203;13134](https://redirect.github.com/remix-run/react-router/pull/13134)) - Stub all routes except root in "SPA Mode" server builds to avoid issues when route modules or their dependencies import non-SSR-friendly modules ([#&#8203;13023](https://redirect.github.com/remix-run/react-router/pull/13023)) - Fix errors with `future.unstable_viteEnvironmentApi` when the `ssr` environment has been configured by another plugin to be a custom `Vite.DevEnvironment` rather than the default `Vite.RunnableDevEnvironment` ([#&#8203;13008](https://redirect.github.com/remix-run/react-router/pull/13008)) - Remove unused Vite file system watcher ([#&#8203;13133](https://redirect.github.com/remix-run/react-router/pull/13133)) - Fix support for custom SSR build input when `serverBundles` option has been configured ([#&#8203;13107](https://redirect.github.com/remix-run/react-router/pull/13107)) Note that for consumers using the `future.unstable_viteEnvironmentApi` and `serverBundles` options together, hyphens are no longer supported in server bundle IDs since they also need to be valid Vite environment names. - Fix dev server when using HTTPS by stripping HTTP/2 pseudo headers from dev server requests ([#&#8203;12830](https://redirect.github.com/remix-run/react-router/pull/12830)) - Lazy load Cloudflare platform proxy on first dev server request when using the `cloudflareDevProxy` Vite plugin to avoid creating unnecessary workerd processes ([#&#8203;13016](https://redirect.github.com/remix-run/react-router/pull/13016)) - When `future.unstable_viteEnvironmentApi` is enabled and the `ssr` environment has `optimizeDeps.noDiscovery` disabled, define `optimizeDeps.entries` and `optimizeDeps.include` ([#&#8203;13007](https://redirect.github.com/remix-run/react-router/pull/13007)) - Fix duplicated entries in typegen for layout routes and their corresponding index route ([#&#8203;13140](https://redirect.github.com/remix-run/react-router/pull/13140)) - Updated dependencies: - `[email protected]` - `@react-router/[email protected]` - `@react-router/[email protected]` </details> <details> <summary>remix-run/react-router (@&#8203;react-router/node)</summary> ### [`v7.3.0`](https://redirect.github.com/remix-run/react-router/blob/HEAD/packages/react-router-node/CHANGELOG.md#730) [Compare Source](https://redirect.github.com/remix-run/react-router/compare/@react-router/[email protected]...@react-router/[email protected]) ##### Patch Changes - Updated dependencies: - `[email protected]` </details> <details> <summary>remix-run/react-router (@&#8203;react-router/serve)</summary> ### [`v7.3.0`](https://redirect.github.com/remix-run/react-router/blob/HEAD/packages/react-router-serve/CHANGELOG.md#730) [Compare Source](https://redirect.github.com/remix-run/react-router/compare/@react-router/[email protected]...@react-router/[email protected]) ##### Patch Changes - Updated dependencies: - `[email protected]` - `@react-router/[email protected]` - `@react-router/[email protected]` </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v9.22.0`](https://redirect.github.com/eslint/eslint/compare/v9.21.0...60a78e7964fbb79c0e55e86845a87e0eb22d4de3) [Compare Source](https://redirect.github.com/eslint/eslint/compare/v9.21.0...v9.22.0) </details> <details> <summary>remix-run/react-router (react-router)</summary> ### [`v7.3.0`](https://redirect.github.com/remix-run/react-router/blob/HEAD/packages/react-router/CHANGELOG.md#730) [Compare Source](https://redirect.github.com/remix-run/react-router/compare/[email protected]@7.3.0) ##### Minor Changes - Add `fetcherKey` as a parameter to `patchRoutesOnNavigation` ([#&#8203;13061](https://redirect.github.com/remix-run/react-router/pull/13061)) - In framework mode, Lazy Route Discovery will now detect manifest version mismatches after a new deploy - On navigations to undiscovered routes, this mismatch will trigger a document reload of the destination path - On `fetcher` calls to undiscovered routes, this mismatch will trigger a document reload of the current path ##### Patch Changes - Skip resource route flow in dev server in SPA mode ([#&#8203;13113](https://redirect.github.com/remix-run/react-router/pull/13113)) - Support middleware on routes (unstable) ([#&#8203;12941](https://redirect.github.com/remix-run/react-router/pull/12941)) Middleware is implemented behind a `future.unstable_middleware` flag. To enable, you must enable the flag and the types in your `react-router-config.ts` file: ```ts import type { Config } from "@&#8203;react-router/dev/config"; import type { Future } from "react-router"; declare module "react-router" { interface Future { unstable_middleware: true; // 👈 Enable middleware types } } export default { future: { unstable_middleware: true, // 👈 Enable middleware }, } satisfies Config; ``` ⚠️ Middleware is unstable and should not be adopted in production. There is at least one known de-optimization in route module loading for `clientMiddleware` that we will be addressing this before a stable release. ⚠️ Enabling middleware contains a breaking change to the `context` parameter passed to your `loader`/`action` functions - see below for more information. Once enabled, routes can define an array of middleware functions that will run sequentially before route handlers run. These functions accept the same parameters as `loader`/`action` plus an additional `next` parameter to run the remaining data pipeline. This allows middlewares to perform logic before and after handlers execute. ```tsx // Framework mode export const unstable_middleware = [serverLogger, serverAuth]; // server export const unstable_clientMiddleware = [clientLogger]; // client // Library mode const routes = [ { path: "/", // Middlewares are client-side for library mode SPA's unstable_middleware: [clientLogger, clientAuth], loader: rootLoader, Component: Root, }, ]; ``` Here's a simple example of a client-side logging middleware that can be placed on the root route: ```tsx const clientLogger: Route.unstable_ClientMiddlewareFunction = async ( { request }, next ) => { let start = performance.now(); // Run the remaining middlewares and all route loaders await next(); let duration = performance.now() - start; console.log(`Navigated to ${request.url} (${duration}ms)`); }; ``` Note that in the above example, the `next`/`middleware` functions don't return anything. This is by design as on the client there is no "response" to send over the network like there would be for middlewares running on the server. The data is all handled behind the scenes by the stateful `router`. For a server-side middleware, the `next` function will return the HTTP `Response` that React Router will be sending across the wire, thus giving you a chance to make changes as needed. You may throw a new response to short circuit and respond immediately, or you may return a new or altered response to override the default returned by `next()`. ```tsx const serverLogger: Route.unstable_MiddlewareFunction = async ( { request, params, context }, next ) => { let start = performance.now(); // 👇 Grab the response here let res = await next(); let duration = performance.now() - start; console.log(`Navigated to ${request.url} (${duration}ms)`); // 👇 And return it here (optional if you don't modify the response) return res; }; ``` You can throw a `redirect` from a middleware to short circuit any remaining processing: ```tsx import { sessionContext } from "../context"; const serverAuth: Route.unstable_MiddlewareFunction = ( { request, params, context }, next ) => { let session = context.get(sessionContext); let user = session.get("user"); if (!user) { session.set("returnTo", request.url); throw redirect("/login", 302); } }; ``` *Note that in cases like this where you don't need to do any post-processing you don't need to call the `next` function or return a `Response`.* Here's another example of using a server middleware to detect 404s and check the CMS for a redirect: ```tsx const redirects: Route.unstable_MiddlewareFunction = async ({ request, next, }) => { // attempt to handle the request let res = await next(); // if it's a 404, check the CMS for a redirect, do it last // because it's expensive if (res.status === 404) { let cmsRedirect = await checkCMSRedirects(request.url); if (cmsRedirect) { throw redirect(cmsRedirect, 302); } } return res; }; ``` **`context` parameter** When middleware is enabled, your application will use a different type of `context` parameter in your loaders and actions to provide better type safety. Instead of `AppLoadContext`, `context` will now be an instance of `ContextProvider` that you can use with type-safe contexts (similar to `React.createContext`): ```ts import { unstable_createContext } from "react-router"; import { Route } from "./+types/root"; import type { Session } from "./sessions.server"; import { getSession } from "./sessions.server"; let sessionContext = unstable_createContext<Session>(); const sessionMiddleware: Route.unstable_MiddlewareFunction = ({ context, request, }) => { let session = await getSession(request); context.set(sessionContext, session); // ^ must be of type Session }; // ... then in some downstream middleware const loggerMiddleware: Route.unstable_MiddlewareFunction = ({ context, request, }) => { let session = context.get(sessionContext); // ^ typeof Session console.log(session.get("userId"), request.method, request.url); }; // ... or some downstream loader export function loader({ context }: Route.LoaderArgs) { let session = context.get(sessionContext); let profile = await getProfile(session.get("userId")); return { profile }; } ``` If you are using a custom server with a `getLoadContext` function, the return value for initial context values passed from the server adapter layer is no longer an object and should now return an `unstable_InitialContext` (`Map<RouterContext, unknown>`): ```ts let adapterContext = unstable_createContext<MyAdapterContext>(); function getLoadContext(req, res): unstable_InitialContext { let map = new Map(); map.set(adapterContext, getAdapterContext(req)); return map; } ``` - Fix types for loaderData and actionData that contained `Record`s ([#&#8203;13139](https://redirect.github.com/remix-run/react-router/pull/13139)) UNSTABLE(BREAKING): `unstable_SerializesTo` added a way to register custom serialization types in Single Fetch for other library and framework authors like Apollo. It was implemented with branded type whose branded property that was made optional so that casting arbitrary values was easy: ```ts // without the brand being marked as optional let x1 = 42 as unknown as unstable_SerializesTo<number>; // ^^^^^^^^^^ // with the brand being marked as optional let x2 = 42 as unstable_SerializesTo<number>; ``` However, this broke type inference in `loaderData` and `actionData` for any `Record` types as those would now (incorrectly) match `unstable_SerializesTo`. This affected all users, not just those that depended on `unstable_SerializesTo`. To fix this, the branded property of `unstable_SerializesTo` is marked as required instead of optional. For library and framework authors using `unstable_SerializesTo`, you may need to add `as unknown` casts before casting to `unstable_SerializesTo`. - \[REMOVE] Remove middleware depth logic and always call middlware for all matches ([#&#8203;13172](https://redirect.github.com/remix-run/react-router/pull/13172)) - Fix single fetch `_root.data` requests when a `basename` is used ([#&#8203;12898](https://redirect.github.com/remix-run/react-router/pull/12898)) - Add `context` support to client side data routers (unstable) ([#&#8203;12941](https://redirect.github.com/remix-run/react-router/pull/12941)) Your application `loader` and `action` functions on the client will now receive a `context` parameter. This is an instance of `unstable_RouterContextProvider` that you use with type-safe contexts (similar to `React.createContext`) and is most useful with the corresponding `middleware`/`clientMiddleware` API's: ```ts import { unstable_createContext } from "react-router"; type User = { /*...*/ }; let userContext = unstable_createContext<User>(); function sessionMiddleware({ context }) { let user = await getUser(); context.set(userContext, user); } // ... then in some downstream loader function loader({ context }) { let user = context.get(userContext); let profile = await getProfile(user.id); return { profile }; } ``` Similar to server-side requests, a fresh `context` will be created per navigation (or `fetcher` call). If you have initial data you'd like to populate in the context for every request, you can provide an `unstable_getContext` function at the root of your app: - Library mode - `createBrowserRouter(routes, { unstable_getContext })` - Framework mode - `<HydratedRouter unstable_getContext>` This function should return an value of type `unstable_InitialContext` which is a `Map<unstable_RouterContext, unknown>` of context's and initial values: ```ts const loggerContext = unstable_createContext<(...args: unknown[]) => void>(); function logger(...args: unknown[]) { console.log(new Date.toISOString(), ...args); } function unstable_getContext() { let map = new Map(); map.set(loggerContext, logger); return map; } ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/SAP/ui5-webcomponents-react). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent c03e359 commit e7b529c

File tree

12 files changed

+188
-340
lines changed

12 files changed

+188
-340
lines changed

examples/nextjs-app/package-lock.json

Lines changed: 22 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nextjs-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@types/node": "22.13.8",
1616
"@types/react": "19.0.10",
1717
"@types/react-dom": "19.0.4",
18-
"eslint": "9.21.0",
18+
"eslint": "9.22.0",
1919
"eslint-config-next": "15.2.1",
2020
"next": "15.2.1",
2121
"react": "19.0.0",

examples/nextjs-pages/package-lock.json

Lines changed: 22 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nextjs-pages/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@types/node": "22.13.8",
1616
"@types/react": "19.0.10",
1717
"@types/react-dom": "19.0.4",
18-
"eslint": "9.21.0",
18+
"eslint": "9.22.0",
1919
"eslint-config-next": "15.2.1",
2020
"next": "15.2.1",
2121
"react": "19.0.0",

0 commit comments

Comments
 (0)