Dashboard › cli › Distillation
b843a869-1180-4544-b899-31bde1ca4bc5["lore_tm_v1_QMwJuQ0LFWRwrZOgb-UvhtDdctufhnSyzFO4UKXLFy4","lore_tm_v1_QRZbLe-ce9n6F0IflrQYQVYHGjExY6d0b0pM2NHAPH4","lore_tm_v1_6DSNlveaBvZof762axxpbh-UGbLP2eQA2GzBGfuK7kc","lore_tm_v1_4wGcX3_l2dUa1MIYdOc2IvocXVxvVbV2HdOYOwUFmAg","lore_tm_v1_KwGhLfOdwWbBw0CHzD5O2si78liwS5xE3N7lHUFZ_1Q"]
packages/cli/src/lib/release-notes.ts was made source-aware: removed static GITHUB_RELEASES_URL usage and imported getGitHubReleasesUrl, PRIMARY_UPGRADE_SOURCE, and UpgradeSource from ./binary.js.packages/cli/src/lib/release-notes.ts now accepts FetchChangelogOptions & { source: UpgradeSource }, fetches releases through fetchReleasesForChangelog(source), and builds results with buildChangelogSummaryForSource(..., { maxItems, source }).packages/cli/src/lib/release-notes.ts now accepts the selected UpgradeSource, preserving the source chosen during version discovery when querying the GitHub Commits API.since = fromTs + 1 second because GitHub’s since is inclusive, and until = toTs + 1 second because GitHub’s until is exclusive; this excludes the installed version’s commit and includes the target version’s commit.packages/cli/src/lib/version-check.ts replaced fetchLatestFromGitHub and fetchLatestNightlyVersion with source-returning fetchLatestFromGitHubWithSource and fetchLatestNightlyVersionWithSource, and imported UpgradeSource from ./binary.js.maybePrefetchPatches(channel, latestVersion, signal, source) in packages/cli/src/lib/version-check.ts now propagates the selected UpgradeSource to both prefetchNightlyPatches(latestVersion, signal, source) and prefetchStablePatches(latestVersion, signal, source).checkForUpdateInBackgroundImpl() catches database-access failures from shouldCheckForUpdate(), calls Sentry.captureException(error), and returns without crashing the CLI.getUpdateNotificationWithCopy(...) returns null when up to date, cached version information is absent, notification is rate-limited, stderr is non-TTY, or an error occurs; returning a message also persists last_notified = now through markUpdateNotified.packages/cli/src/lib/version-check.ts are rate-limited by NOTIFICATION_INTERVAL_MS = 24 * 60 * 60 * 1000 and suppressed for upgrade, --version, -V, --json, token, init, and the management commands cli setup and cli fix, including when global flags are interleaved.packages/cli/test/lib/binary.test.ts asserts UPGRADE_SOURCES ordering exactly: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }; 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }.resolveUpgradeSource tests in packages/cli/test/lib/binary.test.ts cover: 1. selecting Toolkit immediately when https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%400.45.0 succeeds; 2. falling back to legacy https://api.github.com/repos/getsentry/cli/releases/tags/0.45.0 only after Toolkit returns HTTP 404; 3. refusing fallback for HTTP 401, 403, 429, or 500; 4. refusing fallback on network failure and throwing "Failed to connect to GitHub: fetch failed"; 5. throwing UpgradeSourceNotFoundError after both sources return 404.packages/cli/test/lib/binary.test.ts verifies getBinaryDownloadUrl("1.0.0") starts with https://github.com/getsentry/toolkit/releases/download/, includes /cli@1.0.0/, contains sentry-, and selects arm64 only for process.arch === "arm64" otherwise x64; Windows downloads end in .exe.packages/cli/test/lib/binary.test.ts verifies getBinaryPaths("/usr/local/bin/sentry") returns installPath="/usr/local/bin/sentry", tempPath="/usr/local/bin/sentry.download", oldPath="/usr/local/bin/sentry.old", and lockPath="/usr/local/bin/sentry.lock".samePath tests verify identical paths match, /home/user/.local/bin differs from /home/user/.sentry/bin, case-insensitive comparison applies on Windows and macOS but not other platforms, trailing separators are tolerated on either side, and a root separator is not stripped into an empty path.