@tokenoftrust/cli 1.3.0-rc.0 → 1.3.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/cli",
3
- "version": "1.3.0-rc.0",
3
+ "version": "1.3.0-rc.1",
4
4
  "description": "Token of Trust developer CLI — check out a tenant store, run it locally with save→reload, and submit it for preview. Installs the `tot` command.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Token of Trust",
@@ -386,7 +386,15 @@ export function pickRunnerVersion(meta, { cliVersion, explicitPin }) {
386
386
  return { version: distTags[explicitPin] || explicitPin, reason: `pinned ${explicitPin}` };
387
387
  }
388
388
 
389
- // 2) CLI-minor match: highest published <major>.<minor>.* (numeric patch order).
389
+ // 2) EXACT CLI-version match the primary path for a lockstep release: the runner
390
+ // is published at the SAME version as the CLI (incl. prereleases like 1.3.0-rc.0,
391
+ // which the stable-only minor match below deliberately skips). This is what makes
392
+ // `tot@1.3.0-rc.0` pull `runner@1.3.0-rc.0` instead of falling back to stale latest.
393
+ if (versions.includes(cliVersion)) {
394
+ return { version: cliVersion, reason: "exact CLI-version match" };
395
+ }
396
+
397
+ // 3) CLI-minor match: highest published <major>.<minor>.* (numeric patch order).
390
398
  const m = /^(\d+)\.(\d+)\./.exec(cliVersion || "");
391
399
  if (m) {
392
400
  const prefix = `${m[1]}.${m[2]}.`;
@@ -398,7 +406,7 @@ export function pickRunnerVersion(meta, { cliVersion, explicitPin }) {
398
406
  }
399
407
  }
400
408
 
401
- // 3) Fallback: the `latest` dist-tag (pre-alignment safety net).
409
+ // 4) Fallback: the `latest` dist-tag (pre-alignment safety net).
402
410
  if (distTags.latest) return { version: distTags.latest, reason: "fell back to latest (no CLI-minor match)" };
403
411
  throw new Error("no publishable runner version (no CLI-minor match and no `latest` dist-tag)");
404
412
  }