Dashboard › craft › Distillation
1eadb9af-57f0-4d4b-84f9-2c3b6d62b9b2["lore_tm_v1_KjjD3RGLOnxZVBqQneUCh5BpM9FZjCOZ0TMi6oRPmfU","lore_tm_v1_9_dCrP-ptQNhVizwpF0eVXoLDbLSY2_9Gq4Kb08r-ec","lore_tm_v1_e35rfwaUcQGZHEsslVu17Iid1lBVP3xJiYLyOwuDHsE","lore_tm_v1_-2-RCZ-xEYNkc7xN2TiRq5V44f4K-92nf4A_ODRVhJc","lore_tm_v1_rmrmdfU9BkssiHkPCCZ8hs3N1zzKjlsCafgGW6KUliw","lore_tm_v1_uIXGnL0B5Tl0nxHLpIYRhC87QLOFTYSDP_l-V5DE6IA","lore_tm_v1_VgRhz_8ReoUuYfSHEqxoMRoCcnK4DQZboM8wetTySpc","lore_tm_v1_4RVrAhrWYAnNP1XCz24ejxOTNlb7hqFHSaPes-1GK3s","lore_tm_v1_A2hWMjhCU4TPibO3opGxoDA2q7fIiI9ogSwsxZSqed0","lore_tm_v1_CHqF5i5RaXcmbOLCwqWquadKTPL28Biy_qUZnN3r590","lore_tm_v1_aaruclsebpXVXeEMbJXOx6Ly-P4n3vqrpA6_xeEr5Cw","lore_tm_v1_NWZJDXjhxi6xhNUqsik4dhKrQk9LzKxLqT6KipUB3yo","lore_tm_v1_wqwx-ljeMDBORg_W5Qq3KePCVuVELSxhgL1xPzvPwSo","lore_tm_v1_nYqBrDkGQ1_rmVgXvY0S0g4e3T9anAzsrTqjioOStt4","lore_tm_v1_nM6d5WZvkQ2VEidCN5l-9fbPPlRnIshWXckazCEczuQ","lore_tm_v1_kpESsga-6GHZ56BzM0phIM-mCZkZlsaWbJQBpNVoPWo","lore_tm_v1_8RnRTn2WtpB1clfyoLCtgLd1D3F34JQdmhz-Rhzz27g","lore_tm_v1_X6o7vRBnENGw8VJrYJgV9VXdZznXFB-oPer8loFCwOo","lore_tm_v1_BU04v-0p635_PBAjbE2-nmQaUj66kKqY-8h_qnHft4Q","lore_tm_v1_0vZfekBhQ95ngNxznFwnVwT_PVQSWEdUD4P5Y738Z_Q","lore_tm_v1_R-jwXoxud7JTeteH75_xsosonPKNPlmH9I4e9GGFHBs","lore_tm_v1_r8mvM-4tbHcoGT8LmqLmzekjWBEHopL3vUyJkx7SBaY","lore_tm_v1_6UK39qSF0K_7zI7fnrltVfKZSckmsjgPDKpZglX_VEw","lore_tm_v1_5AbGAVDyuFl_ACQJAEhbswyo5sbHyJV3iHEMUmXYZWc","lore_tm_v1_B5qfZR8gef3P8PsaFI0W5v54N5uNsimuoqfUpbQR7rM","lore_tm_v1_f_VbZA8MQlkPNQdXuS_dJzit5KrA7macH-t9gj5OjQU","lore_tm_v1_-LBzLTcF2xDeruqlbCDl8-1Hc_kzok-i0ggobStEbF0","lore_tm_v1_wu6OjCXcQLkxmZQCroOPl7ab3SI-t7HPfpAJQ8ptYHs","lore_tm_v1_a9nQTlWpeLNva7ByXtePLsiXlLcSUgFQCJDzEPH0la4","lore_tm_v1_p5ZF2OjsJubCCgbz9ghVT-JmUSNyEJhhFshc_aW_QWc","lore_tm_v1_FATGP-F6K-XEzD22xgBAFrvhhx_rg-h5pBeVIM0uid4"]
feat/workspaces-schema), in the dedicated worktree /home/byk/Code/getsentry/craft-workspaces-schema (earlier preparation also referenced /home/byk/Code/getsentry).https://github.com/getsentry/craft/pull/844) remains relevant or which pieces remain relevant.c099bbf97c27330e69d2d329dac817bd3f95e0b0 (Merge branch 'master' into feat/workspaces-schema), based on e5a7f97ad03f76d5265e0ac7b5deb38cfef19206. It includes unrelated current-master Vercel/dependency changes; final review must constrain evaluation to the PR’s intended workspace changes relative to master.src/utils/helpers.tssrc/config.tssrc/utils/__tests__/helpers.test.tssrc/__tests__/config.test.tsvitest run src/utils/__tests__/helpers.test.ts src/__tests__/config.test.ts failed before test execution with:
vitest: not foundELIFECYCLELocal package.json exists, but node_modules missing, did you mean to install?pnpm install --frozen-lockfile in /home/byk/Code/getsentry/craft-workspaces-schema, then rerun focused tests, typecheck/build/lint as appropriate, inspect diffs/adversarially review PR #848, commit/push/merge if clean, then assess PR #844./home/byk/Code/getsentry/craft: branch byk/fix/commit-on-repo at b06435e, with modified .lore.md and untracked .craft-issue-842-plan.md and .opencode/.pnpm; never use npm or yarn. Dependency installation must be pnpm install --frozen-lockfile.WORKSPACES_MIN_VERSION from '2.27.0' to '2.29.0'. Rationale: top-level workspaces support did not ship in 2.27.x or 2.28.0; feature is targeting 2.29.0. The active package development version is 2.29.0-dev.0.checkMinimalConfigVersion applies only to the current Craft version, never to the configured minVersion side. Thus 2.29.0-dev.0 may satisfy a configured stable 2.29.0, but a configured prerelease must not be artificially promoted/relaxed.build metadata before compatibility comparisons, because build metadata does not affect SemVer precedence. Preserve major/minor/patch and prerelease state as appropriate. This prevents crashes for values such as minVersion: "2.27.0+linux".node:util.parseArgs({ tokens: true }) should replace hand-rolled argv scanning where practical, with token validation for --workspace.
parseArgs values alone. On Node v24.18.0, it parses ["publish","--workspace","--dry-run"] as workspace: '--dry-run', which is invalid for desired semantics.--workspace --dry-run, trailing --workspace, and --workspace= must not create a bogus selection or suppress CRAFT_WORKSPACE.src/index.ts must establish active workspace before yargs parsing/builders because command builders (e.g. publish) can read configuration and derive --target choices before middleware runs. Middleware-based selection was rejected as too late.github only if it has both owner and repo; otherwise delete/unset it so getGlobalGitHubConfig() can detect from git remote. This was already fixed in commit 42d17f0.getGitClient() / createGitClient(directory) from src/utils/git.tsgetGitHubClient() from src/utils/githubApi.tssafeFs from src/utils/dryRun.tssafeExec() / safeExecSync() from src/utils/dryRun.tsisDryRun() remains suitable only for tools with native dry-run flags, mock data, and UX optimizations such as skip-sleep.pnpm build, pnpm test, pnpm lint, and pnpm fix; manual validation is pnpm build && ./dist/craft.feat/workspaces-schema42d17f0 (fix(config): address Bugbot findings on workspaces selector)42d17f0..c099bbf.c099bbf (Merge branch 'master' into feat/workspaces-schema).docs/src/content/docs/targets/vercel.md, src/targets/__tests__/vercel.test.ts, and src/targets/vercel.ts.4e2d8f4 (feat(config): add top-level workspaces schema + --workspace selector), f70d5a8 (#847), 83964a8 (#846), 0f8720e (#843). Merged-master history includes e5a7f97 (#866), 8cc5425 (#865), f9e4663 (#863), and dfa07f2.42d17f0:
src/config.ts#L136-L142, src/config.ts#L456-L459): workspace-only github.projectPath with no top-level GitHub config could create a truthy but incomplete object, make getGlobalGitHubConfig() skip remote detection, and yield no owner/repo.does not produce an incomplete github when base has none.extractWorkspaceSelection in src/utils/helpers.ts: valueless/bare flags and --workspace --dry-run do not treat flags as workspace names and do not suppress CRAFT_WORKSPACE; redundant post-parse middleware that clobbered pre-parse selection was removed.src/utils/helpers.ts
node:util.parseArgs with token validation.extractWorkspaceSelection(argv, env = process.env) remains the single precedence authority for CLI --workspace vs. CRAFT_WORKSPACE.--workspace foo and --workspace=foo;CRAFT_WORKSPACE;--workspace, --workspace --dry-run, trailing --workspace, and empty --workspace= fall back to environment or undefined;--prefixed option as workspace name;fixGlobalBooleanFlags(argv) to use Node parser facilities while preserving GLOBAL_BOOLEAN_FLAGS behavior for standalone --no-input/--dry-run flags and explicit --flag=no.src/config.ts
WORKSPACES_MIN_VERSION from '2.27.0' to '2.29.0'.versionGreaterOrEqualThan at src/config.ts#L519-L527.checkMinimalConfigVersion should still relax only a prerelease current version by stripping pre/build; configured minVersion prerelease semantics must remain intact.src/utils/__tests__/helpers.test.ts
--workspace foo, --workspace=foo, CLI-over-env, env-only, --workspace --dry-run, trailing bare --workspace, and --workspace=.src/__tests__/config.test.ts
WS_CONFIG uses minVersion: ${WORKSPACES_MIN_VERSION}, base GitHub owner: getsentry, repo: toolkit, changelog: CHANGELOG.md, and cli/mcp workspace fixtures.minVersion values with build metadata.2.29.0-dev.0, workspace fixture tests now also verify development-build equivalence against stable required version 2.29.0._activeWorkspaceName: string | undefined; setActiveWorkspace(name) invalidates _configCache and _globalGitHubConfigCache.applyWorkspaceSelection(config):
ConfigurationError;--workspace <name> or CRAFT_WORKSPACE, lists available choices;config.minVersion >= WORKSPACES_MIN_VERSION, then resolves workspace config.resolveWorkspaceConfig(base, workspaceName) strips workspaces, shallow-overrides workspace fields, shallow-merges github, preserves only complete owner/repo GitHub config, otherwise removes github to permit remote fallback.loadConfiguration() and loadConfigurationFromString() validate YAML, call checkMinimalConfigVersion(parsed), then cache applyWorkspaceSelection(parsed).checkMinimalConfigVersion has an existing debug-message typo: skpipping.isVersionGteMinVersion returns false when min version is absent or unparsable.@sentry/craft, version 2.29.0-dev.0; bins craft and sentry-craft map to dist/craft.v22.12.0; an initial shell reported Node v24.18.0, so use Volta/project-managed tooling for validation.master; CI tests Node 20 and 22.src/__tests__/*.test.ts; mocks use vi.fn(), vi.mock(), vi.spyOn()..prettierrc.yml.eslint.config.mjs, typescript-eslint; _-prefixed unused variables allowed.src/__mocks__/, src/__tests__/, src/artifact_providers/, src/commands/, src/schemas/, src/status_providers/, src/targets/, src/types/, src/utils/, src/config.ts, src/index.ts, src/logger.ts, and dist/craft..craft.yml is root configuration; schema is in src/schemas/.simple-git imports and direct new Octokit(). Wrapper modules needing raw simple-git require: // eslint-disable-next-line no-restricted-imports -- This is the wrapper module.--workspace scanning;2.27.x/2.28.0 did not ship feature; target 2.29.0);42d17f0.byk/fix/commit-on-repo at b06435e; PR #848 was feat/workspaces-schema at c099bbf; shell Node was v24.18.0; then-known package version output was 2.27.0-dev.0.node:util.parseArgs; discovered it incorrectly assigns --dry-run as a space-separated --workspace value. Chose token-stream validation.42d17f0 to c099bbf; noted branch merge includes unrelated current-master changes.v22.12.0, frozen lockfile install, standard commands, TypeScript/test/lint/dry-run rules, package version 2.29.0-dev.0, and project architecture.'2.27.0'; verified pre-yargs selection is necessary; identified concrete plan to use parseArgs tokens, raise gate to 2.29.0, and normalize build metadata.minVersion.src/utils/helpers.ts and src/config.ts implementing core review fixes.src/utils/__tests__/helpers.test.ts plus src/__tests__/config.test.ts for parser/build-metadata/version-gate regressions.node_modules is absent. Must install with pnpm install --frozen-lockfile before validation and onward PR/merge work.