-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(server): merge _input_out when using standalone middlewares #4948
fix(server): merge _input_out when using standalone middlewares #4948
Conversation
There was a problem in the current implementation of `experimental_standaloneMiddleware` where the `input` type was not merged properly in the middleware chain. Example: ``` const t = initTRPC.create(); const schemaA = z.object({ valueA: z.string() }); const schemaB = z.object({ valueB: z.string() }); const mw1 = experimental_standaloneMiddleware<{ input: z.infer<typeof schemaA>; }>().create((opts) => { return opts.next(); }); const mw2 = experimental_standaloneMiddleware<{ input: z.infer<typeof schemaB>; }>().create((opts) => { return opts.next(); }); const combinedInputThatSatisfiesBothMiddlewares = z.object({ valueA: z.string(), valueB: z.string(), }) t.procedure .input(combinedInputThatSatisfiesBothMiddlewares) .use(mw1) .use(mw2) // <-- error: input only has { valueA: string } .query( ({ input: { valueA, valueB }, // <-- error: input only has { valueB: string } }) => `valueA: ${valueA}, valueB: ${valueB}`, ); ``` Funnily enough, since tRPC merges multiple .input() schemas under the hood, it was possible to never encounter this problem if you e.g. defined another .input() parser after a standalone middleware, e.g.: ``` t.input(onlyA).use(requiresAMiddleware).input(otherStuff).query(opts => /* opts.input has merged onlyA and otherStuff! */ ``` This commits fixes the problem by merging `_input_out` whenever necessary.
The latest updates on your projects. Learn more about Vercel for Git βοΈ
|
@jussisaurio is attempting to deploy a commit to the trpc Team on Vercel. A member of the Team first needs to authorize it. |
@@ -319,6 +319,42 @@ test('standalone middlewares that define the ctx/input they require and can be u | |||
tHumanWithMeta.procedure.use(shamefullyLogIfProcedureIsNotCoolMiddleware); | |||
}); | |||
|
|||
test('Fix #4947: standalone middlewares -- inputs are merged properly when using multiple standalone middlewares', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this here
https://github.com/trpc/trpc/tree/main/packages/tests/server/regression
47f2ce5
to
193d69c
Compare
demonstrates use of multiple middlewares.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
β€οΈ
please setup github sponsors so we can tip you :)
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@trpc/client](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.42.0`](https://renovatebot.com/diffs/npm/@trpc%2fclient/10.41.0/10.42.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fclient/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fclient/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fclient/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fclient/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/next](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.42.0`](https://renovatebot.com/diffs/npm/@trpc%2fnext/10.41.0/10.42.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fnext/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fnext/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fnext/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fnext/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/react-query](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.42.0`](https://renovatebot.com/diffs/npm/@trpc%2freact-query/10.41.0/10.42.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2freact-query/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2freact-query/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2freact-query/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2freact-query/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/server](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.42.0`](https://renovatebot.com/diffs/npm/@trpc%2fserver/10.41.0/10.42.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fserver/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fserver/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fserver/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fserver/10.41.0/10.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>trpc/trpc (@​trpc/client)</summary> ### [`v10.42.0`](https://togithub.com/trpc/trpc/releases/tag/v10.42.0) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.41.0...v10.42.0) ##### What's Changed - feat(server): allow a mix of text and files with fileUploadHandler by [@​jussisaurio](https://togithub.com/jussisaurio) in [trpc/trpc#4946 - fix(server): merge \_input_out when using standalone middlewares by [@​jussisaurio](https://togithub.com/jussisaurio) in [trpc/trpc#4948 **Full Changelog**: trpc/trpc@v10.41.0...v10.42.0 </details> --- ### Configuration π **Schedule**: Branch creation - "after 3am,before 9am" (UTC), Automerge - At any time (no schedule defined). π¦ **Automerge**: Enabled. β» **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. π **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ettorepuccetti/terrarossa). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@prisma/client](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma)) | [`5.5.0` -> `5.5.2`](https://renovatebot.com/diffs/npm/@prisma%2fclient/5.5.0/5.5.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@prisma%2fclient/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@prisma%2fclient/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@prisma%2fclient/5.5.0/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@prisma%2fclient/5.5.0/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/client](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.43.0`](https://renovatebot.com/diffs/npm/@trpc%2fclient/10.41.0/10.43.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fclient/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fclient/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fclient/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fclient/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/next](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.43.0`](https://renovatebot.com/diffs/npm/@trpc%2fnext/10.41.0/10.43.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fnext/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fnext/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fnext/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fnext/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/react-query](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.43.0`](https://renovatebot.com/diffs/npm/@trpc%2freact-query/10.41.0/10.43.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2freact-query/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2freact-query/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2freact-query/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2freact-query/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/server](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.41.0` -> `10.43.0`](https://renovatebot.com/diffs/npm/@trpc%2fserver/10.41.0/10.43.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fserver/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fserver/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fserver/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fserver/10.41.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`18.18.6` -> `18.18.7`](https://renovatebot.com/diffs/npm/@types%2fnode/18.18.6/18.18.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/18.18.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/18.18.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/18.18.6/18.18.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/18.18.6/18.18.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) | [`18.2.31` -> `18.2.33`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.31/18.2.33) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.31/18.2.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.31/18.2.33?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [chromatic](https://www.chromatic.com) ([source](https://togithub.com/chromaui/chromatic-cli)) | [`7.5.0` -> `7.5.4`](https://renovatebot.com/diffs/npm/chromatic/7.5.0/7.5.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/chromatic/7.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromatic/7.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromatic/7.5.0/7.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromatic/7.5.0/7.5.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [i18next-http-backend](https://togithub.com/i18next/i18next-http-backend) | [`2.2.2` -> `2.3.0`](https://renovatebot.com/diffs/npm/i18next-http-backend/2.2.2/2.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/i18next-http-backend/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/i18next-http-backend/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/i18next-http-backend/2.2.2/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/i18next-http-backend/2.2.2/2.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [prisma](https://www.prisma.io) ([source](https://togithub.com/prisma/prisma)) | [`5.5.0` -> `5.5.2`](https://renovatebot.com/diffs/npm/prisma/5.5.0/5.5.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prisma/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prisma/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prisma/5.5.0/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prisma/5.5.0/5.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [superjson](https://togithub.com/blitz-js/superjson) | [`2.1.0` -> `2.2.0`](https://renovatebot.com/diffs/npm/superjson/2.1.0/2.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/superjson/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/superjson/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/superjson/2.1.0/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/superjson/2.1.0/2.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [type-fest](https://togithub.com/sindresorhus/type-fest) | [`4.5.0` -> `4.6.0`](https://renovatebot.com/diffs/npm/type-fest/4.5.0/4.6.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/type-fest/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/type-fest/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/type-fest/4.5.0/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/type-fest/4.5.0/4.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prisma/prisma (@​prisma/client)</summary> ### [`v5.5.2`](https://togithub.com/prisma/prisma/releases/tag/5.5.2) [Compare Source](https://togithub.com/prisma/prisma/compare/5.5.1...5.5.2) Today, we are issuing the `5.5.2` patch release. #### Fix in Prisma CLI - [Error: sha256 checksum of https://binaries.prisma.sh/all_commits/475c616176945d72f4330c92801f0c5e6398dc0f/windows/query_en gine.dll.node.gz (zipped) should be 748d039badd0919d022fff7d554b66b6937b79035861a6ae9a80c5a95eee76f5 but is b867ad335ee6f58c6a38f665dd641c95e6adff3061f92b7613c62cae1c3362bb](https://togithub.com/prisma/prisma/issues/21616) ### [`v5.5.1`](https://togithub.com/prisma/prisma/releases/tag/5.5.1) [Compare Source](https://togithub.com/prisma/prisma/compare/5.5.0...5.5.1) Today, we are issuing the `5.5.1` patch release. #### Fix in Prisma Client - [5.5.0 regression: typescript error when trying to pass PrismaPlanetScale adapter to the constructor](https://togithub.com/prisma/prisma/issues/21613) </details> <details> <summary>trpc/trpc (@​trpc/client)</summary> ### [`v10.43.0`](https://togithub.com/trpc/trpc/releases/tag/v10.43.0) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.42.0...v10.43.0) ##### What's Changed - feat(`server`): extract `parseTRPCMessage` for 3rd party modules by [@​Guria](https://togithub.com/Guria) in [trpc/trpc#4872 ##### New Contributors - [@​Guria](https://togithub.com/Guria) made their first contribution in [trpc/trpc#4872 **Full Changelog**: trpc/trpc@v10.42.0...v10.43.0 ### [`v10.42.0`](https://togithub.com/trpc/trpc/releases/tag/v10.42.0) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.41.0...v10.42.0) #### What's Changed - feat(server): allow a mix of text and files with fileUploadHandler by [@​jussisaurio](https://togithub.com/jussisaurio) in [trpc/trpc#4946 - fix(server): merge \_input_out when using standalone middlewares by [@​jussisaurio](https://togithub.com/jussisaurio) in [trpc/trpc#4948 **Full Changelog**: trpc/trpc@v10.41.0...v10.42.0 </details> <details> <summary>chromaui/chromatic-cli (chromatic)</summary> ### [`v7.5.4`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v754-Thu-Oct-26-2023) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v7.5.3...v7.5.4) ##### π Bug Fix - Configure auto with `prerelease` setting and update readme [#​847](https://togithub.com/chromaui/chromatic-cli/pull/847) ([@​ghengeveld](https://togithub.com/ghengeveld)) ##### Authors: 1 - Gert Hengeveld ([@​ghengeveld](https://togithub.com/ghengeveld)) *** ### [`v7.5.3`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v753-Thu-Oct-26-2023) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v7.5.2...v7.5.3) ##### π Bug Fix - Fix config for Auto and add `next-release` tag to trigger a `next` release [#​846](https://togithub.com/chromaui/chromatic-cli/pull/846) ([@​ghengeveld](https://togithub.com/ghengeveld)) ##### Authors: 1 - Gert Hengeveld ([@​ghengeveld](https://togithub.com/ghengeveld)) *** ### [`v7.5.2`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v752-Thu-Oct-26-2023) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v7.5.1...v7.5.2) ##### π Bug Fix - Fix `ENOENT` when uploading stats file with `--upload-metadata` [#​843](https://togithub.com/chromaui/chromatic-cli/pull/843) ([@​ghengeveld](https://togithub.com/ghengeveld)) ##### Authors: 1 - Gert Hengeveld ([@​ghengeveld](https://togithub.com/ghengeveld)) *** ### [`v7.5.1`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v751-Thu-Oct-26-2023) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v7.5.0...v7.5.1) ##### π Bug Fix - Fix use of `LoggingRenderer` after bad merge [#​845](https://togithub.com/chromaui/chromatic-cli/pull/845) ([@​ghengeveld](https://togithub.com/ghengeveld)) ##### Authors: 1 - Gert Hengeveld ([@​ghengeveld](https://togithub.com/ghengeveld)) *** </details> <details> <summary>i18next/i18next-http-backend (i18next-http-backend)</summary> ### [`v2.3.0`](https://togithub.com/i18next/i18next-http-backend/blob/HEAD/CHANGELOG.md#230) [Compare Source](https://togithub.com/i18next/i18next-http-backend/compare/v2.2.2...v2.3.0) - update deps </details> <details> <summary>blitz-js/superjson (superjson)</summary> ### [`v2.2.0`](https://togithub.com/blitz-js/superjson/releases/tag/v2.2.0) [Compare Source](https://togithub.com/blitz-js/superjson/compare/v2.1.0...v2.2.0) #### What's Changed - Export SuperJSONResult type by [@​tmcw](https://togithub.com/tmcw) in [blitz-js/superjson#272 **Full Changelog**: blitz-js/superjson@v2.1.0...v2.2.0 </details> <details> <summary>sindresorhus/type-fest (type-fest)</summary> ### [`v4.6.0`](https://togithub.com/sindresorhus/type-fest/releases/tag/v4.6.0) [Compare Source](https://togithub.com/sindresorhus/type-fest/compare/v4.5.0...v4.6.0) ##### New types - [`ArrayValues`](https://togithub.com/sindresorhus/type-fest/blob/main/source/array-values.d.ts) ([#​720](https://togithub.com/sindresorhus/type-fest/issues/720)) [`6c76e4a`](https://togithub.com/sindresorhus/type-fest/commit/6c76e4a) - [`ArrayIndices`](https://togithub.com/sindresorhus/type-fest/blob/main/source/array-indices.d.ts) ([#​716](https://togithub.com/sindresorhus/type-fest/issues/716)) [`c330852`](https://togithub.com/sindresorhus/type-fest/commit/c330852) - [`SetParameterType`](https://togithub.com/sindresorhus/type-fest/blob/main/source/set-parameter-type.d.ts) ([#​722](https://togithub.com/sindresorhus/type-fest/issues/722)) [`9f2388d`](https://togithub.com/sindresorhus/type-fest/commit/9f2388d) ##### Fixes - `LastArrayElement`: Fix handling of tuple with spread elements ([#​727](https://togithub.com/sindresorhus/type-fest/issues/727)) [`9630089`](https://togithub.com/sindresorhus/type-fest/commit/9630089) - `PartialDeep`: Skip constructor ([#​730](https://togithub.com/sindresorhus/type-fest/issues/730)) [`75edeef`](https://togithub.com/sindresorhus/type-fest/commit/75edeef) - `ReadonlyDeep`: Skip constructor ([#​728](https://togithub.com/sindresorhus/type-fest/issues/728)) [`3ee234a`](https://togithub.com/sindresorhus/type-fest/commit/3ee234a) - `WritableDeep`: Fix array handling ([#​724](https://togithub.com/sindresorhus/type-fest/issues/724)) [`9baccc3`](https://togithub.com/sindresorhus/type-fest/commit/9baccc3) ##### Meta - Welcome [@​Emiyaaaaa](https://togithub.com/Emiyaaaaa) as a maintainer π [`8a52129`](https://togithub.com/sindresorhus/type-fest/commit/8a52129) </details> --- ### Configuration π **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). π¦ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β» **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://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/weareinreach/GLAAD). PR-URL: #224 Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Closes #4947
π― Changes
There was a problem in the current implementation of
experimental_standaloneMiddleware
where the
input
type was not merged properly in the middleware chain.Example:
Funnily enough, since tRPC merges multiple .input() schemas under the hood, it was
possible to never encounter this problem if you e.g. defined another .input() parser
after a standalone middleware, e.g.:
This commits fixes the problem by merging
_input_out
whenever necessary.β Checklist