Dashboard › craft › Distillation
ced532cb-8255-4508-bc27-7fa6c61c1a72["lore_tm_v1_w8Wquy7Ei5LJ02s79EOZEWJDi9x4wgtDSf7g5WRCsvQ","lore_tm_v1_JII6VjWvTFP_v2ghVz18HJJ1WQjrAj-L74bx6kJL62U","lore_tm_v1_tlF61Zg63D_8IzPGoGcDjJLA8UCIMtdxVk8TR9jTAHU","lore_tm_v1_kkgw4mK1FP1lNLZq0BXUckOJiwzjHDMH5G3fqNDUgZc","lore_tm_v1_JdXKSPiSN3QbXP0QxfV9UE7VPaUhzUGEiOyztrogEjI","lore_tm_v1_gTEWafP8vWWFWqKn0nxKPioX9pE2iDPQ4fq391tAjlQ","lore_tm_v1_5fLKD2P2RX0-nF2uvTJYvDORCWCkLfSjqTbVozVwjlA","lore_tm_v1_VAqS6D4cmjCI2rLkeqnSkddaCFivKVoSUtuKHTIn4-Y","lore_tm_v1_0iWdRjZu4gP_0NFvoYr7K2QW5BSWv2RmLuyl0TNT7ME","lore_tm_v1_W3olXKfe212VLQN3LAom_J4li70eKsP17FcBjAM1zwU"]
Date: Aug 28, 2026
/home/byk/Code/getsentry/craft-workspace-action-propagation/src/commands/ contents: __tests__/, artifacts_cmds/, artifacts.ts, changelog.ts, config.ts, prepare.ts, publish.ts, targets.ts, workspace_cmds/, and workspace.ts.src/commands/artifacts.ts: artifacts <command> has aliases a and artifact, description π¦ Manage artifacts, requires string --rev/-r (βRevisionβ), and registers artifacts_cmds/list and artifacts_cmds/download; ArtifactsOptions contains rev: string.src/commands/changelog.ts: changelog accepts optional --since/-s (base tag/SHA), optional numeric --pr (fetches GitHub PR information and highlights it), and --format/-f choices text | json, default text.changelogMain() in src/commands/changelog.ts obtains a Git client; when --since is absent, it reads getGitTagPrefix() only if findConfigFile() succeeds, catches unreadable/broken config and falls back to the latest unprefixed tag via getLatestTag(git, tagPrefix), and generates history from the beginning when no tags exist.src/commands/changelog.ts uses generateChangelogWithHighlight(git, since, argv.pr) when --pr is provided, otherwise generateChangesetFromGit(git, since); JSON output includes changelog, bumpType, versioningPolicy (default 'auto' if config unavailable), totalCommits, matchedCommitsWithSemver, and prSkipped defaulting to false; text output prints No changelog entries found. for an empty changelog.src/index.ts: imports and registers commands prepare, publish, targets, config, artifacts, changelog, and workspace; it sanitizes dynamic-linker environment variables before other CLI work via sanitizeDynamicLinkerEnv(), warns if a Craft env file exists, and wraps main in withTracing(main, { name: 'craft.cli', op: 'cli' }).src/index.ts defines global boolean flags --no-input (coerced with envToBool, defaults to isCI, suppresses prompts) and --dry-run (coerced with envToBool, defaults to process.env.DRY_RUN, prevents file writes, commits, pushes, and API mutations); fixGlobalBooleanFlags() injects '1' immediately after a standalone recognized flag so CLI presence is truthy while --flag=no remains supported.--workspace is never mistaken for a workspace name.src/index.ts resolves workspace selection before yargs parsing using setActiveWorkspace(extractWorkspaceSelection(argv)), because yargs command builders can read configuration (including publish target choices) before middleware; global --workspace is a string release-unit selector, required when config defines workspaces, and CRAFT_WORKSPACE is its environment-variable counterpart.src/utils/helpers.ts parses --workspace foo and --workspace=foo using Node built-in option parsing; an earlier workspace value can be cleared by a later bare --workspace, it then falls back to CRAFT_WORKSPACE, and inline --workspace=-foo is valid whereas --workspace --foo is not.src/utils/publishState.ts isolates publish-state files by optional selected release workspace, using lossless Base64url encoding: workspace-${Buffer.from(workspace).toString('base64url')}-; generated names are either publish-state-${owner}-${repo}-${shortCwdHash(cwd)}-${workspacePrefix}${safeVersion}.json or publish-state-${cwdDigest}-${workspacePrefix}${safeVersion}.json.src/utils/workspaces.ts handles package-manager workspaces separately from release workspaces: discovers npm/yarn workspaces from package.json workspaces, pnpm workspaces from pnpm-workspace.yaml, identifies inter-workspace dependencies, filters packages by include/exclude patterns, and topologically sorts them while reporting circular dependency package names.src/__tests__/action.test.ts: the test harness creates temporary directories named with craft-action-test-, mock craft, git, and gh executables, and captures Craft calls, Git calls, GitHub issue titles, and GitHub output.src/__tests__/action.test.ts verifies GitHub Action handling of option-looking workspace name --config-from=untrusted: Craft Prepare and Read Craft Targets must invoke Craft as prepare --workspace=--config-from=untrusted and targets --workspace=--config-from=untrusted, respectively.src/__tests__/action.test.ts verifies Validate workspace is the first Action step; workspace inputs containing control characters (cli\tnext), format characters (cli\u202enext), line separator (cli\u2028next), or paragraph separator (cli\u2029next) fail before any Git or Craft invocation. Empty workspace and cli-v2 succeed.src/__tests__/action.test.ts verifies a non-root PATH_INPUT (packages/cli) combined with workspace cli fails before Git/Craft side effects; workspace cli/v2 fails compact-title grammar validation before side effects.src/__tests__/action.test.ts verifies Action publish-request titles: root workspace produces publish: getsentry/toolkit@1.2.3; workspace cli produces publish: getsentry/toolkit/cli@1.2.3..github/workflows/release.yml declares/forwards workspace; action.yml declares a workspace input; src/config.ts exports getWorkspaceNames(); src/commands/workspace.ts defines workspace <command>; and src/commands/workspace_cmds/list.ts prints formatJson(getWorkspaceNames()).package.json: project is @sentry/craft version 2.31.0-dev.0, exposes craft and sentry-craft binaries at dist/craft, uses Node 24.18.0 and pnpm 10.27.0 via Volta, and scripts include build, cli, lint, format, test (vitest run), and typecheck (tsc --noEmit).package.json uses TypeScript ^5.7.2, Vitest ^4.1.0, Vite ^7.3.5, yargs ^18, Zod ^3.24.1, and includes pnpm security/version overrides such as fast-xml-parser: ^5.8.0, minimatch: ^10.2.6, rollup: ^4.59.0, uuid: ^14.0.0, and esbuild@<0.28.1: ^0.28.1.tsconfig.json: extends ./tsconfig.build.json; enables types node and vitest/globals, incremental: true, and tsBuildInfoFile: ".tsbuildinfo"; includes src/**/*.ts, **/__mocks__/**/*.ts, and **/__tests_/**/*.ts, while excluding dist/**/*.