dsh-plugin-toolkit 0.20.27 → 0.20.28
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 +11 -0
- package/lib/doctor.mjs +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.20.28
|
|
2
|
+
|
|
3
|
+
- **`doctor` reads a README saved with a UTF-8 BOM instead of calling its
|
|
4
|
+
Requirements section missing.** A file written by Notepad starts with U+FEFF,
|
|
5
|
+
so a README whose first line is `## Requirements` began with the marker
|
|
6
|
+
rather than `#`; both the local and `--remote` check reported `README.md has
|
|
7
|
+
no Requirements section` even though it was there. The shared README reader
|
|
8
|
+
now strips the BOM through the same helper the manifest reader uses, while a
|
|
9
|
+
BOM README without the heading still fails. Tests pin the local and remote
|
|
10
|
+
first-line cases and the missing-heading control.
|
|
11
|
+
|
|
1
12
|
## 0.20.27
|
|
2
13
|
|
|
3
14
|
- **`fix --remote` reads a `package.json` saved with a UTF-8 BOM, so the host
|
package/lib/doctor.mjs
CHANGED
|
@@ -184,13 +184,17 @@ export function checkHostCompatibility(manifest, hostVersion) {
|
|
|
184
184
|
* same repository.
|
|
185
185
|
*/
|
|
186
186
|
export function checkReadmeText(text, manifest) {
|
|
187
|
-
|
|
187
|
+
// A README saved by Notepad starts with a BOM, which would sit between the
|
|
188
|
+
// start of the file and a first-line `## Requirements` heading. The heading
|
|
189
|
+
// is there; strip the marker before deciding it is not.
|
|
190
|
+
const readme = stripBom(text);
|
|
191
|
+
if (/^#{1,3}\s*Requirements/im.test(readme) === false) {
|
|
188
192
|
return 'README.md has no Requirements section, so users cannot tell which host it needs';
|
|
189
193
|
}
|
|
190
194
|
const range = hostRange(manifest);
|
|
191
195
|
// ">= 0.2.0" and ">=0.2.0" are the same range; authors write both.
|
|
192
196
|
const squeeze = (value) => value.replace(/\s+/g, '');
|
|
193
|
-
if (range !== null && squeeze(
|
|
197
|
+
if (range !== null && squeeze(readme).includes(squeeze(range)) === false) {
|
|
194
198
|
return `README.md does not mention the host range "${range}" it declares`;
|
|
195
199
|
}
|
|
196
200
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.28",
|
|
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": {
|