Closed
Conversation
Adds an `upgrade` flow to the wizard that automatically applies codemods for breaking changes when upgrading between major SDK versions. Currently supports v8→v9 with four transform modules: - package-remapping: @sentry/utils, @sentry/types → @sentry/core - hub-removal: getCurrentHub() → direct API calls - method-renames: captureUserFeedback → captureFeedback, etc. - config-changes: enableTracing removal, transactionContext flattening Includes 46 unit tests, 3 e2e tests, and CLI integration via `-i upgrade`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Features
🤖 This preview updates automatically when you update the PR. |
- Add eslint-disable for recast parser require() calls - Remove unnecessary async from synchronous runCodemodsOnFiles - Fix non-null assertion in hub-removal - Add assertTransform/assertNoChange to vitest expect-expect allowlist - Update help-message e2e snapshot to include "upgrade" choice Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The function was changed from async to sync but callers still awaited it, causing await-thenable lint errors. Also updates the help-message inline snapshot to match actual yargs output whitespace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Closing in favor of getsentry/sentry-for-ai#20 |
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.
Summary
upgradewizard flow that applies AST codemods for breaking changes between major SDK versions@sentry/utils,@sentry/types→@sentry/coregetCurrentHub()→ direct API calls (captureException,getCurrentScope, etc.)captureUserFeedback→captureFeedback,WithSentry→SentryExceptionCaptured, etc.enableTracingremoval,transactionContextflattening,hideSourceMaps/autoInstrumentRemixremovalTODO(sentry-upgrade):comments or manual review itemsnpx @sentry/wizard -i upgradeor the interactive menurecastinfrastructure — no new dependenciesTest plan
tsc --noEmit)yarn try -i upgradeagainst a sample v8 project🤖 Generated with Claude Code