dsh-plugin-toolkit 0.20.41 → 0.20.42
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 +14 -0
- package/lib/remote.mjs +21 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 0.20.42
|
|
2
|
+
|
|
3
|
+
- **`doctor --remote` and `audit --remote` name a `package.json` that is not a
|
|
4
|
+
JSON object.** A manifest holding `null`, a string, a number or an array
|
|
5
|
+
parses as JSON, but the remote reader moved on and either failed inside the
|
|
6
|
+
first field check (`Cannot read properties of null`) or treated the array as
|
|
7
|
+
an empty object. The local reader already refuses those shapes with "does not
|
|
8
|
+
hold a JSON object"; the remote path now reports the same sentence as a
|
|
9
|
+
`manifest` failure naming the repository, and a host comparison stops there
|
|
10
|
+
instead of fabricating a range or verdict. A real object manifest still gets
|
|
11
|
+
the same compatibility answer. `test/audit-remote-manifest-shape.test.mjs`
|
|
12
|
+
pins the five shapes through the library, the CLI text row, `doctor --remote`
|
|
13
|
+
and the `--host`/`--json` path, with an object control.
|
|
14
|
+
|
|
1
15
|
## 0.20.41
|
|
2
16
|
|
|
3
17
|
- **`index` rejects an unauditable market index instead of reporting it clean
|
package/lib/remote.mjs
CHANGED
|
@@ -384,6 +384,27 @@ export async function auditRemote(
|
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
386
|
|
|
387
|
+
// npm's manifest is an object. A file holding `null`, a string or an array
|
|
388
|
+
// parses as JSON but every check below then reads a field off the wrong
|
|
389
|
+
// shape. The local reader already rejects those values with a sentence that
|
|
390
|
+
// names the file; without the same check here, `doctor --remote` and
|
|
391
|
+
// `audit --remote` reported a generic `target: Cannot read properties of
|
|
392
|
+
// null` (or silently treated the array as a manifest) and could not give the
|
|
393
|
+
// host verdict the compatibility reports ask for.
|
|
394
|
+
if (manifest === null || typeof manifest !== 'object' || Array.isArray(manifest) === true) {
|
|
395
|
+
fail('manifest', `package.json at ${slug} does not hold a JSON object`);
|
|
396
|
+
return withHost({
|
|
397
|
+
target: parsed,
|
|
398
|
+
manifest: null,
|
|
399
|
+
raw,
|
|
400
|
+
failures,
|
|
401
|
+
checked,
|
|
402
|
+
unreadable,
|
|
403
|
+
...(rateLimited ? { rateLimited: true, rateLimit } : {}),
|
|
404
|
+
notes: notesFor(false),
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
|
|
387
408
|
checked.push(['name', checkName(manifest)]);
|
|
388
409
|
checked.push(['version', checkVersion(manifest)]);
|
|
389
410
|
const enginesCheck = checkHostRange(manifest);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.42",
|
|
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": {
|