-
-
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): delete the @trpc/core
-package
#5355
Conversation
This reverts commit 0496d8d.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Diagnostics ComparisonNumbers
Timings and averages
unstable timingsUnstable
|
This reverts commit 7a08201.
Maybe, | ||
TRPCErrorResponse, | ||
TRPCInferrable, | ||
} from '@trpc/server/unstable-core-do-not-import'; | ||
import { | ||
getCauseFromUnknown, | ||
isObject, | ||
type DefaultErrorShape, |
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.
thy is this not getting moved by the linter to the type imports?
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.
unsure, but it'll get fixed automatically once prettier updates :D
"pipeline": { | ||
"codegen-entrypoints": { "outputs": ["package.json", "links/**"] } | ||
} | ||
"pipeline": { "codegen-entrypoints": { "outputs": ["package.json"] } } |
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.
why was this changed?
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.
should there not be a /links
sub-entrypoint anymore?
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.
We don't need it - you can just import from @trpc/client
instead
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.
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 just want them to be clear to guide adapters -- people generally look at the adapters for reference. Maybe I overdid it here?
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’d lean that way and just use the index route. As long as we have named exports in /index.ts we can make sure to only use publically available stuff anyways
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.
Alright, I'll just merge this for now so we can draw a line in the sand, but let us do that in a follow-up
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.
Or maybe even make new packages for each? @trpc/adapter-fetch
etc?
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.
Yeah, that'd be even nicer - so much boilerplate though 😅
…-core # Conflicts: # .github/workflows/release-tmp.yml
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
@trpc/core
was a nice idea but the ecosystem doesn't seem ready for it.Especially with the combination of pnpm monorepos + TypeScript where it's tough not to get "The inferred type of 'xxxx' cannot be named without a reference to '.pnpm/@trpc+core@[.....]'. This is likely not portable. A type annotation is necessary"-style errors.
🎯 Changes
@trpc/core
back into the server-package@trpc/server/observable
out of core again since it's so isolated it could even be its own dedicated package@trpc/server/unstable-core-do-not-import
-export which should dissuade people not to use things from that entry pointReferences
@trpc/core
-package tmp-trpc-declaration-repro#7