ref(core)!: Remove orphaned deprecated Express patch APIs - #23827
Conversation
size-limit report 📦
|
64795c2 to
5b38842
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5b38842. Configure here.
| export { flushIfServerless } from './utils/flushIfServerless'; | ||
| export { callFrameToStackFrame, watchdogTimer } from './utils/anr'; | ||
| export { safeUnref as _INTERNAL_safeUnref } from './utils/timer'; | ||
| /* oxlint-disable typescript/no-deprecated -- deprecated Express exports, kept until the next major */ |
There was a problem hiding this comment.
Public APIs removed without migration notes
Medium Severity
This change drops the public patchExpressModule, ExpressMiddleware, and ExpressErrorMiddleware exports from @sentry/core/server without a changelog or migration callout. This was flagged because the review rules treat public API removals and undocumented breaking changes as critical. MIGRATION.md still calls patchExpressModule deprecated and tells users to keep using it.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 5b38842. Configure here.
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>
5b38842 to
253af56
Compare


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.