fix(deps): bump @sentry/api to 0.180.0 and fix downstream type errors#1066
Merged
Conversation
SDK 0.180.0 tightened several types that the old version silently accepted: - issue_id is now string (not number) — remove Number() wrappers in events.ts - lastSeen/firstSeen can be null in SDK types — coerce to undefined at call sites - Two new issue statuses: resolvedInNextRelease and muted — add to ISSUE_STATUSES, STATUS_COLORS, STATUS_ICONS, STATUS_LABELS The reverse exhaustiveness check on ISSUE_STATUSES is removed: the SDK response union now includes a variant with status: string (loose), making the check always fail. The satisfies above still catches invalid values in our tuple. dashboard_id is still typed as number in the path (backend spec fix pending).
Contributor
|
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 4417 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 81.85% 81.85% —%
==========================================
Files 341 341 —
Lines 24339 24340 +1
Branches 15911 15928 +17
==========================================
+ Hits 19922 19923 +1
- Misses 4417 4417 —
- Partials 1661 1664 +3Generated by Codecov Action |
statusColor was calling .toLowerCase() before the STATUS_COLORS lookup, converting resolvedInNextRelease to resolvedinnextrelease which never matched — always falling back to yellow instead of green. Try exact match first, then lowercase fallback for unexpected casing from older Sentry instances.
…atuses Add statusColor tests for the two new statuses and the unknown-status fallback path. Add formatStatusIcon and formatStatusLabel tests covering all new entries (resolvedInNextRelease, muted) to reach the 80% patch coverage threshold.
Add getComparator tests for sort=new and the null lastSeen/firstSeen paths — these were the 2 uncovered patch lines keeping coverage at 77.78%. Also fixes biome formatting in human.test.ts.
- Add getComparator test for unknown sort value to hit the default: case - Add getComparator test for sort=new with null firstSeen to cover the null ?? branch - Fix the sort=date null test to call comparator (not just check no-throw) - Add writeIssueTable test with null lastSeen/firstSeen to cover human.ts ?? null branches These were the 2 missing lines and 2 partials causing 77.78% patch coverage.
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.
Bumps `@sentry/api` from `0.141.0` to `0.180.0` (~39 releases) and fixes the type errors that surface when the SDK's stricter types catch things the old version silently accepted.
What changed in the SDK that affects us:
What still has a cast:
`dashboard_id` path param is still typed as `number` in the SDK — the backend spec fix for that is in a separate Sentry PR. That cast stays until it ships.
Tested locally: `sentry issue list`, `sentry issue view`, `sentry event view` all work against a real org.