dsh-plugin-toolkit 0.20.37 → 0.20.38
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/CHANGELOG.md +21 -0
- package/lib/doctor.mjs +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 0.20.38
|
|
2
|
+
|
|
3
|
+
- **`doctor` accepts SemVer 2.0 build metadata in `version`, and rejects
|
|
4
|
+
malformed pre-release and build identifiers.** The hand-written check only
|
|
5
|
+
allowed an optional pre-release and no `+build`, so valid package versions
|
|
6
|
+
(`1.0.0+build.5`, `2.3.4+sha.abc`, `0.1.0+20261103`) failed as `not semver`
|
|
7
|
+
and `release --dry-run` stopped at preflight even though npm accepts them.
|
|
8
|
+
The same loose pre-release pattern let `1.0.0-..` and `1.0.0-.` through. The
|
|
9
|
+
check now follows SemVer 2.0's core, pre-release and build grammar, so empty
|
|
10
|
+
identifiers and leading zeros in numeric identifiers fail. The acceptance
|
|
11
|
+
covers `checkVersion`, `doctor` at the process boundary, the
|
|
12
|
+
`release --dry-run` plan and the invalid forms in
|
|
13
|
+
`test/doctor-version-semver.test.mjs`; `docs/repair.md` states the same rule.
|
|
14
|
+
|
|
15
|
+
- **The build-metadata acceptance is checked against npm itself.** The CLI
|
|
16
|
+
regression test now runs `doctor`, `release --dry-run` and
|
|
17
|
+
`npm pack --dry-run` on the same three fixtures and requires
|
|
18
|
+
`doctor_ok=3 release_ok=3 pack_ok=3`, so a future version check cannot drift
|
|
19
|
+
away from what npm will actually pack even if the two toolkit paths still
|
|
20
|
+
agree with each other.
|
|
21
|
+
|
|
1
22
|
## 0.20.37
|
|
2
23
|
|
|
3
24
|
- **The README tarball gate reads every relative `node <path>` command, not
|
package/lib/doctor.mjs
CHANGED
|
@@ -14,7 +14,19 @@ import { resolvePath } from './paths.mjs';
|
|
|
14
14
|
|
|
15
15
|
export { hostCompatibility } from './compat.mjs';
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// SemVer 2.0's whole grammar, not just a prefix test. `npm pack` and `npm
|
|
18
|
+
// publish` accept build metadata (`1.0.0+build.5`), and a pre-release or build
|
|
19
|
+
// identifier cannot be empty or split by a bare dot (`1.0.0-..`). Numeric
|
|
20
|
+
// identifiers also cannot carry leading zeros, while build identifiers may.
|
|
21
|
+
const SEMVER_NUMBER = '0|[1-9]\\d*';
|
|
22
|
+
const SEMVER_PRERELEASE_ID = `(?:${SEMVER_NUMBER}|\\d*[A-Za-z-][0-9A-Za-z-]*)`;
|
|
23
|
+
const SEMVER_BUILD_ID = '[0-9A-Za-z-]+';
|
|
24
|
+
const SEMVER = new RegExp(
|
|
25
|
+
`^(?:${SEMVER_NUMBER})\\.(?:${SEMVER_NUMBER})\\.(?:${SEMVER_NUMBER})` +
|
|
26
|
+
`(?:-(?:${SEMVER_PRERELEASE_ID})(?:\\.(?:${SEMVER_PRERELEASE_ID}))*)?` +
|
|
27
|
+
`(?:\\+(?:${SEMVER_BUILD_ID})(?:\\.(?:${SEMVER_BUILD_ID}))*)?$`,
|
|
28
|
+
'u',
|
|
29
|
+
);
|
|
18
30
|
|
|
19
31
|
/**
|
|
20
32
|
* npm publishes and installs by `name`; a missing, empty or malformed one fails
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.38",
|
|
4
4
|
"description": "Preflight, release and test DeepSeek Harness plugins: check a folder or any GitHub repository, wait for npm to actually serve the version, and keep the market index honest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|