Dashboard › cli › Distillation
6d4cef72-e86a-4858-b0b6-20f55c831b5e["lore_tm_v1_s9qTVWM6LiSO6oFXmQmP7rdZQAaROPHrsnSrhtlfiCw","lore_tm_v1_yVVJNzclylyB50gKCCedX7GlAzVk7XzUqrebWk66L_g","lore_tm_v1_wYb_9u9meStUlNcmVwCk9czbDEuxrMY2HWbCWnA2MPg","lore_tm_v1_yqkctTSwH3jAI4ObV1wRKyUG5kaisohAOuH2XVdh5Y4","lore_tm_v1_fCkdWKAs5BqhojkvFs-jyEb93TKtUN_UI3-c2LpVv1c","lore_tm_v1_41JR72sGt4vILO1K8tgjVLDF2z-pzb25aScWaagn5L8","lore_tm_v1_ik3sUJLVoRQCozzVXfSeV2DfqLlkyFeiTMbeJG3AHWg","lore_tm_v1_qJOa6hx0GXvuLPKGYW217bCNDvK1x6E2_ZGwMYX7b-A","lore_tm_v1_tLT3xMEFpSu8zbfRPluDR0uSPILXtpg85saGpvSkBmY","lore_tm_v1_2xuIqbFA9OOMu-qn31L4wrXAdOuJQcLY8qp-BwhRYig"]
packages/cli/package.json defines package sentry at version 0.40.0-dev.0, package manager pnpm@10.11.0, Node runtime requirement >=18.0, development runtime requirement Node >=22.15, ESM package type, and CLI binary mapping "sentry": "./dist/bin.cjs".packages/cli/package.json build scripts are: build generates schema/docs/SDK then runs pnpm tsx script/build.ts --single; build:all performs the same generation then runs pnpm tsx script/build.ts; bundle performs the same generation then runs pnpm tsx script/bundle.ts; typecheck generates docs/SDK then runs tsc --noEmit; lint uses biome check --no-errors-on-unmatched --max-diagnostics=none ./; lint:fix adds --write.packages/cli/package.json test scripts are: test → pnpm run test:unit; test:unit generates docs/SDK then runs vitest run test/lib test/commands test/types test/script --coverage; test:changed generates docs/SDK then runs vitest run --changed; test:e2e generates docs/SDK then runs vitest run test/e2e; test:init-eval runs vitest run test/init-eval --testTimeout 600000.packages/cli/package.json development dependencies include binpatch@^0.3.1, fossilize@^0.10.1, fflate@^0.8.3, semver@^7.8.5, marked@^15.0.12, typescript@^5.9.3, vitest@^4.1.9, @vitest/coverage-v8@^4.1.9, tsx@^4.22.4, esbuild@^0.28.1, @biomejs/biome@2.3.8, @sentry/core@10.63.0, and @sentry/node-core@10.63.0.packages/cli/src/lib/version-check.ts imports ./db/version-check.js, ./delta-upgrade.js, cleanupPatchCache from ./patch-cache.js, and fetchLatestFromGitHub/fetchLatestNightlyVersion from ./upgrade.js; packages/cli/src/lib/upgrade.ts imports ./binary.js, attemptDeltaUpgrade/DeltaResult from ./delta-upgrade.js, ./ghcr.js, and clearPatchCache from ./patch-cache.js, while re-exporting InstallationMethod and parseInstallationMethod from ./binary.js.packages/cli/src/lib/release-notes.ts imports binary helpers and GitHubRelease from ./delta-upgrade.js; packages/cli/src/lib/delta-upgrade.ts imports ./binary.js and GHCR_REPO from ./ghcr.js; packages/cli/src/commands/cli/upgrade.ts imports from ../../lib/binary.js, ../../lib/db/version-check.js, ../../lib/release-notes.js, and ../../lib/upgrade.js; packages/cli/src/lib/db/release-channel.ts imports clearVersionCheckCache; packages/cli/src/lib/db/install-info.ts imports InstallationMethod.packages/cli/src/lib/binary.ts defines InstallationMethod as "curl" | "brew" | "npm" | "pnpm" | "bun" | "yarn" | "unknown"; parseInstallationMethod(value) lowercases input, accepts all except "unknown" as explicit --method values, and otherwise throws Invalid method: ${value}. Must be one of: curl, brew, npm, pnpm, bun, yarn.isMusl() in packages/cli/src/lib/binary.ts first returns false outside Linux, then uses a cached result; its first Linux heuristic checks /lib/ld-musl-x86_64.so.1 for process.arch === "x64" or /lib/ld-musl-aarch64.so.1 otherwise, and only if absent falls back to combining ldd --version stdout/stderr and searching case-insensitively for "musl". This adds a dynamic-linker existence check ahead of the previously observed ldd heuristic.packages/cli/src/lib/binary.ts defines InstallationMethod, KNOWN_CURL_DIRS = [".local/bin", "bin", ".sentry/bin"], parseInstallationMethod(), isMusl(), getPlatformBinaryName(), getBinaryDownloadUrl(), GITHUB_RELEASES_URL, isNightlyVersion(), compareVersions(), isDowngrade(), getBinaryFilename(), getBinaryPaths(), determineInstallDir(), getGitHubHeaders(), fetchWithUpgradeError(), replaceBinarySync(), cleanupOldBinary(), acquireLock(), private handleExistingLock(), releaseLock(), and installBinary().getBinaryFilename() returns "sentry.exe" on Windows and "sentry" elsewhere; getBinaryPaths(installPath) derives tempPath = \${installPath}.download`, oldPath = `${installPath}.old`, and lockPath = `${installPath}.lock``.determineInstallDir() documents curl-install directory priority as: 1. $SENTRY_INSTALL_DIR if set and writable, 2. ~/.local/bin if it exists and is in $PATH, 3. ~/bin if it exists and is in $PATH, 4. ~/.sentry/bin as fallback with setup responsible for PATH modification.packages/cli/src/lib/release-notes.ts parses stable GitHub Release bodies with marked.lexer() and nightly conventional commits, retaining exactly 3 user-facing categories in order: 1. New Features (✨, ### New Features, or feat:), 2. Bug Fixes (🐛, ### Bug Fixes, or fix:), 3. Performance (⚡, ### Performance, or perf:).#skip-changelog, ignores blank first lines and non-conventional/unsupported prefixes, strips the recognized description, groups it by category, and emits markdown bullets in CATEGORY_ORDER.CHANGELOG_MAX_RELEASES = 30 and requests ${GITHUB_RELEASES_URL}?per_page=30; this is intentionally higher than the delta-upgrade release cap of 12, below GitHub’s per_page maximum of 100, and intended to cover roughly 6+ months of weekly releases.fetchReleasesForChangelog() uses customFetch() with getGitHubHeaders() and returns [] on network failure, non-OK response, non-JSON response, or a JSON value that is not an array; fetchStableChangelog() uses prefetchedReleases when supplied to avoid a duplicate API call, otherwise fetches releases, and returns null if none are available.X.Y.Z-dev.<unix-seconds> versions, computes since as (fromTs + 1) * 1000 to exclude the current version’s commit, computes until as (toTs + 1) * 1000 to include the target version’s commit, and requests https://api.github.com/repos/getsentry/cli/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100.fetchNightlyChangelog() returns null for invalid nightly timestamps, fetch failure, non-OK GitHub response, non-JSON data, a non-array response, or an empty commit array; valid commits are passed to buildNightlyChangelogSummary(commits, fromVersion, toVersion, maxItems).FetchChangelogOptions contains channel: "stable" | "nightly", fromVersion, toVersion, optional maxItems, and optional stable-only prefetchedReleases?: GitHubRelease[]; fetchChangelog(opts) dispatches nightly requests to fetchNightlyChangelog() and stable requests to fetchStableChangelog(), catches all failures and returns null, and is designed to run in parallel with binary download so changelog retrieval adds zero latency.