Skip to content

feat: create @trpc/core-package #5210

Closed

Description

@KATT

Describe the feature you'd like to request

We have a bunch of internals that are currently exposed publicly in @trpc/server & @trpc/client.

Describe the solution you'd like to see

I think we should move a bunch of stuff inside a @trpc/core-package

  • The @trpc/core-package is a dependency of both @trpc/server and @trpc/client
  • Users never install @trpc/core - they install the client and the server separately
  • Things that we want users to be able to access directly in their apps we re-export in the server/client-packages

The things I think should be moved to a @trpc/core-package:

Definitely
  • The procedure builder
  • Middlewares
  • initTRPC() - re-exported from @trpc/server
  • AnyRouter, etc - some re-exported
  • Root config
  • Observables - re-exported
  • [..]?
Maybe?
  • RPC-specs, re-exported
  • Error formatting - it as a HTTP / adapter thing
  • Transformers - it's a HTTP / adapter thing

Describe alternate solutions

See #5101 where we moved a bunch of internal stuff to a specific entrypoint. It doesn't actually stop autocompletion for users and it is a bit messy

Additional information

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR implementing this feature!

Activity

  1. added
    next-major/maybe
    RFC
    on Dec 23, 2023
  2. added
    next-major/definite
    and removed
    next-major/maybe
    RFC
    on Dec 27, 2023
  3. github-actions commented on Jan 9, 2024

    @github-actions
    Contributor

    This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.

  4. locked as resolved and limited conversation to collaborators on Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

next-major/definite

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions