You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two cleanups on top of the v5.26.0 work:
* `quiet` option removed from `getLatestRelease` and `getReleaseAssetUrl` type signatures. The helpers are silent by design now (errors throw, success returns); there's nothing for `quiet` to suppress. Per the repo's "no backward compat" policy, the option is deleted rather than accepted-but-ignored. Internal callers (`socket-btm.ts`, `downloadGitHubRelease`, `downloadReleaseAsset`) updated to drop the now-unused option arg. CHANGELOG entry moved to `### Removed`.
* All error messages I touched in this release reviewed against the CLAUDE.md "Errors are a UX surface" guidance. Library-API throws should be terse, stable, and include where (owner/repo). Fixes:
- lowercase `failed to resolve ref` -> capitalized to match siblings
- `Failed to fetch releases:` -> `Failed to fetch ${owner}/${repo} releases:`
- `Failed to parse GitHub releases response from <hardcoded URL>` -> `Failed to parse ${owner}/${repo} releases response`
- `GraphQL error: <messages>` -> `GraphQL securityAdvisory(...) returned errors: <messages>` / `GraphQL repository.releases(...) returned errors: ...` / `GraphQL repository.release(...) returned errors: ...` (which query failed is now visible)
- `GHSA X not found via GraphQL` -> `GHSA X not found` (transport detail leaked; users don't care which transport)
- `GraphQL fallback for X failed: ...` -> `Failed to fetch ${owner}/${repo} release X (GraphQL): ...`
- `Release X not found in Y: GraphQL fallback found no release with that tag` -> `Release X not found in Y` (redundant tail removed)
- `Failed to parse GitHub release response for tag X` -> `Failed to parse ${owner}/${repo} release X response`
- `Failed to fetch release X: 503` -> `Failed to fetch ${owner}/${repo} release X: 503`
- `Release X has no assets` -> `Release X has no assets in ${owner}/${repo}`
- `Failed to parse GitHub GraphQL release response for X` -> `Failed to parse ${owner}/${repo} release X response (GraphQL)`
Test assertions updated to the new wording. 154/154 still pass. tsgo + lint clean.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
16
17
17
-`getLatestRelease`, `getReleaseAssetUrl`, `fetchRefShaViaGraphQL` (internal), `fetchReleaseAssetsViaGraphQL` (internal) — return `undefined` (was: `null`) when no result is found. Matches the `__proto__: null` only / `undefined` convention used elsewhere in the package. Callers using `=== null` will need to switch to `=== undefined` or a falsy check; callers using `if (!result)` are unaffected
18
18
-`fetchGhsaDetails` GraphQL fallback path normalizes severity to lowercase (`"MODERATE"` → `"moderate"`) to match the REST endpoint's wire shape. Callers comparing against a single canonical case no longer have to handle both
19
-
-`getLatestRelease` and `getReleaseAssetUrl` no longer log to `logger.info` / `logger.warn` on success, retry, or fallback. The helpers are silent by design now: errors throw, success returns. The `quiet` option is still accepted for backward compat but ignored
19
+
-`getLatestRelease` and `getReleaseAssetUrl` are silent by design now: errors throw, success returns. No more `logger.info` / `logger.warn` calls on success, retry, or fallback
20
+
21
+
### Removed
22
+
23
+
-`getLatestRelease({ quiet })` and `getReleaseAssetUrl({ quiet })` — the `quiet` option is gone from the type signatures. Passing it is now a TypeScript error. There's nothing left to suppress (the helpers don't log anymore — see "Changed"). Callers that were passing `{ quiet: true }` as their only option should drop the options arg entirely
0 commit comments