Dashboard › craft › Distillation
8466317d-3903-4cd6-b994-4cba5cb0a3cb["lore_tm_v1_Aohyk02WHnFOW2DYWIy6ZEka50Vq0p2HxnUntTkWW6k","lore_tm_v1_VARyQDyixQaijiVYACFD-6hP_IQA2vdp7xfiTN7oVo8","lore_tm_v1_dkbMor6v-AR57fOkoJC41U-KEtTPh9CJMnit9h1SW4Y","lore_tm_v1_UWBsRvhXVB8PNyImzI6AStnJ2tYksA0YGt5D-5NXZPg","lore_tm_v1_QmGK3wtrO-drHDVQJiQwJJrRaxUlCOiwRqnqrIbgsXM","lore_tm_v1_kfpncZaNzPRqyzj6fofRC3MPgR6XinKUKKI-K3arGxY"]
Date: Aug 26, 2026
/home/byk/Code/getsentry/craft-workspace-action-propagation/src/commands/publish.ts, runPostReleaseCommand(newVersion, postReleaseCommand?) returns false without running when postReleaseCommand === ''; otherwise parses a specified command with shellQuote.parse(), or runs executable DEFAULT_POST_RELEASE_SCRIPT_PATH using /bin/bash; it appends '' and newVersion to arguments, calls spawnProcess() with buildReleaseCommandEnv({ CRAFT_RELEASED_VERSION: newVersion }), and returns true.publishMain(argv: PublishOptions) obtains the active configuration through getConfiguration() || {}, checks dirty Git state unless argv.noGitChecks, uses config.releaseBranchPrefix || DEFAULT_RELEASE_BRANCH_NAME, and either checks out argv.rev (resolving its branch name with git.raw('name-rev', '--name-only', '--no-undefined', rev)) or the release branch ${branchPrefix}/${newVersion}.publishMain(), it invokes findReleaseBranches(git, branchPrefix) and throws ConfigurationError containing the missing branch, a craft prepare suggestion, the configured/default prefix, exact branch matches, fuzzy prefix matches, or βNo release branches found on the remote,β plus the original error.publishMain() resolves revision = await git.revparse('HEAD'), obtains status/artifact providers, executes checkRevisionStatus(statusProvider, revision, argv.noStatusCheck), printRevisionSummary(artifactProvider, revision), and checkRequiredArtifacts(artifactProvider, revision, config.requireNames).publishMain() expands npm workspace targets through expandWorkspaceTargets(config.targets || []); SpecialTarget.All or SpecialTarget.None cannot be combined with any other target and causes an error log plus undefined return.getPublishStatePath(newVersion, getPublishStateGitHubConfig(publishStateGithubConfig), process.cwd(), getActiveWorkspace()), thereby propagating the selected workspace into publish-state filenames. getGlobalGitHubConfig() errors are caught and use null, allowing getPublishStatePath() to fall back to a cwd-hash-only filename in $XDG_STATE_HOME/craft/.publishMain() no longer reads legacy project-local .craft-publish-${newVersion}.json files due to attacker-influenceable repository contents; it warns users to migrate pre-seeded published-target state to the new $XDG_STATE_HOME/craft/ path.publishMain() parses it, resets targetsToPublish to all expanded target IDs, and skips each ID in publishState.published; otherwise it initializes publishState = { published: Object.create(null) }. Before publishing, it creates dirname(publishStateFile) with mkdirSync(..., { recursive: true }); after every successful publishToTarget(target, newVersion, revision), it records that target ID as true and writes JSON state with safeFs.writeFileSync().src/schemas/project_config.ts defines releaseUnitFields: github, targets, preReleaseCommand, postReleaseCommand, releaseBranchPrefix, changelog, changelogPolicy, requireNames, statusProvider, artifactProvider, versioning, and optional boolean noMerge (documented as defaulting to true for compiled GitHub Actions with a dist/ folder).WorkspaceSchema is z.object({ ...releaseUnitFields, github: GitHubGlobalConfigSchema.partial().optional() }); workspace fields are optional inherited overrides, and partial GitHub config specifically allows overriding projectPath, owner, or repo while inheriting other top-level GitHub fields.CraftProjectConfigSchema accepts optional minVersion, constrained by /^\d+\.\d+\.\d+.*$/, and optional workspaces: z.record(z.string(), WorkspaceSchema). Documentation distinguishes named independently-versioned Craft workspaces from an npm targetβs workspaces: true, which discovers packages within one target and publishes all at the same version.@sentry/craft version 2.31.0-dev.0; CLI binaries craft and sentry-craft both map to dist/craft. Test script is vitest run; typecheck script is tsc --noEmit; Volta pins Node 24.18.0 and pnpm 10.27.0.vitest run -- src/__tests__/action.test.ts src/commands/__tests__/publish.test.ts completed successfully: 60 test files passed; 1,132 tests passed and 1 skipped (1,133 total); duration 28.21s.src/targets/__tests__/symbolCollector.test.ts at assignments around lines 58 and 68: assignments to imported checkExecutableIsPresent will throw because imports are immutable./home/byk/Code/getsentry/publish-workspace-acceptance, vitest run src/modules/__tests__/details-from-context.js src/modules/__tests__/update-issue.js, passed: 2 test files and all 15 tests passed; duration 273ms.vitest.config.js:1:1 uses ESM syntax while loaded as CommonJS, unsupported by Viteβs future-default configLoader: 'native'; suggested remedies are a .mjs extension, "type": "module" in the closest package.json, or VITE_CONFIG_NATIVE_IGNORE_WARNING=true to suppress the warning.