-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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): fix regression introduced by #5017 #5039
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Alternative simpler implementation that also works (works i.e. does not break tests):
I am not exactly sure why this is 🤷 |
cc @jussisaurio could you have a look at the conflicts? 🙏 |
f3e303b
to
eec398d
Compare
Feel a bit bad about these last few bugs (the one with As a general note, I find the current propagation of types in tRPC's middlewares really, really hard to reason about (and, consequently, to make changes to it) and I think @Nick-Lucas probably feels the same way as well. Wondering if for a future major version it might make sense to think about a full rewrite of the middleware system? |
Yeah so I wrote this earlier in the year: https://github.com/trpc/trpc/pull/4239/files I then abandoned it because I was trying to handle all the corner cases and it just was not working out, for identical reasons to our t.middleware and standalone middleware causing problems I ran into all sorts of problems with the chainability of two declared types. The problem is typescript's type system isn't really built for combining static definitions like So I don't think a re-write of middlewares will be a solution, as part of my problem implementing this was the complexity of types, and we might be able to have a better crack at this in v11 with the simplification work that's been done. But otherwise I suggest we promote the factory/higher-order-function approach instead of creating an API to generate a middleware, because I've found that behaves much more consistently |
expectTypeOf<Input>().toEqualTypeOf<{ name: string }>(); | ||
expectTypeOf<Output>().toEqualTypeOf<{ | ||
name: string; | ||
[symbol]: true; |
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.
Having a hard time with this... why are we expecting inferred outputs to contain symbols (which is not JSON serializable)? Plus, the input
(which the query returns) doesn't contain the symbol, ctx
does. And if you look at ctx
inside the query, it's inferred correctly
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.
I messed up the test, it actually works as intended, sorry :D
[![Mend Renovate logo banner](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.43.3` -> `10.43.4`](https://renovatebot.com/diffs/npm/@trpc%2fclient/10.43.3/10.43.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fclient/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fclient/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fclient/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fclient/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/next](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.4`](https://renovatebot.com/diffs/npm/@trpc%2fnext/10.43.3/10.43.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fnext/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fnext/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fnext/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fnext/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/react-query](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.4`](https://renovatebot.com/diffs/npm/@trpc%2freact-query/10.43.3/10.43.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2freact-query/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2freact-query/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2freact-query/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2freact-query/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/server](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.4`](https://renovatebot.com/diffs/npm/@trpc%2fserver/10.43.3/10.43.4) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fserver/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fserver/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fserver/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fserver/10.43.3/10.43.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>trpc/trpc (@​trpc/client)</summary> ### [`v10.43.4`](https://togithub.com/trpc/trpc/releases/tag/v10.43.4) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.43.3...v10.43.4) ##### What's Changed - fix(client+server): avoid losing type information w/ index signatures by [@​jussisaurio](https://togithub.com/jussisaurio) in [https://github.com/trpc/trpc/pull/5035](https://togithub.com/trpc/trpc/pull/5035) - fix(server): fix type merging regression introduced by [#​5017](https://togithub.com/trpc/trpc/issues/5017) by [@​jussisaurio](https://togithub.com/jussisaurio) & [@​KATT](https://togithub.com/KATT) in [https://github.com/trpc/trpc/pull/5039](https://togithub.com/trpc/trpc/pull/5039) ##### New Contributors - [@​futantan](https://togithub.com/futantan) made their first contribution in [https://github.com/trpc/trpc/pull/5029](https://togithub.com/trpc/trpc/pull/5029) - [@​nomyfan](https://togithub.com/nomyfan) made their first contribution in [https://github.com/trpc/trpc/pull/5031](https://togithub.com/trpc/trpc/pull/5031) - [@​zak1999](https://togithub.com/zak1999) made their first contribution in [https://github.com/trpc/trpc/pull/5030](https://togithub.com/trpc/trpc/pull/5030) - [@​leothorp](https://togithub.com/leothorp) made their first contribution in [https://github.com/trpc/trpc/pull/5043](https://togithub.com/trpc/trpc/pull/5043) - [@​jChapman](https://togithub.com/jChapman) made their first contribution in [https://github.com/trpc/trpc/pull/5033](https://togithub.com/trpc/trpc/pull/5033) **Full Changelog**: trpc/trpc@v10.43.3...v10.43.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 3am,before 9am" (UTC), Automerge - "after 3am,before 9am" (UTC). 🚦 **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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate logo banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@crowdin/crowdin-api-client](https://togithub.com/crowdin/crowdin-api-client-js) | [`1.27.0` -> `1.28.0`](https://renovatebot.com/diffs/npm/@crowdin%2fcrowdin-api-client/1.27.0/1.28.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@crowdin%2fcrowdin-api-client/1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@crowdin%2fcrowdin-api-client/1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@crowdin%2fcrowdin-api-client/1.27.0/1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@crowdin%2fcrowdin-api-client/1.27.0/1.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@tabler/icons-react](https://tabler-icons.io) ([source](https://togithub.com/tabler/tabler-icons)) | [`2.40.0` -> `2.41.0`](https://renovatebot.com/diffs/npm/@tabler%2ficons-react/2.40.0/2.41.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@tabler%2ficons-react/2.41.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tabler%2ficons-react/2.41.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tabler%2ficons-react/2.40.0/2.41.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tabler%2ficons-react/2.40.0/2.41.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/client](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.6`](https://renovatebot.com/diffs/npm/@trpc%2fclient/10.43.3/10.43.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fclient/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fclient/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fclient/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fclient/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/next](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.6`](https://renovatebot.com/diffs/npm/@trpc%2fnext/10.43.3/10.43.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fnext/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fnext/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fnext/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fnext/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/react-query](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.6`](https://renovatebot.com/diffs/npm/@trpc%2freact-query/10.43.3/10.43.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2freact-query/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2freact-query/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2freact-query/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2freact-query/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@trpc/server](https://trpc.io) ([source](https://togithub.com/trpc/trpc)) | [`10.43.3` -> `10.43.6`](https://renovatebot.com/diffs/npm/@trpc%2fserver/10.43.3/10.43.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@trpc%2fserver/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@trpc%2fserver/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@trpc%2fserver/10.43.3/10.43.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@trpc%2fserver/10.43.3/10.43.6?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)) | [`20.9.1` -> `20.9.2`](https://renovatebot.com/diffs/npm/@types%2fnode/20.9.1/20.9.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.9.1/20.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.9.1/20.9.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [chromatic](https://www.chromatic.com) ([source](https://togithub.com/chromaui/chromatic-cli)) | [`9.0.0` -> `9.1.0`](https://renovatebot.com/diffs/npm/chromatic/9.0.0/9.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/chromatic/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/chromatic/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/chromatic/9.0.0/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/chromatic/9.0.0/9.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [eslint](https://eslint.org) ([source](https://togithub.com/eslint/eslint)) | [`8.53.0` -> `8.54.0`](https://renovatebot.com/diffs/npm/eslint/8.53.0/8.54.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint/8.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint/8.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint/8.53.0/8.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint/8.53.0/8.54.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [tsx](https://togithub.com/privatenumber/tsx) | [`4.1.2` -> `4.1.3`](https://renovatebot.com/diffs/npm/tsx/4.1.2/4.1.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/tsx/4.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/tsx/4.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/tsx/4.1.2/4.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/tsx/4.1.2/4.1.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [type-fest](https://togithub.com/sindresorhus/type-fest) | [`4.7.1` -> `4.8.1`](https://renovatebot.com/diffs/npm/type-fest/4.7.1/4.8.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/type-fest/4.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/type-fest/4.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/type-fest/4.7.1/4.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/type-fest/4.7.1/4.8.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>crowdin/crowdin-api-client-js (@​crowdin/crowdin-api-client)</summary> ### [`v1.28.0`](https://togithub.com/crowdin/crowdin-api-client-js/releases/tag/1.28.0) [Compare Source](https://togithub.com/crowdin/crowdin-api-client-js/compare/1.27.0...1.28.0) #### What's Changed - fix: print full error message for stringBatchOperations errors by [@​kevinb-tryjeeves](https://togithub.com/kevinb-tryjeeves) in [https://github.com/crowdin/crowdin-api-client-js/pull/340](https://togithub.com/crowdin/crowdin-api-client-js/pull/340) - fix: update TaskModel types by [@​kevinb-tryjeeves](https://togithub.com/kevinb-tryjeeves) in [https://github.com/crowdin/crowdin-api-client-js/pull/342](https://togithub.com/crowdin/crowdin-api-client-js/pull/342) - feat: Strings based API methods by [@​yevheniyJ](https://togithub.com/yevheniyJ) in [https://github.com/crowdin/crowdin-api-client-js/pull/328](https://togithub.com/crowdin/crowdin-api-client-js/pull/328) **Full Changelog**: crowdin/crowdin-api-client-js@1.27.0...1.28.0 </details> <details> <summary>tabler/tabler-icons (@​tabler/icons-react)</summary> ### [`v2.41.0`](https://togithub.com/tabler/tabler-icons/releases/tag/v2.41.0): Release 2.41.0 [Compare Source](https://togithub.com/tabler/tabler-icons/compare/v2.40.0...v2.41.0) <img src="https://github.com/tabler/tabler-icons/assets/1282324/a817af30-0f1f-44ca-b1e3-b8900cb70880" width="584" alt="" /> ##### 18 new icons: - `background` - `brand-kako-talk` - `calendar-clock` - `calendar-month` - `calendar-week` - `christmas-ball` - `credit-card-pay` - `credit-card-refund` - `currency-xrp` - `desk` - `direction-arrows` - `mood-look-down` - `mood-look-up` - `mood-puzzled` - `shovel-pitchforks` - `skew-x` - `skew-y` - `sticker-2` Fixed icons: `brand-notion` </details> <details> <summary>trpc/trpc (@​trpc/client)</summary> ### [`v10.43.6`](https://togithub.com/trpc/trpc/releases/tag/v10.43.6) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.43.5...v10.43.6) ##### What's Changed - fix(server): middleware input requirements shouldn't widen procedure inputs by [@​jussisaurio](https://togithub.com/jussisaurio) in [https://github.com/trpc/trpc/pull/5057](https://togithub.com/trpc/trpc/pull/5057) **Full Changelog**: trpc/trpc@v10.43.5...v10.43.6 ### [`v10.43.5`](https://togithub.com/trpc/trpc/releases/tag/v10.43.5) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.43.4...v10.43.5) ##### What's Changed - patch(server): deprecate `inferAsyncReturnType` by [@​KATT](https://togithub.com/KATT) in [https://github.com/trpc/trpc/pull/5052](https://togithub.com/trpc/trpc/pull/5052) - fix(client+server): fix output serialization of records by [@​jussisaurio](https://togithub.com/jussisaurio) in [https://github.com/trpc/trpc/pull/5058](https://togithub.com/trpc/trpc/pull/5058) **Full Changelog**: trpc/trpc@v10.43.4...v10.43.5 ### [`v10.43.4`](https://togithub.com/trpc/trpc/releases/tag/v10.43.4) [Compare Source](https://togithub.com/trpc/trpc/compare/v10.43.3...v10.43.4) ##### What's Changed - fix(client+server): avoid losing type information w/ index signatures by [@​jussisaurio](https://togithub.com/jussisaurio) in [https://github.com/trpc/trpc/pull/5035](https://togithub.com/trpc/trpc/pull/5035) - fix(server): fix type merging regression introduced by [#​5017](https://togithub.com/trpc/trpc/issues/5017) by [@​jussisaurio](https://togithub.com/jussisaurio) & [@​KATT](https://togithub.com/KATT) in [https://github.com/trpc/trpc/pull/5039](https://togithub.com/trpc/trpc/pull/5039) ##### New Contributors - [@​futantan](https://togithub.com/futantan) made their first contribution in [https://github.com/trpc/trpc/pull/5029](https://togithub.com/trpc/trpc/pull/5029) - [@​nomyfan](https://togithub.com/nomyfan) made their first contribution in [https://github.com/trpc/trpc/pull/5031](https://togithub.com/trpc/trpc/pull/5031) - [@​zak1999](https://togithub.com/zak1999) made their first contribution in [https://github.com/trpc/trpc/pull/5030](https://togithub.com/trpc/trpc/pull/5030) - [@​leothorp](https://togithub.com/leothorp) made their first contribution in [https://github.com/trpc/trpc/pull/5043](https://togithub.com/trpc/trpc/pull/5043) - [@​jChapman](https://togithub.com/jChapman) made their first contribution in [https://github.com/trpc/trpc/pull/5033](https://togithub.com/trpc/trpc/pull/5033) **Full Changelog**: trpc/trpc@v10.43.3...v10.43.4 </details> <details> <summary>chromaui/chromatic-cli (chromatic)</summary> ### [`v9.1.0`](https://togithub.com/chromaui/chromatic-cli/blob/HEAD/CHANGELOG.md#v910-Fri-Nov-17-2023) [Compare Source](https://togithub.com/chromaui/chromatic-cli/compare/v9.0.0...v9.1.0) ##### 🚀 Enhancement - Don't write `chromatic.log` by default, allow configuring log files [#​855](https://togithub.com/chromaui/chromatic-cli/pull/855) ([@​ghengeveld](https://togithub.com/ghengeveld)) ##### 🐛 Bug Fix - Redact `userToken` in diagnostics and fatal error output [#​859](https://togithub.com/chromaui/chromatic-cli/pull/859) ([@​ghengeveld](https://togithub.com/ghengeveld)) - Bump zod from 3.22.2 to 3.22.3 [#​830](https://togithub.com/chromaui/chromatic-cli/pull/830) ([@​dependabot\[bot\]](https://togithub.com/dependabot\[bot]) [@​thafryer](https://togithub.com/thafryer)) - Bump word-wrap from 1.2.3 to 1.2.5 [#​804](https://togithub.com/chromaui/chromatic-cli/pull/804) ([@​dependabot\[bot\]](https://togithub.com/dependabot\[bot]) [@​thafryer](https://togithub.com/thafryer)) - Bump get-func-name from 2.0.0 to 2.0.2 [#​824](https://togithub.com/chromaui/chromatic-cli/pull/824) ([@​dependabot\[bot\]](https://togithub.com/dependabot\[bot]) [@​thafryer](https://togithub.com/thafryer)) - Bump [@​babel/traverse](https://togithub.com/babel/traverse) from 7.16.3 to 7.23.2 in /subdir [#​838](https://togithub.com/chromaui/chromatic-cli/pull/838) ([@​dependabot\[bot\]](https://togithub.com/dependabot\[bot]) [@​thafryer](https://togithub.com/thafryer)) - Fix changelog for 9.0.0 and update auto config to prevent issue in the future [#​854](https://togithub.com/chromaui/chromatic-cli/pull/854) ([@​ghengeveld](https://togithub.com/ghengeveld)) #####⚠️ Pushed to `main` - Drop next-release label ([@​ghengeveld](https://togithub.com/ghengeveld)) ##### Authors: 3 - [@​dependabot\[bot\]](https://togithub.com/dependabot\[bot]) - Gert Hengeveld ([@​ghengeveld](https://togithub.com/ghengeveld)) - Jarel Fryer ([@​thafryer](https://togithub.com/thafryer)) *** </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v8.54.0`](https://togithub.com/eslint/eslint/releases/tag/v8.54.0) [Compare Source](https://togithub.com/eslint/eslint/compare/v8.53.0...v8.54.0) #### Features - [`a7a883b`](https://togithub.com/eslint/eslint/commit/a7a883bd6ba4f140b60cbbb2be5b53d750f6c8db) feat: for-direction rule add check for condition in reverse order ([#​17755](https://togithub.com/eslint/eslint/issues/17755)) (Angelo Annunziata) - [`1452dc9`](https://togithub.com/eslint/eslint/commit/1452dc9f12c45c05d7c569f737221f0d988ecef1) feat: Add suggestions to no-console ([#​17680](https://togithub.com/eslint/eslint/issues/17680)) (Joel Mathew Koshy) - [`21ebf8a`](https://togithub.com/eslint/eslint/commit/21ebf8a811be9f4b009cf70a10be5062d4fdc736) feat: update `no-array-constructor` rule ([#​17711](https://togithub.com/eslint/eslint/issues/17711)) (Francesco Trotta) #### Bug Fixes - [`98926e6`](https://togithub.com/eslint/eslint/commit/98926e6e7323e5dd12a9f016cb558144296665af) fix: Ensure that extra data is not accidentally stored in the cache file ([#​17760](https://togithub.com/eslint/eslint/issues/17760)) (Milos Djermanovic) - [`e8cf9f6`](https://togithub.com/eslint/eslint/commit/e8cf9f6a524332293f8b2c90a2db4a532e47d919) fix: Make dark scroll bar in dark theme ([#​17753](https://togithub.com/eslint/eslint/issues/17753)) (Pavel) - [`3cbeaad`](https://togithub.com/eslint/eslint/commit/3cbeaad7b943c153937ce34365cec2c406f2b98b) fix: Use `cwd` constructor option as config `basePath` in Linter ([#​17705](https://togithub.com/eslint/eslint/issues/17705)) (Milos Djermanovic) #### Documentation - [`becfdd3`](https://togithub.com/eslint/eslint/commit/becfdd39b25d795e56c9a13eb3e77af6b9c86e8a) docs: Make clear when rules are removed ([#​17728](https://togithub.com/eslint/eslint/issues/17728)) (Nicholas C. Zakas) - [`05d6e99`](https://togithub.com/eslint/eslint/commit/05d6e99153ed6d94eb30f46c57609371918a41f3) docs: update "Submit a Pull Request" page ([#​17712](https://togithub.com/eslint/eslint/issues/17712)) (Francesco Trotta) - [`eb2279e`](https://togithub.com/eslint/eslint/commit/eb2279e5148cee8fdea7dae614f4f8af7a2d06c3) docs: display info about deprecated rules ([#​17749](https://togithub.com/eslint/eslint/issues/17749)) (Percy Ma) - [`d245326`](https://togithub.com/eslint/eslint/commit/d24532601e64714ac5d08507e05aa5c14ecd1d5a) docs: Correct working in migrating plugin docs ([#​17722](https://togithub.com/eslint/eslint/issues/17722)) (Filip Tammergård) #### Chores - [`d644de9`](https://togithub.com/eslint/eslint/commit/d644de9a4b593b565617303a095bc9aa69e7b768) chore: upgrade [@​eslint/js](https://togithub.com/eslint/js)[@​8](https://togithub.com/8).54.0 ([#​17773](https://togithub.com/eslint/eslint/issues/17773)) (Milos Djermanovic) - [`1e6e314`](https://togithub.com/eslint/eslint/commit/1e6e31415cc429a3a9fc64b2ec03df0e0ec0c91b) chore: package.json update for [@​eslint/js](https://togithub.com/eslint/js) release (Jenkins) - [`6fb8805`](https://togithub.com/eslint/eslint/commit/6fb8805310afe7476d6c404f172177a6d15fcf11) chore: Fixed grammar in issue_templates/rule_change ([#​17770](https://togithub.com/eslint/eslint/issues/17770)) (Joel Mathew Koshy) - [`85db724`](https://togithub.com/eslint/eslint/commit/85db7243ddb8706ed60ab64a7ddf604d0d7de493) chore: upgrade `markdownlint` to 0.31.1 ([#​17754](https://togithub.com/eslint/eslint/issues/17754)) (Nitin Kumar) - [`6d470d2`](https://togithub.com/eslint/eslint/commit/6d470d2e74535761bd56dcb1c021b463ef9e8a9c) chore: update dependency recast to ^0.23.0 ([#​17736](https://togithub.com/eslint/eslint/issues/17736)) (renovate\[bot]) - [`b7121b5`](https://togithub.com/eslint/eslint/commit/b7121b590d578c9c9b38ee481313317f30e54817) chore: update dependency markdownlint-cli to ^0.37.0 ([#​17735](https://togithub.com/eslint/eslint/issues/17735)) (renovate\[bot]) - [`633b9a1`](https://togithub.com/eslint/eslint/commit/633b9a19752b6a22ab4d6c824f27a75ac0e4151b) chore: update dependency regenerator-runtime to ^0.14.0 ([#​17739](https://togithub.com/eslint/eslint/issues/17739)) (renovate\[bot]) - [`acac16f`](https://togithub.com/eslint/eslint/commit/acac16fdf8540f7ba86cf637e3c1b253bd35a268) chore: update dependency vite-plugin-commonjs to ^0.10.0 ([#​17740](https://togithub.com/eslint/eslint/issues/17740)) (renovate\[bot]) - [`ba8ca7e`](https://togithub.com/eslint/eslint/commit/ba8ca7e3debcba68ee7015b9221cf5acd7870206) chore: add .github/renovate.json5 ([#​17567](https://togithub.com/eslint/eslint/issues/17567)) (Josh Goldberg ✨) </details> <details> <summary>privatenumber/tsx (tsx)</summary> ### [`v4.1.3`](https://togithub.com/privatenumber/tsx/releases/tag/v4.1.3) [Compare Source](https://togithub.com/privatenumber/tsx/compare/v4.1.2...v4.1.3) ##### Bug Fixes - **cache:** version import transformer ([7676143](https://togithub.com/privatenumber/tsx/commit/7676143c291c84e0477c669c792aa16edc0a55c0)) - **source map:** handle source map in middle of file ([#​392](https://togithub.com/privatenumber/tsx/issues/392)) ([497f69a](https://togithub.com/privatenumber/tsx/commit/497f69a65bc12b961c1114cd036063721cf6aa94)) ##### Performance Improvements - **dynamic import:** use string check instead of regex ([f1088e6](https://togithub.com/privatenumber/tsx/commit/f1088e67652956be9d629e963f49573c4603d46c)) *** This release is also available on: - [npm package (@​latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.1.3) </details> <details> <summary>sindresorhus/type-fest (type-fest)</summary> ### [`v4.8.1`](https://togithub.com/sindresorhus/type-fest/releases/tag/v4.8.1) [Compare Source](https://togithub.com/sindresorhus/type-fest/compare/v4.8.0...v4.8.1) - `Jsonify`: Fix usage with readonly array [`f8019c2`](https://togithub.com/sindresorhus/type-fest/commit/f8019c2) - Revert "Add `Element` to type `BuiltIns` ([#​745](https://togithub.com/sindresorhus/type-fest/issues/745))" [`1b25feb`](https://togithub.com/sindresorhus/type-fest/commit/1b25feb) - It caused problems when `DOM` types are not available. ### [`v4.8.0`](https://togithub.com/sindresorhus/type-fest/releases/tag/v4.8.0) [Compare Source](https://togithub.com/sindresorhus/type-fest/compare/v4.7.1...v4.8.0) - `PickDeep`: Support interface ([#​755](https://togithub.com/sindresorhus/type-fest/issues/755)) [`1c65935`](https://togithub.com/sindresorhus/type-fest/commit/1c65935) - `Paths`: Support interface ([#​746](https://togithub.com/sindresorhus/type-fest/issues/746)) [`8fa831e`](https://togithub.com/sindresorhus/type-fest/commit/8fa831e) - `ObjectValue`: Support any kind of number index ([#​753](https://togithub.com/sindresorhus/type-fest/issues/753)) [`972815c`](https://togithub.com/sindresorhus/type-fest/commit/972815c) - `Class`: Fix type inference ([#​701](https://togithub.com/sindresorhus/type-fest/issues/701)) [`7294cf0`](https://togithub.com/sindresorhus/type-fest/commit/7294cf0) - `DelimiterCasedPropertiesDeep`: Improve array handling ([#​744](https://togithub.com/sindresorhus/type-fest/issues/744)) [`59411c8`](https://togithub.com/sindresorhus/type-fest/commit/59411c8) - ` PartialDeep `: Don't recurse into `HTMLElement` ([#​745](https://togithub.com/sindresorhus/type-fest/issues/745)) [`d42ea80`](https://togithub.com/sindresorhus/type-fest/commit/d42ea80) - Add `preserveConsecutiveUppercase` to `PascalCase` and friends ([#​749](https://togithub.com/sindresorhus/type-fest/issues/749)) [`e58127a`](https://togithub.com/sindresorhus/type-fest/commit/e58127a) </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: #253 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 #5037
🎯 Changes
There were two bug reports about 10.43.3, the cause of which can be traced back to PR #5017 (which fixed another inference bug... seeing a pattern here)
I think in both bug reports the cause has something to do with using generics to construct either tRPC instances or tRPC middlewares using a type parameter that is not constrained to
object
, which causes TS to infer incompatible types for middleware builders afterOverwrite
was changed to only do the key-wise merge on types that extendobject
.This PR basically reverts the changes in #5017 and replaces it with a check to see whether
TWith
(the type that overwrites the target type) extends a JS primitive, and if so, wholly replaces it. This achieves the intended end result of #5017 while (hopefully) fixing the issues introduced in 10.43.3 and reported in #5037.This PR includes a test with which I was able to reproduce a compile error similar to the one(s) reported in #5037, and which was fixed with the added changes.
✅ Checklist