Skip to content

chore(deps): bump @sentry/api to 0.253.0 and adopt token operationIds#1194

Merged
betegon merged 2 commits into
mainfrom
chore/bump-sentry-api-tokens
Jul 6, 2026
Merged

chore(deps): bump @sentry/api to 0.253.0 and adopt token operationIds#1194
betegon merged 2 commits into
mainfrom
chore/bump-sentry-api-tokens

Conversation

@betegon

@betegon betegon commented Jul 3, 2026

Copy link
Copy Markdown
Member

What

Bumps @sentry/api ^0.180.0^0.253.0 and migrates every SDK call site from the old normalizer-derived names to the clean token operationIds produced by the operationId migration.

Examples of the rename (34 symbols across 12 files):

  • retrieveAnOrganizationgetOrganization
  • listAnOrganization_sIssueslistOrganizationIssues
  • queryExploreEventsInTableFormatlistOrganizationEvents
  • retrieveAnOrganization_sReleasegetOrganizationRelease
  • createANewProjectcreateTeamProject, listAProject_sClientKeyslistProjectKeys, etc.

Aliasing for name collisions

A few new tokens (getOrganization, getProject, deleteProject, listProjectEnvironments, listProjectTeams) collide with the CLI's own wrapper functions of the same name — the old verbose names never did. Those SDK imports are aliased (getOrganization as sdkGetOrganization, …), following the sdk* aliasing convention already used elsewhere in the codebase.

Notes

  • No behavior change — pure rename + version bump. The response/param shapes the CLI uses are unchanged across 0.180→0.253 (the earlier 0.180 bump already handled downstream type/shape adaptations).
  • generate:sdk is unaffected (it generates the CLI's own command SDK, not from @sentry/api).

Test plan

  • tsc --noEmit: clean
  • unit tests: API-lib (223), types + commands (2250) — all green

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1194/

Built to branch gh-pages at 2026-07-06 13:31 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Bumps @sentry/api ^0.180.0 -> ^0.253.0 and migrates every SDK call site from
the old normalizer-derived names (retrieveAnOrganization, listAnOrganization_sIssues,
queryExploreEventsInTableFormat, ...) to the clean token names produced by the
operationId migration (getOrganization, listOrganizationIssues, listOrganizationEvents, ...).

A few new tokens collide with the CLI's own wrapper functions of the same name, so
those SDK imports are aliased (e.g. getOrganization as sdkGetOrganization), following
the existing sdk* aliasing convention already used in the codebase.

No behavior change. tsc clean; API-lib, command, and type tests green.
@betegon betegon force-pushed the chore/bump-sentry-api-tokens branch from bbbfeec to dab1ca7 Compare July 6, 2026 10:22
@betegon betegon marked this pull request as ready for review July 6, 2026 10:26
@betegon betegon requested a review from MathurAditya724 July 6, 2026 10:26
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jul 6, 2026

@MathurAditya724 MathurAditya724 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full diff. This is a clean, mechanical rename + version bump. Verified:

  • All 32 renamed symbols exist in @sentry/api@0.253.0 — every function (getOrganization, listOrganizationIssues, listOrganizationEvents, createTeamProject, etc.), the zGetOrganizationIssueResponse zod export, and the GetOrganizationIssueResponse / ListOrganizationIssuesData / GetProjectData type exports all resolve in the installed package.
  • Collision aliasing is correct. Every new token that shadows a local wrapper (getOrganization, getProject, deleteProject, listProjectEnvironments, listProjectTeams) is imported as sdk* and the wrapper calls the aliased SDK fn — no accidental self-recursion. Matches the existing sdk* convention.
  • No behavior change. createANewProjectcreateTeamProject is still the team-scoped endpoint (path.team_id_or_slug unchanged); the rest are pure operationId renames with identical path/query/body shapes.
  • Lockfile is consistent with the 0.180.00.253.0 bump.

Minor: stale references to old SDK names in comments (non-blocking)

Three doc/comment strings still reference the pre-rename names:

  • src/lib/sentry-client.ts:713 — JSDoc example uses listYourOrganizations(...) (now listOrganizations)
  • test/commands/project/list.test.ts:688 — comment getProject (SDK retrieveAProject) (now getProject)
  • test/lib/api-client.coverage.test.ts:1912 — comment // resolveAnEventId (now resolveOrganizationEventId)

Worth updating for grep-ability, but these don't affect correctness.

Note: I couldn't run tsc/tests locally — the generate:sdk prestep fails in my sandbox on an unrelated Node/tsx require-shim ESM hook incompatibility (with { type: "file" } import attributes), which happens before compilation. Trusting the PR's reported green CI for the type/test gate.

Three doc/comment strings still referenced the pre-rename SDK names left
over from the operationId migration:

- src/lib/sentry-client.ts: JSDoc example used listYourOrganizations
- test/commands/project/list.test.ts: comment referenced retrieveAProject
- test/lib/api-client.coverage.test.ts: comment referenced resolveAnEventId

Comment-only changes for grep-ability; no behavior change.

Co-Authored-By: Aditya Mathur <aditya.mathur@sentry.io>
@MathurAditya724

Copy link
Copy Markdown
Member

Pushed 63d3eff fixing the three stale SDK-name comments I flagged (listYourOrganizationslistOrganizations, retrieveAProjectgetProject, resolveAnEventIdresolveOrganizationEventId). Comment-only, no behavior change.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

❌ Patch coverage is 77.78%. Project has 5325 uncovered lines.
✅ Project coverage is 81.81%. Comparing base (base) to head (head).

Files with missing lines (4)
File Patch % Lines
src/lib/api/dashboards.ts 0.00% ⚠️ 4 Missing
src/lib/api/monitors.ts 0.00% ⚠️ 2 Missing
src/lib/api/projects.ts 83.33% ⚠️ 1 Missing
src/lib/api/releases.ts 87.50% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    81.80%    81.81%    +0.01%
==========================================
  Files          423       423         —
  Lines        29282     29282         —
  Branches     19051     19051         —
==========================================
+ Hits         23953     23957        +4
- Misses        5329      5325        -4
- Partials      1983      1981        -2

Generated by Codecov Action

@betegon betegon merged commit 66add76 into main Jul 6, 2026
31 checks passed
@betegon betegon deleted the chore/bump-sentry-api-tokens branch July 6, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants