ref(core)!: Remove orphaned deprecated Express patch APIs - #23827
Open
mydea wants to merge 1 commit into
Open
Conversation
Removes the `patchExpressModule` helper, the `integrations/express/*` modules and the `ExpressIntegrationOptions` / `ExpressMiddleware` / `ExpressErrorMiddleware` types from `@sentry/core/server`. These were kept around behind a deprecation comment but are entirely unused: nothing in the codebase calls `patchExpressModule`, and `@sentry/server-utils` ships its own Express integration with its own local types. The only remaining references were core's own tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
size-limit report 📦
|
mydea
marked this pull request as ready for review
September 1, 2026 11:58
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.
Removes the deprecated, unused Express patch APIs from
@sentry/core/server:patchExpressModulehelper and the wholeintegrations/express/*module treeExpressIntegrationOptions,ExpressMiddleware, andExpressErrorMiddlewaretypesThese were kept behind a "deprecated, kept until the next major" comment, but nothing actually uses them: there is no runtime caller of
patchExpressModuleanywhere in the repo, and@sentry/server-utilsships its own Express integration (expressIntegration) with its own local copies of the middleware types. The only references left were core's own unit tests, which are removed alongside the source.Marked with
!because these were exported symbols on the public@sentry/core/serverentrypoint, even though they were deprecated and unused.