Skip to content

Publish sentry-v3-to-v4 codemod to the Codemod registry #1253

Description

@BYK

Background

PR #1201 (merge commit 9fa96f6d47f9fe2d7eacc5f7244d9d14c27e5696) shipped the v3→v4 migration guide and the sentry-v3-to-v4 codemod (codemods/sentry-v3-to-v4/). The codemod is fully built, tested (21 jssg fixtures), and CI-gated (codemod-test job), but it is not yet published to the Codemod registry.

Until it's published, the migration guide instructs users to run it from source (clone + npx codemod jssg run …). The shorter published form is documented but gated behind a "once published" note:

npx codemod@latest @sentry/cli-v3-to-v4

What needs to happen

  1. Create the @sentry scope on codemod.com (if it doesn't already exist).
  2. Register getsentry/cli as a trusted publisher for that scope (OIDC), so .github/workflows/publish-codemod.yml can publish without a long-lived token.
  3. Push a codemod-v* tag to trigger publish-codemod.yml (the workflow fires on push: tags: codemod-v* and also supports workflow_dispatch).
  4. Verify npx codemod @sentry/cli-v3-to-v4 resolves and runs.

Follow-up once published

  • Update docs/src/content/docs/migrating-from-v3.md — promote the npx codemod @sentry/cli-v3-to-v4 command out of the "once published" :::note and make it the primary invocation (the run-from-source path can stay as an alternative).

Notes

  • Nothing here blocks anything already merged — the CLI doesn't depend on the codemod package, codemod-test runs jssg test locally (no registry needed), and publish-codemod.yml only fires on the tag.
  • Package name is @sentry/cli-v3-to-v4; config lives in codemods/sentry-v3-to-v4/codemod.yaml + workflow.yaml.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions