This repo contains community-led official codemods approved by the Sentry team to help users adopt new SDK features and handle breaking changes safely and easily.
Caution: These scripts change source code. Commit or stash changes before running.
Run a codemod from the registry:
npx codemod@latest @sentry/<codemod-name>
- See the Codemod CLI reference for full usage.
codemods/
: placeholders (by major version) where codemod packages may be added.codemods/vX/migration-recipe/
: optional “recipe” (a daisy-chained orchestration of codemods). A recipe is not a single codemod.
codemods/
vX/
<codemod-name>/ # optional: package placeholder (no source kept here)
migration-recipe/ # optional: orchestration, when applicable
utils/
index.ts # shared helpers for docs/tools (no transforms)
- ESM, TypeScript, Node 20+ for any helper tooling kept here.
- Codemods are published and run via
npx codemod@latest @sentry/<codemod-name>
. - “Recipe” refers to a daisy-chained flow that orchestrates multiple codemods.
Contributions welcome. Please open an issue to discuss proposed codemods or improvements.
MIT