DashboardcraftCraft config.ts: extract pure isVersion…

Craft config.ts: extract pure isVersionGteMinVersion to avoid getConfiguration() circularity

Category: pattern
Confidence: 0.85
ID: 019f8985-3ad3-73bd-9e8f-4773c04e0407
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 0goKXKlJTHOVwC4wG
Created: 2026-07-22 11:10:37
Updated: 2026-07-22 11:10:37

Content

requiresMinVersion() in src/config.ts internally calls getConfiguration(), so reusing it inside workspace-resolution logic (which itself feeds getConfiguration()) risks circular calls. Fix: extracted a pure helper isVersionGteMinVersion(minVersionRaw, requiredVersion) — just parseVersion + versionGreaterOrEqualThan, no getConfiguration() call — and had requiresMinVersion() delegate to it. When adding new version-gate logic that must run during config resolution itself, factor out the pure comparison logic first rather than calling existing config-dependent wrapper functions. Applied in getsentry/craft PR #848 (feat/workspaces-schema).

Move to: