Dashboard › cli › Distillation
9e895440-3c32-405a-a120-27d1c9d18d77["lore_tm_v1_jPLpYphN3FojI7uuwnwvbEJuTpL8KCz5Wr7LAFhZvf4","lore_tm_v1_KDRRpNq2VUQcuQ9FiqkmslK0m8pRn0GhtESWln6qrek","lore_tm_v1_9RN3g0PBKi1z0D-BJD5yXIypWr0DvyzoEBBZRHadk58","lore_tm_v1_4Q14Kq_Ioe8HrkzW1o-E9NdMJ_xqUAVtCbkdNKYXHnU"]
packages/cli/src/commands/cli/upgrade.ts, package managers always need network access to fetch and install packages.packages/cli/src/commands/cli/upgrade.ts, nightly builds are GitHub-only, so nightly version resolution always uses the curl (GitHub) lookup path.sentry cli upgrade nightly command switches to the nightly channel and updates the CLI.packages/cli/src/commands/cli/upgrade.ts is exactly 1,096 lines.offline flag in packages/cli/src/commands/cli/upgrade.ts is a boolean defaulting to false, described as "Upgrade using only cached version info and patches (no network)".no-agent-skills flag in packages/cli/src/commands/cli/upgrade.ts is a boolean defaulting to false, described as "Skip agent skill installation for AI coding assistants".method flag in packages/cli/src/commands/cli/upgrade.ts is an optional parsed value using parseInstallationMethod, with supported methods curl, brew, npm, pnpm, bun, and yarn.func() calls resolveContext(version, flags), logs the installation method and CLI_VERSION, and runs resolveTargetWithFallback() inside withProgress({ message: "Checking for updates...", json: flags.json }, ...).resolveTargetWithFallback() receives resolveOpts: { method, channel, versionArg, channelChanged, flags }, versionArg, offline: flags.offline, method, and persistChannelFn: () => persistChannel(channel, channelChanged, version).kind === "done", an online --check result whose currentVersion !== targetVersion fetches a changelog via startChangelogFetch() with offline: false before yielding new CommandOutput(result).startChangelogFetch() begins before binary download and runs in parallel with it, using channel, CLI_VERSION, target version, offline state, and the resolved source.--check fallback can return kind: "target"; packages/cli/src/commands/cli/upgrade.ts explicitly guards against performing an upgrade and instead calls buildCheckResultWithChangelog()."up-to-date" when CLI_VERSION === target, flags.force is false, and channelChanged is false; the result includes currentVersion, targetVersion, channel, method, forced: false, and offline: true only when offline.isDowngrade(CLI_VERSION, target) and logs either "Downgrading" or "Upgrading" with the target.channel === "nightly" and method !== "curl", packages/cli/src/commands/cli/upgrade.ts calls migrateToStandaloneForNightly() because nightly is GitHub-only; the migration receives method, target, versionArg, noAgentSkills, json, and source, and handles setup internally.executeStandardUpgrade() with method, channel, versionArg, target, execPath, entryPath, pathEnv, offline, json, noAgentSkills, and source.UpgradeResult whose action is "downgraded" or "upgraded" and which includes CLI_VERSION, target, channel, method, flags.force, optional offline status, warnings, and changelog.packages/cli/src/lib/upgrade.ts, packages/cli/src/lib/ghcr.ts, packages/cli/src/lib/delta-upgrade.ts, packages/cli/src/lib/binary.ts, packages/cli/src/commands/cli/upgrade.ts, packages/cli/src/lib/version-check.ts, and packages/cli/src/lib/release-notes.ts.packages/cli/src/lib/upgrade.ts include fetchLatestFromGitHub() at line 462, fetchLatestNightlyVersion() at line 561, versionExists() at line 692, downloadBinaryToTemp() at line 1042, and executeUpgrade() at line 1280.packages/cli/src/lib/ghcr.ts include getAnonymousToken() at line 208, fetchManifest() at line 249, and downloadNightlyBlob() at line 354.packages/cli/src/lib/delta-upgrade.ts are prefetchNightlyPatches() at line 688 and prefetchStablePatches() at line 696; packages/cli/src/lib/version-check.ts calls them at lines 242 and 244 respectively.getBinaryDownloadUrl() is defined in packages/cli/src/lib/binary.ts at line 234, and fetchChangelog() is exported from packages/cli/src/lib/release-notes.ts at line 752.packages/cli/src/lib/release-notes.ts filters out commits whose body contains #skip-changelog.packages/cli/src/lib/release-notes.ts are derived from conventional-commit prefixes through COMMIT_PREFIX_TO_CATEGORY.per_page value than fetchRecentReleases() in packages/cli/src/lib/delta-upgrade.ts.fetchChangelog() in packages/cli/src/lib/release-notes.ts can reuse prefetched release data so it does not fetch the same data again.