Skip to content
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

Mark private exports @private #572

Merged
merged 2 commits into from
Apr 4, 2023
Merged

Mark private exports @private #572

merged 2 commits into from
Apr 4, 2023

Conversation

timostamm
Copy link
Member

The @bufbuild/connect package exports many types from subpath exports. Nearly all of them are for internal use, and only exported because we need them in the @bufbuild/connect-web package to provide gRPC-web and Connect Transports with minimal bundle size.

It is not feasible for us to support the huge API surface with the same stability promise as the main package exports. This PR marks all internal code with the @private JSDoc annotation. The index.ts files gives an explanation:

// All exports below are private — internal code that does not follow semantic
// versioning.
// We will try hard to avoid breaking changes, but if you depend on the
// following exports, we recommend that you do so with an exact version
// constraint (no ~ or ^).

Exports that are necessary to support other platforms and server frameworks are not marked private. createTransport() and createHandlerFactory() from @bufbuild/protocol-connect and the other protocol subpaths, and the types for universal handlers and clients from @bufbuild/protocol are still part of the public API.

@timostamm timostamm merged commit 9d413f9 into main Apr 4, 2023
@timostamm timostamm deleted the tstamm/annotate-internal branch April 4, 2023 17:45
@timostamm timostamm mentioned this pull request Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants