feat(server-utils): phase 2 of internal/server-utils refactor#21203
feat(server-utils): phase 2 of internal/server-utils refactor#21203isaacs wants to merge 1 commit into
Conversation
This moves most of the logic previously in `@sentry/core/server` into the new `@sentry-internal/server-utils` package. BREAKING CHANGE: the @sentry/server/core is removed, because otherwise this would result in a dependency cycle.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 670192f. Configure here.
| enumerable, | ||
| value: wrapped, | ||
| }); | ||
| } |
There was a problem hiding this comment.
Vendored wrapMethod and getDefaultExport duplicated in server-utils
Low Severity
The wrapMethod and getDefaultExport functions are identically vendored in both client-patch.ts and the Express index.ts within the same @sentry-internal/server-utils package. These two copies will need to be maintained in sync, increasing the risk of inconsistent bug fixes. They could be extracted into a shared internal utility file within the package. Flagging this because it was mentioned in this rules file.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 670192f. Configure here.
| timer.unref(); | ||
| } | ||
| return timer; | ||
| } |
There was a problem hiding this comment.
Vendored safeUnref instead of using core's new export
Low Severity
record-request-session.ts vendors a local safeUnref function, but @sentry/core now explicitly exports _INTERNAL_safeUnref (added in shared-exports.ts with a comment saying it's "exposed so that @sentry-internal/server-utils can build … without copying these internal helpers"). The vendored copy is redundant and could fall out of sync. Flagging this because it was mentioned in this rules file.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 670192f. Configure here.


This moves most of the logic previously in
@sentry/core/serverinto the new@sentry-internal/server-utilspackage.BREAKING CHANGE: the @sentry/server/core is removed, because otherwise this would result in a dependency cycle.