Dashboard › cli › Distillation
0fbdb9ce-b59c-4b80-8f0e-e093a272c551["lore_tm_v1_UGjFZTjpHpRU1eIi-WqfXCD6RJ0hILsBLSsd8bNj1vY","lore_tm_v1_Qy-2GVXHFJfyMIULLn32ZU55DI0kbY1JhzSN--pOQYI"]
Date: Sep 9, 2026
"0.0.0-alpha" as a clearly older cached version for the getUpdateNotification() test, replacing the ambiguous "0.0.0" comparison against test CLI_VERSION "0.0.0-dev"; expected result is null.lastChecked state as "never checked before"; in packages/cli/test/lib/version-check.test.ts, this state must cause maybeCheckForUpdateInBackground() to initiate a background check.packages/cli/test/lib/version-check.test.ts defines withStderrTTY(value), which temporarily sets process.stderr.isTTY and restores the original value, deleting the property if it was originally undefined.shouldSuppressNotification() must return true for upgrade, upgrade --check, cli setup, cli fix, --version, -V, and commands containing --json.shouldSuppressNotification() must recognize cli setup and cli fix despite preceding or intervening global flags, including --verbose, -v, --log-level debug, --org acme, and --org=acme.shouldSuppressNotification() must return false when a non-flag positional token precedes cli (for example, issue cli setup), for cli feedback, when setup or fix are ordinary argument values, for regular commands (issue list, auth status, help), and for empty arguments.getUpdateNotification() returns null when no version information is cached, when the cached version equals the current version, when the cached version is older, or when stderr is not a TTY."99.0.0", getUpdateNotification() must include "Update available:", "99.0.0", and "sentry cli upgrade".getUpdateNotification() calls, only the first is non-null. The persisted last_notified value also rate-limits notifications across simulated CLI invocations to once per 24 hours.getErrorUpdateNotification() with a newer cached version returns contextual text containing "Upgrading may resolve this" and "sentry cli upgrade" for unexpected errors, without the standard "Update available:" label.getErrorUpdateNotification() classifies ContextError, ValidationError, and ApiError status 404 as user errors that receive standard "Update available:" copy without "Upgrading may resolve this".getErrorUpdateNotification() classifies ApiError statuses 400 and 500, plus generic Error, as non-user errors that receive "Upgrading may resolve this" without "Update available:".getErrorUpdateNotification() returns null for suppressed argument sets containing --json, init, upgrade, or cli setup, and when stderr is not a TTY.getErrorUpdateNotification() and getUpdateNotification() share both the once-per-process latch and the cross-invocation rate limit; whichever notification runs first suppresses the other.abortPendingVersionCheck() must not throw when there is no pending check or when called 3 times consecutively."test-version-bg-", replace globalThis.fetch with mockFetch() returning HTTP 200 and { tag_name: "v0.0.0-dev" }, abort pending checks after each test, and restore the original fetch."checks for update when never checked before" test requires getVersionCheckInfo().lastChecked to be null, calls maybeCheckForUpdateInBackground(), waits 100ms, and then calls abortPendingVersionCheck().setVersionCheckInfo("1.0.0"), requires a non-null lastChecked and latestVersion === "1.0.0", invokes maybeCheckForUpdateInBackground() 5 times, waits 50ms, and aborts the pending check.abortPendingVersionCheck(), waits 50ms, verifies another check can start without throwing, and aborts again.SENTRY_CLI_NO_UPDATE_CHECK=1 is tested in a subprocess because the environment variable is read at module load time. The test tries Bun first and otherwise uses node --input-type=module -e; it expects maybeCheckForUpdateInBackground() to be a no-op and getUpdateNotification() to return null.packages/cli/test/lib/release-notes.test.ts found exactly 21 matches related to release arrays, version-range filtering, null summaries, category merging, output limits, commit parsing, #skip-changelog filtering, and empty commit sections; referenced versions include "0.17.0", "0.18.0", "0.19.0", "0.20.0", "0.21.0", and "0.22.0", with one buildChangelogSummary(..., 3) limit case.