Dashboard › cli › Distillation
e0ef512e-bc76-4d0e-8119-ef2c8aea257f["lore_tm_v1_9bZx758ghpypcQRsizZeTNnwlxXTIVngZyCjKyXhHyQ","lore_tm_v1_Bb6qICSQzdluVZtnDo34VIi9udJYbAWFptPCKAd9whs"]
packages/cli/test/commands/cli.test.ts includes a migration-path test where setReleaseChannel("nightly") followed by use of the npm installation method triggers migration.packages/cli/test/commands/cli.test.ts were updated from the legacy getsentry/cli releases/latest object response to the getsentry/toolkit/releases?per_page=100 array format with tags such as cli@0.0.0-dev and cli@99.99.99.packages/cli/test/commands/cli.test.ts explicitly uses --method curl to bypass installation-method detection and use GitHub; JSON-mode tests use json: true or --json and parse structured UpgradeResult output.packages/cli/test/commands/cli.test.ts verify that setup runs through the CLI entrypoint after upgrade, using an example entry path of /npm/global/node_modules/sentry/dist/bin.cjs.packages/cli/test/lib/binary.test.ts now imports and tests getGitHubReleaseByTagUrl, resolveUpgradeSource, UPGRADE_SOURCES, and UpgradeSourceNotFoundError.getBinaryDownloadUrl("1.0.0") is expected to use https://github.com/getsentry/toolkit/releases/download/, contain /cli@1.0.0/, include a sentry- platform binary name, and select arm64 only for process.arch === "arm64", otherwise x64.UPGRADE_SOURCES ordering is tested exactly as: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }; 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }.resolveUpgradeSource() is tested to stop at the first successful source; for version 0.45.0, the first probe URL is https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%400.45.0.resolveUpgradeSource() falls back from Toolkit to the legacy CLI repository only on HTTP 404; the fallback probe for version 0.45.0 is https://api.github.com/repos/getsentry/cli/releases/tags/0.45.0.resolveUpgradeSource() must not fall back on HTTP 401, 403, 429, or 500; each status propagates an HTTP ${status} error after only the Toolkit request.resolveUpgradeSource() must not fall back on network failure; a TypeError("fetch failed") is surfaced as Failed to connect to GitHub: fetch failed, with only the Toolkit source probed.resolveUpgradeSource() probes Toolkit and then legacy CLI and throws an error that is an instance of UpgradeSourceNotFoundError with name: "UpgradeSourceNotFoundError".getBinaryPaths("/usr/local/bin/sentry") is tested to derive 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() tolerates trailing path separators, follows platform case sensitivity (win32 and darwin case-insensitive; other platforms case-sensitive), distinguishes genuinely different paths, and must not treat filesystem root as equal to an empty string.getLegacyInstallDirs("/home/user") must return only the pre-XDG migration source /home/user/.sentry/bin; current valid targets /home/user/.local/bin and /home/user/bin are never migration sources.