ref(server-utils): Remove unused public exports - #23382
Merged
Merged
Conversation
Contributor
size-limit report 📦
|
mydea
force-pushed
the
fn/remove-unused-server-utils-exports
branch
from
August 13, 2026 09:27
72b06ee to
aba0dab
Compare
mydea
marked this pull request as ready for review
August 13, 2026 11:19
mydea
requested review from
JPeer264 and
isaacs
and removed request for
a team
August 13, 2026 11:19
JPeer264
approved these changes
Aug 13, 2026
JPeer264
left a comment
Member
There was a problem hiding this comment.
LGTM. CI is failing and there are merge conflicts, but I guess overall the structure won't change
Remove 15 exports from the `@sentry/server-utils` `index` and `orchestrion/index` barrels that are imported by no other package and not consumed via bundler injection or an internal barrel import. All underlying symbols remain defined and internally used via direct-path imports; only the redundant public re-exports are dropped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a `@sentry/server-utils` subsection under "Removed APIs" for the exports that existed in the package's main entrypoint on v10 and were removed. Orchestrion-only and post-v10 exports are intentionally omitted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
It documents internal-only exports, so it belongs below the user-facing package entries. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mydea
force-pushed
the
fn/remove-unused-server-utils-exports
branch
from
August 13, 2026 12:47
aba0dab to
2f5a8e3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trims 15 dead exports from
@sentry/server-utils's two public barrels (src/index.tsandsrc/orchestrion/index.ts). Each removed export is imported by no other package — verified with an import-precise scan across the monorepo: no static import, no re-export, and no test imports them through the barrel (tests reach them via direct../src/...paths). None are consumed by bundler-injected code, and none are re-imported through the barrel by anotherserver-utilsmodule.Every underlying symbol stays defined and continues to be used internally via direct-path imports, so this only trims the public surface — no implementation is deleted, and no consumer changes.
Removed from
index.ts:instrumentPrisma,defaultDbStatementSerializer, and the typesPrismaInstrumentationConfig,PrismaOptions,RedisDiagnosticChannelsOptions,SentryTracingChannel,TracingChannelLifeCycleOptions,TracingChannelBindingHandle,GenAiOptions.Removed from
orchestrion/index.ts: the typesKoaIntegrationOptions,IORedisChannelIntegrationOptions,IORedisResponseHook,PostgresJsIntegrationOptions,RedisChannelIntegrationOptions,RedisResponseHook.Deliberately kept
Three exports look unused to a naive "no static importer" scan but are used somewhere, so they were left in place:
orchestrionModuleInjectedandgraphqlIntegration— consumed by bundler-injected code (require('@sentry/server-utils/orchestrion').<name>), keyed by the stringexportNamein the transform config. Thereferences only real named exports of @sentry/server-utils/orchestrionunit test guards exactly this coupling.CustomTransform— imported from the barrel byorchestrion/bundler/options.ts, so it is still consumed through the public entry.