@skitterbyte/skitterspec-azure-boards 3.1.1 → 3.1.2
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 +1 -1
- package/src/cli.js +10 -1
- package/src/env/serve.js +24 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skitterbyte/skitterspec-azure-boards",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Spec-driven development for Claude Code, with one-way Azure Boards sync — a superset of @skitterbyte/skitterspec: the base filesystem workflow plus /spec-status · /spec-push · /spec-claim and the spec-sync CLI, mirroring specs to Azure DevOps work items with parent/child hierarchy, assignment and a release work item per tag. The repo is canonical; Boards is a generated mirror. Install this OR the base OR one other superset — exactly one.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
package/src/cli.js
CHANGED
|
@@ -6668,6 +6668,10 @@ async function specEnvReview(dir, config, specArg, flags, invokedFrom = dir) {
|
|
|
6668
6668
|
`the server was running engine ${up.engineWas} and could not be replaced (${up.error}) — ` +
|
|
6669
6669
|
`its pages are drawn by that engine`
|
|
6670
6670
|
: `the server was running engine ${up.engineWas}; restarted on ${up.engineIs}`
|
|
6671
|
+
} else if (up.engine === 'newer') {
|
|
6672
|
+
// LOUD, because this render's own engine is the old one: its page is
|
|
6673
|
+
// served by a later engine than the one that wrote it.
|
|
6674
|
+
serverSaid = `the server runs engine ${up.engineWas}, newer than this one (${up.engineIs}) — kept it`
|
|
6671
6675
|
}
|
|
6672
6676
|
if (!up.error) {
|
|
6673
6677
|
// The URLs come from the bind the server HAS, not the one asked for just
|
|
@@ -7214,6 +7218,8 @@ async function ensureReviewServer(dir, config, { host = '127.0.0.1', port, resta
|
|
|
7214
7218
|
started: false,
|
|
7215
7219
|
// `current` needs no comment and `unknown` claims nothing — a server
|
|
7216
7220
|
// from before the version was recorded is healthy, not suspect.
|
|
7221
|
+
// `newer` is adopted too, and the render says so: replacing it would
|
|
7222
|
+
// put an older engine behind every spec's page.
|
|
7217
7223
|
engine: verdict,
|
|
7218
7224
|
engineWas: settings.engine || null,
|
|
7219
7225
|
engineIs: now,
|
|
@@ -7416,7 +7422,9 @@ async function specEnvReviewServe(dir, config, flags) {
|
|
|
7416
7422
|
(settings.engine ? ` engine: ${settings.engine}\n` : '') +
|
|
7417
7423
|
(verdict === 'stale'
|
|
7418
7424
|
? ` the engine moved under it — this one is ${engineVersionFor(proc.script)}\n`
|
|
7419
|
-
: ''
|
|
7425
|
+
: verdict === 'newer'
|
|
7426
|
+
? ` newer than this engine (${engineVersionFor(proc.script)}) — kept, not downgraded\n`
|
|
7427
|
+
: ''),
|
|
7420
7428
|
)
|
|
7421
7429
|
return
|
|
7422
7430
|
}
|
|
@@ -8741,6 +8749,7 @@ module.exports = {
|
|
|
8741
8749
|
serveProcFor,
|
|
8742
8750
|
serverScriptOk,
|
|
8743
8751
|
daemonScript,
|
|
8752
|
+
ensureReviewServer,
|
|
8744
8753
|
reviewServedUrls,
|
|
8745
8754
|
memberPageLink,
|
|
8746
8755
|
restartHost,
|
package/src/env/serve.js
CHANGED
|
@@ -938,6 +938,22 @@ function engineVersionFor(scriptPath) {
|
|
|
938
938
|
return null
|
|
939
939
|
}
|
|
940
940
|
|
|
941
|
+
// Order two `X.Y.Z[-pre]` versions: negative, zero or positive, or null when
|
|
942
|
+
// either is not one. A release sorts after its own pre-releases, as in semver;
|
|
943
|
+
// pre-release labels compare as strings.
|
|
944
|
+
function compareVersions(a, b) {
|
|
945
|
+
const parse = (v) => /^(\d+)\.(\d+)\.(\d+)(?:-([^+]+))?(?:\+.*)?$/.exec(v)
|
|
946
|
+
const x = parse(a)
|
|
947
|
+
const y = parse(b)
|
|
948
|
+
if (!x || !y) return null
|
|
949
|
+
for (let i = 1; i <= 3; i++) {
|
|
950
|
+
if (Number(x[i]) !== Number(y[i])) return Number(x[i]) - Number(y[i])
|
|
951
|
+
}
|
|
952
|
+
if (!x[4] !== !y[4]) return x[4] ? -1 : 1
|
|
953
|
+
if (!x[4]) return 0
|
|
954
|
+
return x[4] < y[4] ? -1 : x[4] > y[4] ? 1 : 0
|
|
955
|
+
}
|
|
956
|
+
|
|
941
957
|
/**
|
|
942
958
|
* Is the running server executing the engine this one would start? Pure.
|
|
943
959
|
*
|
|
@@ -952,11 +968,18 @@ function engineVersionFor(scriptPath) {
|
|
|
952
968
|
* `running` is null whenever `engineVersionFor` could not read a package at all
|
|
953
969
|
* (a bundled build, an odd install layout). Both are answered `unknown`, and
|
|
954
970
|
* neither is evidence of anything.
|
|
971
|
+
*
|
|
972
|
+
* AND A FOURTH, `newer`: the running server is a LATER engine than this one.
|
|
973
|
+
* Replacing it would be a downgrade. That happened when a worktree pinned at an
|
|
974
|
+
* old release ran its own older engine, and the shared server was restarted
|
|
975
|
+
* from 2.19.0 down to 2.5.0. The caller adopts a newer server. Versions that
|
|
976
|
+
* cannot be ordered (not `X.Y.Z[-pre]`) are `stale` as before, so this only
|
|
977
|
+
* ever narrows a restart and never adds one.
|
|
955
978
|
*/
|
|
956
979
|
function staleServer(recorded, running, recordedMtime, runningMtime) {
|
|
957
980
|
if (typeof recorded !== 'string' || !recorded) return 'unknown'
|
|
958
981
|
if (typeof running !== 'string' || !running) return 'unknown'
|
|
959
|
-
if (recorded !== running) return 'stale'
|
|
982
|
+
if (recorded !== running) return compareVersions(recorded, running) > 0 ? 'newer' : 'stale'
|
|
960
983
|
|
|
961
984
|
// SAME VERSION IS NOT SAME CODE, which is the whole of this addition. The
|
|
962
985
|
// daemon runs a built copy of the engine — in this repo a symlink to the
|