dsh-advisor 0.1.3-alpha.3 → 0.1.3-alpha.4
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/scripts/prepare-release.mjs +33 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-advisor",
|
|
3
|
-
"version": "0.1.3-alpha.
|
|
3
|
+
"version": "0.1.3-alpha.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "dsh plugin bundle porting the omp advisor subsystem: a per-session reviewer model that observes the primary transcript and injects severity-ranked advice (nit/concern/blocker).",
|
|
6
6
|
"repository": {
|
|
@@ -63,16 +63,42 @@ if (process.argv[2] !== undefined) {
|
|
|
63
63
|
process.exit(1)
|
|
64
64
|
}
|
|
65
65
|
} else {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
// Auto patch bump (mirrors sibling dsh-llm-fallbacks autoBumpPatch): parse
|
|
67
|
+
// the current version as X.Y.Z or X.Y.Z-pre, then:
|
|
68
|
+
// - formal version X.Y.Z -> X.Y.(Z+1) (0.1.2 -> 0.1.3)
|
|
69
|
+
// - prerelease with numeric tail -> bump only the tail, staying on the
|
|
70
|
+
// prerelease line (0.1.3-alpha.3 -> 0.1.3-alpha.4)
|
|
71
|
+
// - prerelease with non-numeric tail (e.g. 0.1.0-alpha) -> cannot auto
|
|
72
|
+
// bump; require an explicit version argument.
|
|
73
|
+
// The looser regex is deliberate: parseVersion (explicit args) requires a
|
|
74
|
+
// digit in the suffix, so it cannot tell "alpha" from a malformed version;
|
|
75
|
+
// this path needs the raw suffix to reject non-numeric tails with the
|
|
76
|
+
// explicit-version hint.
|
|
77
|
+
const m = /^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/.exec(pkg.version)
|
|
78
|
+
if (!m) {
|
|
68
79
|
console.error(`Error: cannot parse current package.json version "${pkg.version}".`)
|
|
69
80
|
process.exit(1)
|
|
70
81
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
const [, major, minor, patch, pre] = m
|
|
83
|
+
if (pre === undefined) {
|
|
84
|
+
target = { major: Number(major), minor: Number(minor), patch: Number(patch) + 1 }
|
|
85
|
+
} else {
|
|
86
|
+
const tail = pre.split('.').at(-1)
|
|
87
|
+
if (tail === undefined || !/^\d+$/.test(tail)) {
|
|
88
|
+
console.error(
|
|
89
|
+
`Error: cannot auto-bump "${pkg.version}": prerelease tail "${pre}" is not numeric. ` +
|
|
90
|
+
'Pass an explicit version instead (e.g. `node scripts/prepare-release.mjs 0.1.1-alpha.1`).',
|
|
91
|
+
)
|
|
92
|
+
process.exit(1)
|
|
93
|
+
}
|
|
94
|
+
const prefix = pre.slice(0, pre.length - tail.length) // "alpha." for "alpha.1"
|
|
95
|
+
target = {
|
|
96
|
+
major: Number(major),
|
|
97
|
+
minor: Number(minor),
|
|
98
|
+
patch: Number(patch),
|
|
99
|
+
prerelease: `${prefix}${Number(tail) + 1}`,
|
|
100
|
+
}
|
|
101
|
+
}
|
|
76
102
|
}
|
|
77
103
|
|
|
78
104
|
const version =
|