Dashboard › craft › Distillation
2f296adb-5e97-4b18-9cb2-9c4d05ef888a["lore_tm_v1_rCPeGaxekh_wFuOptzbD0YbSwuvp1Nxf6IjKNqyWYxs","lore_tm_v1_7TUuQBEieZbbTXmqhbibMhwk2nkIPJoZsFzCl6rH9M4","lore_tm_v1_dQ_PlGhgy0Mr60QpSuihXaqb70Ho9jkhOVm8Z25UVLc","lore_tm_v1_vOeV21hq9Gbo6Aip9y1j1nvFv3HSZpmMZdhxadxaw8A","lore_tm_v1_MYi4ZdkKKKSAh-lAF1lat44Q-hb3G0gXrGrUTqvLIls","lore_tm_v1_zAyWu_mxp4O8q1mNNoLgjjnYdBLQnCJIQuZfKYwfOQw","lore_tm_v1_yRtLirCsNHgpqKuSlvikGi3xJl6jg-40HrvYI1u2npI"]
Date: Aug 24, 2026
--workspace --dry-run must never be mistaken for a workspace name.src/config.ts defines getNoMergeConfig(): NoMergeConfig, resolving noMerge in this order: explicit .craft.yml config.noMerge (source: 'config'), isCompiledGitHubAction(rootDir) auto-detection for Node.js GitHub Actions with a dist/ folder (noMerge: true, source: 'auto-detected'), then default merge behavior (noMerge: false, source: 'default'). rootDir is getConfigFileDir() || process.cwd().src/config.ts defines expandWorkspaceTargets(targets: TargetConfig[]): Promise<TargetConfig[]>; it lazily requires getTargetByName from ./targets to avoid a circular dependency, calls static expand(config, rootDir) on target classes satisfying ExpandableTargetClass, and otherwise preserves the target unchanged.src/schemas/project_config.ts defines TargetConfigSchema with name, optional id, optional includeNames, optional excludeNames, and .passthrough() for target-specific properties.src/schemas/project_config.ts defines releaseUnitFields shared by top-level configuration and named workspace release units: github, targets, preReleaseCommand, postReleaseCommand, releaseBranchPrefix, changelog, deprecated changelogPolicy, requireNames, statusProvider, artifactProvider, versioning, and noMerge.src/schemas/project_config.ts: a named workspace is an independently-versioned release unit, distinct from an npm targetβs workspaces: true package discovery. WorkspaceSchema inherits omitted fields from top-level configuration and accepts partial github configuration so it can override only projectPath, owner, or repo.CraftProjectConfigSchema in src/schemas/project_config.ts supports optional workspaces: z.record(z.string(), WorkspaceSchema). When workspaces exist, release runs require --workspace <name> or CRAFT_WORKSPACE; selected workspace fields override top-level fields. Without workspaces, top-level config remains the backward-compatible implicit single release unit.src/utils/helpers.ts sets MAX_STEP_OUTPUT_BYTES = 64 * 1024, chosen below the approximately 2 MB ARG_MAX kernel limit and GitHubβs approximately 65,536-character issue-body limit to avoid GitHub Actions E2BIG errors while retaining renderable truncated changelogs.src/utils/helpers.ts implements extractWorkspaceSelection(argv, env = process.env): reads CRAFT_WORKSPACE; parses raw args using Node parseArgs with options: { workspace: { type: 'string' } }, allowPositionals: true, strict: false, and tokens: true; supports --workspace foo and --workspace=foo; uses last-valid-value-wins semantics for repeated flags; permits inline --workspace=-foo but rejects a non-inline value beginning with -; returns the valid CLI selection or falls back to CRAFT_WORKSPACE.src/utils/helpers.ts defines envToBool() with falsy environment values '', 'undefined', 'null', '0', 'false', and 'no'; global flags default to 'dry-run': false, 'no-input': false, and 'log-level': 'Info'.src/utils/helpers.ts implements GitHub Actions output helpers: setGitHubActionsOutput(name, value) no-ops without GITHUB_OUTPUT, uses EOF_${Date.now()}_${Math.random().toString(36).slice(2)} heredoc delimiters for multiline values, and direct name=value output otherwise. writeGitHubActionsFile(name, content) no-ops without RUNNER_TEMP; otherwise writes ${RUNNER_TEMP}/craft/${name}.md, sets ${name}_file, and returns its absolute path.truncateForOutput(value, changelogUrl?) in src/utils/helpers.ts preserves values at most MAX_STEP_OUTPUT_BYTES; otherwise reserves bytes for either \n\n---\n*Changelog truncated.* or \n\n---\n*Changelog truncated. [View full changelog](${changelogUrl}).*, slices safely by UTF-8 bytes, removes a trailing Unicode replacement character \uFFFD if a multibyte codepoint was split, then appends the notice.src/index.ts resolves the active workspace before yargs parsing via setActiveWorkspace(extractWorkspaceSelection(argv)), because yargs command builders can read configuration before middleware and publish derives --target choices from workspace-resolved config.targets.src/index.ts CLI workspace option is global, string-typed, and described as selecting a named workspace/release unit; it is required when configuration defines "workspaces" and can be supplied through CRAFT_WORKSPACE.src/index.ts global flags: --no-input defaults to isCI and suppresses prompts; --dry-run defaults from process.env.DRY_RUN and prevents file writes, commits, pushes, and API mutations; --log-level defaults to Info. fixGlobalBooleanFlags() injects '1' after standalone global boolean flags so CLI presence is truthy while retaining string environment-variable coercion and --flag=no overrides.src/commands/publish.ts builds allowed --target choices from workspace-resolved getConfiguration().targets, filters to known target names, and maps them with BaseTarget.getId; if config resolution fails during parse time, it falls back to getAllTargetNames() rather than aborting parsing. Choices also include SpecialTarget.All and SpecialTarget.None; default is SpecialTarget.All.publish command options in src/commands/publish.ts: positional NEW-VERSION; --target/-t; --rev/-r; --merge-target/-m; --remote defaulting to 'origin'; booleans --no-merge, --keep-branch, --keep-downloads, --no-status-check, and --no-git-checks, all defaulting to false. checkVersion() rejects invalid versions with Invalid version provided: "<version>".getGitTagPrefix in src/utils/version.ts and src/utils/calver.ts; getConfigFileDir in src/utils/git.ts, src/utils/env.ts, and src/utils/changelog.ts; getGlobalGitHubConfig in src/utils/changelog.ts and src/commands/publish.ts; and expandWorkspaceTargets in src/commands/targets.ts and src/commands/publish.ts.WORKSPACES_MIN_VERSION, workspace fixture WS_CONFIG with named cli and mcp workspaces, backward compatibility without workspaces, selected-workspace override/inheritance behavior, unknown-workspace error Unknown workspace "nope", workspace version-gate coverage, and GitHub projectPath: 'cli' behavior.