Dashboard › craft › Distillation
1fc70ee7-b9ae-420c-9151-583eb06a4b29["lore_tm_v1_d4WWR4sYHOttqGQh7WQ4XESLwSd46k8CkD6Q6sIhevQ","lore_tm_v1_TGkvXF30jaL3ODUIsTVAkUf6Yt86-sl8OXPO4P6YmB0","lore_tm_v1_bZBhpS16ml6BWTGStETEqR8VdbFR8FowINldYXTqOT4"]
Date: Aug 25, 2026
--workspace <name>; CRAFT_WORKSPACE works through yargs .env('CRAFT') in index.ts:90; selector also accepted by prepare, publish, and targets. getConfiguration() should gain workspace-aware resolution through getActiveWorkspaceConfig(name?), merging top-level defaults with the chosen workspace into the same normalized config shape consumed by existing helpers.workspaces preserves current behavior as one implicit top-level workspace; defined workspaces with no --workspace must fail fast and list valid names; --workspace when workspaces is absent must error; _configCache should be keyed by workspace name or apply selection over a raw cached file. minVersion gating should mirror AUTO_VERSION_MIN_VERSION in config.ts:249.config.ts getConfiguration() (:147), getGlobalGitHubConfig() (:284), getGitTagPrefix() (:339), getVersioningPolicy() (:266), getChangelogConfig() (:450), providers (:366, :401), expandWorkspaceTargets() (:577), and getConfigFileDir()/projectPath changing to rootDir; prepare.ts lines :819-820, resolveVersion (:700), createReleaseBranch (:857), getLatestTag (:762, :870), changelog (:874), pre-release command (:904), and GitHub outputs (:923-962, product-qualified); publish.ts :563, release branch naming (:585-601), builder allowedTargetNames (:60-64), expandWorkspaceTargets (:672), publish-state key in publishState.ts:87, providers, and getNoMergeConfig.getLatestTag(git, prefix) in git.ts:45, versionToTag in version.ts:135, CalVer in calver.ts:80, and changelog base handling.path; a single config file requires an explicit workspace identifier in (1) issue title at action.yml:241, changing publish: <repo><subdir>@<version> to a workspace-qualified format, (2) craft targets at action.yml:184-196/commands/targets.ts, scoped to selected-workspace targets, (3) publishState.ts:78-91 state keys, and (4) a new workspace action.yml input threaded to craft prepare, craft targets, issue title, and labels. PUBLISH_REPO/self sentinel behavior remains unchanged.changelog.ts:61-63 should wrap getGitTagPrefix() in try/catch, as with versioningPolicy, so invalid/unreadable .craft.yml does not prevent standalone git-history-based craft changelog; (2) git.ts:255-270 findReleaseBranches should treat a release-branch prefix as opaque, cutting at its final / using lastIndexOf/slice rather than splitting/merging segments, eliminating shared release/-segment Levenshtein noise; (3) retain #844 prefix-aware getLatestTag --match read paths, tests, and docs.workspaces: schema, getActiveWorkspaceConfig, selector, --workspace CLI/env support, minVersion gate, caching, and tests; PR C threads workspaces through prepare/publish; PR D adds action.yml workspace input plus issue title/targets/state keying; PR E documents “release workspaces” vs npm package workspaces, per-.craft.yml migration, and examples. PR #844 is parked as a draft pointing to this design, with salvageable changes moved to PR A.workspaces: and adapt getsentry/publish, rather than retaining path/subdirectory identity; rationale: physical paths are not release identity, cannot handle shared/non-subdirectory products, and can silently merge same-version same-directory products onto one publish issue, while an explicit --workspace cli identity also addresses #649 (dotnet/nuget) and #394 (crates resume).github, changelog, versioning, etc. with per-workspace overrides; support both single-file workspaces: and per-.craft.yml models, with only a soft documentation deprecation of the per-file model and no current removal.getsentry/publish accept-side change is approved as additive: non-workspace repositories must emit the byte-identical current title; workspace releases use publish: <repo> [<workspace>] @<version>; the accept-side parser adds an optional capture group, requiring no existing repository changes.getsentry/publish accept-side support, is the sole shared-infrastructure/irreversible PR and should remain additive, isolated, and revertable. Do not ship --workspace selection before PR D because selector-induced publish-pipeline collisions are worse than either clean alternative.getsentry/publish accept-side parser and its tests in the separate repository; decide whether craft targets receives --workspace filtering or a new --all-workspaces mode for the action checklist.src/commands/__tests__/targets.test.ts mocks getConfiguration, expandWorkspaceTargets, and getAllTargetNames; it tests handler output for: ordinary targets {name:'npm'}, {name:'github'} producing ['npm','github']; workspace-expanded targets npm[@sentry/core], npm[@sentry/browser], and github; filtering {name:'unknown-target'} against allowed names ['npm','github']; empty targets: []; and undefined targets, with output emitted through console.log as JSON.src/utils/__tests__/helpers.test.ts tests envToBool mappings: falsy for undefined, null, false, 'undefined', 'null', '', '0', and 'no'; truthy for true, 'true', 1, '1', 'yes', and 'dogs are great!'.setGitHubActionsOutput tests in src/utils/__tests__/helpers.test.ts: creates a temporary GITHUB_OUTPUT; setGitHubActionsOutput('version', '1.2.3') writes exactly version=1.2.3\n; multiline setGitHubActionsOutput('changelog', 'line1\nline2') writes a randomized EOF_<digits>_<word> heredoc; when GITHUB_OUTPUT is unset, setGitHubActionsOutput('key', 'value') is a no-op and does not throw.writeGitHubActionsFile test setup sets RUNNER_TEMP and GITHUB_OUTPUT under path.join(tmpdir(), \craft-test-${Date.now()}`); it verifies content is written under RUNNER_TEMP/craft/changelog.md, output contains changelog_file=${filePath}, missing RUNNER_TEMPreturnsundefined, and calling writeGitHubActionsFile('test', 'data')creates the previously absentcraft/` subdirectory.