DashboardcraftVerify version-gate constants against a…

Verify version-gate constants against actual package.json version before hardcoding them

Category: preference
Confidence: 0.80
ID: 019f8982-bb8b-70c4-8802-3cfb337fbe26
Project ID: e16af391-c497-4837-b681-c849a5514499
Cross-project: No
Recalled in other projects: 0
Source session: 0goKXKlJTHOVwC4wG
Created: 2026-07-22 11:07:54
Updated: 2026-07-22 11:07:54

Content

When implementing or reviewing minimum-version gates (e.g., WORKSPACES_MIN_VERSION, AUTO_VERSION), always cross-check the chosen constant against the current package.json version string before finalizing. Since checkMinimalConfigVersion requires the running package version to be >= a config's declared minVersion, setting a gate to a future/unreleased version (e.g., '2.28.0' when package.json is '2.27.0-dev.0') will break tests and block usage until release. Do not guess or hardcode a future release version — instead: (1) read package.json's actual version, (2) reason about how pre-release/dev suffixes compare in SemVer, and (3) if the correct value affects feature usability at release or requires a product decision, explicitly flag it to the user for confirmation rather than silently picking a value. Also verify whether the gate is even necessary given schema opt-in status.

Move to: