TanStack / router

🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
https://tanstack.com/router
MIT License
8.28k stars 664 forks source link

fix: AnyMiddleware typings (createServerFn, with middleware) #2773

Closed kddige closed 1 week ago

kddige commented 1 week ago

AnyMiddleware had a strict requirement on AnyValidator that broke middleware types with serverFn.

Was introduced in: 4d7c669

closes: https://github.com/TanStack/router/issues/2769

nx-cloud[bot] commented 1 week ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9c46b10eb67588b221c79c44f14a65a8617f46ee. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build --parallel=3
✅ Successfully ran 1 target - [`nx run-many --target=build --exclude=examples/** --exclude=e2e/**`](https://cloud.nx.app/runs/T5I4kxa4I6?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

pkg-pr-new[bot] commented 1 week ago

Open in Stackblitz

More templates

- [tanstack-router-react-example-authenticated-routes](https://pkg.pr.new/template/5acf6443-ec38-4ec6-ab52-d87a2952ab66) - [tanstack-router-react-example-basic](https://pkg.pr.new/template/e63453a7-9365-44f6-9964-ffd73bda4fc1) - [tanstack-router-react-example-basic-default-search-params](https://pkg.pr.new/template/021d9e3c-7253-470b-8084-b2ca43996123) - [tanstack-router-react-example-basic-file-based](https://pkg.pr.new/template/f62c8683-40ea-4dc1-975a-849975778c6e) - [tanstack-router-react-example-basic-file-based-codesplitting](https://pkg.pr.new/template/0c1bc703-ba90-44fe-8ab9-4aadf75566b6) - [tanstack-router-react-example-react-query](https://pkg.pr.new/template/6812aa3a-aff4-4490-aaad-c87bc334ef69) - [tanstack-router-react-example-basic-react-query-file-based](https://pkg.pr.new/template/bf0ab282-3893-45b3-b7ac-bdece6262a58) - [tanstack-router-react-example-basic-ssr-file-based](https://pkg.pr.new/template/092ecd57-43a7-4e67-8e8e-7f844b2f781d) - [tanstack-router-react-example-basic-ssr-streaming-file-based](https://pkg.pr.new/template/34a8d9e1-7eeb-4c88-8780-e36ae93f1f07) - [tanstack-router-react-example-basic-virtual-file-based](https://pkg.pr.new/template/6b3dfed4-9259-4c95-9147-02b224d26ddf) - [tanstack-router-react-example-basic-virtual-inside-file-based](https://pkg.pr.new/template/6aa684ab-dd24-4181-be0d-b7afd5f9411f) - [tanstack-router-react-example-deferred-data](https://pkg.pr.new/template/52688d6d-7849-4e33-ba62-941a63b54072) - [tanstack-router-react-example-kitchen-sink](https://pkg.pr.new/template/deef6b0c-3629-4f82-9f19-6b4a7c2b5b7d) - [tanstack-router-react-example-kitchen-sink-file-based](https://pkg.pr.new/template/4e695754-815a-47cd-8466-809bd375536c) - [tanstack-router-react-example-kitchen-sink-react-query](https://pkg.pr.new/template/83837d1f-bd84-424e-aa3a-ffe39c5e3cef) - [tanstack-router-react-example-kitchen-sink-react-query-file-based](https://pkg.pr.new/template/08039bc0-edc9-4510-8ef0-834dabb941cf) - [tanstack-router-react-example-large-file-based](https://pkg.pr.new/template/4ebacff0-f085-4dd3-a14c-66123f937939) - [tanstack-router-react-example-location-masking](https://pkg.pr.new/template/6ded8e99-a4ac-4fdf-95af-420e70d748b8) - [tanstack-router-react-example-navigation-blocking](https://pkg.pr.new/template/4c2ef78f-e7f6-4190-8866-6ed70f76b56d) - [tanstack-router-react-example-quickstart](https://pkg.pr.new/template/fcc8f8cd-e0c4-44ea-ba11-cea3393748eb) - [tanstack-router-react-example-quickstart-esbuild-file-based](https://pkg.pr.new/template/114b28bb-5c42-406c-905f-8cefd9c9524b) - [tanstack-router-react-example-quickstart-file-based](https://pkg.pr.new/template/1c743612-40a7-4c5e-842b-2184bf57e2eb) - [tanstack-router-react-example-quickstart-rspack-file-based](https://pkg.pr.new/template/2838c584-6b20-425a-b5de-5c7c5c0d88a1) - [tanstack-router-react-example-quickstart-webpack-file-based](https://pkg.pr.new/template/7d3398b0-396c-4dcf-8696-3152311059f5) - [router-monorepo-react-query](https://pkg.pr.new/template/6c48bd54-58b4-4bc5-af13-9727897e1ead) - [router-mono-simple](https://pkg.pr.new/template/f591aa53-f287-42d0-8455-ad4b94160a3c) - [tanstack-router-react-example-scroll-restoration](https://pkg.pr.new/template/d8808a34-0fb5-4b56-b5d6-0f268bb9cb8f) - [tanstack-search-validator-adapters](https://pkg.pr.new/template/7497ddca-0132-4bbf-8add-0e3d81e3c202) - [tanstack-start-example-basic](https://pkg.pr.new/template/097175e8-e871-4508-9d93-ef6e8a04c117) - [tanstack-start-example-basic-auth](https://pkg.pr.new/template/bd142ed3-bc5a-40cc-9198-3550685af13a) - [tanstack-start-example-basic-react-query](https://pkg.pr.new/template/df02fa8d-e4c5-48d4-9ac7-ee3a92131f68) - [tanstack-start-example-basic-rsc](https://pkg.pr.new/template/5e34ba6f-ee3f-4a8a-a691-e3a1965a3552) - [tanstack-start-example-clerk-basic](https://pkg.pr.new/template/8ca5c4ea-fa42-43c1-bc01-7b4a2d6edebb) - [tanstack-start-example-convex-trellaux](https://pkg.pr.new/template/398b8cf9-7cf6-425d-8ff0-c99f2c9cf5a2) - [tanstack-start-example-supabase-basic](https://pkg.pr.new/template/11988124-9fc1-46e0-bb3c-e013d7baa1bd) - [tanstack-start-example-counter](https://pkg.pr.new/template/e7ca9c18-650b-4c31-9b69-ec768d7259c8) - [tanstack-start-example-trellaux](https://pkg.pr.new/template/0c66cae5-aa64-4889-8967-49b017fc9ce6) - [tanstack-router-react-example-with-framer-motion](https://pkg.pr.new/template/bb4497aa-7614-4bbf-8013-73b3f9cab7dc) - [tanstack-router-react-example-with-trpc](https://pkg.pr.new/template/3f0e1b7c-65e8-413c-97cb-7a52ca115dc6) - [tanstack-router-react-example-with-trpc-react-query](https://pkg.pr.new/template/5cc2ea1e-6a13-4231-a55f-4412f11d4a9e)

@tanstack/arktype-adapter

``` pnpm add https://pkg.pr.new/@tanstack/arktype-adapter@2773 ```

@tanstack/create-router

``` pnpm add https://pkg.pr.new/@tanstack/create-router@2773 ```

@tanstack/history

``` pnpm add https://pkg.pr.new/@tanstack/history@2773 ```

@tanstack/eslint-plugin-router

``` pnpm add https://pkg.pr.new/@tanstack/eslint-plugin-router@2773 ```

@tanstack/react-cross-context

``` pnpm add https://pkg.pr.new/@tanstack/react-cross-context@2773 ```

@tanstack/react-router

``` pnpm add https://pkg.pr.new/@tanstack/react-router@2773 ```

@tanstack/react-router-with-query

``` pnpm add https://pkg.pr.new/@tanstack/react-router-with-query@2773 ```

@tanstack/router-cli

``` pnpm add https://pkg.pr.new/@tanstack/router-cli@2773 ```

@tanstack/router-devtools

``` pnpm add https://pkg.pr.new/@tanstack/router-devtools@2773 ```

@tanstack/router-generator

``` pnpm add https://pkg.pr.new/@tanstack/router-generator@2773 ```

@tanstack/router-plugin

``` pnpm add https://pkg.pr.new/@tanstack/router-plugin@2773 ```

@tanstack/router-vite-plugin

``` pnpm add https://pkg.pr.new/@tanstack/router-vite-plugin@2773 ```

@tanstack/start

``` pnpm add https://pkg.pr.new/@tanstack/start@2773 ```

@tanstack/start-vite-plugin

``` pnpm add https://pkg.pr.new/@tanstack/start-vite-plugin@2773 ```

@tanstack/valibot-adapter

``` pnpm add https://pkg.pr.new/@tanstack/valibot-adapter@2773 ```

@tanstack/virtual-file-routes

``` pnpm add https://pkg.pr.new/@tanstack/virtual-file-routes@2773 ```

@tanstack/zod-adapter

``` pnpm add https://pkg.pr.new/@tanstack/zod-adapter@2773 ```

commit: 9c46b10