diff --git a/SCARP-DOCS-ENGINE.md b/SCARP-DOCS-ENGINE.md index 079aaf8..cb927d7 100644 --- a/SCARP-DOCS-ENGINE.md +++ b/SCARP-DOCS-ENGINE.md @@ -16,7 +16,7 @@ The new engine lives in scripts/scarp-site/ and loads no VitePress or Vue websit | test.ts | Static route, Unicode, SEO, markup, search and release-evidence tests | | browser-test.ts | Real Chromium keyboard, mobile, search, Command Finder and axe WCAG A/AA tests | -The build uses focused Markdown (markdown-it) and YAML (yaml) parsers, not a website framework. The browser code is standalone TypeScript compiled with TypeScript itself, without a JavaScript UI framework or bundler. Release command data now lives in the framework-neutral `scripts/lib/command-finder.ts` module used directly by the Scarp-owned renderer, browser tests and release validators. The old theme-tree import is a one-line compatibility export only for the historical Vue demo; it can be removed alongside the other legacy theme/config files after the remaining migration gates pass. +The build uses focused Markdown (markdown-it 15 with its own TypeScript declarations) and YAML (yaml) parsers, not a website framework. The obsolete `@types/markdown-it` 14.x package is intentionally excluded and rejected by toolchain policy to prevent split parser types. The browser code is standalone TypeScript compiled with TypeScript itself, without a JavaScript UI framework or bundler. Release command data now lives in the framework-neutral `scripts/lib/command-finder.ts` module used directly by the Scarp-owned renderer, browser tests and release validators. The old theme-tree import is a one-line compatibility export only for the historical Vue demo; it can be removed alongside the other legacy theme/config files after the remaining migration gates pass. ## Commands diff --git a/package.json b/package.json index e4f5247..ae71b65 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,6 @@ "playwright": "1.64.1", "axe-core": "4.14.0", "markdown-it": "15.0.3", - "@types/markdown-it": "14.1.2", "yaml": "2.9.1" }, "engines": { diff --git a/scripts/lib/toolchain-policy.ts b/scripts/lib/toolchain-policy.ts index 9114f1b..6758cdf 100644 --- a/scripts/lib/toolchain-policy.ts +++ b/scripts/lib/toolchain-policy.ts @@ -28,6 +28,13 @@ export function validateToolchain(pkg: ToolchainPackage, dependabotYaml: string) errors.push(dependency + ' must be an explicitly pinned source-parsing dependency') } } + // markdown-it 15+ ships its own declarations. Stale DefinitelyTyped 14.x + // declarations would introduce duplicate, version-mismatched interfaces. + const parser = deps['markdown-it'] + const parserMajor = typeof parser === 'string' ? Number.parseInt(parser.split('.')[0] ?? '', 10) : NaN + if (parserMajor >= 15 && '@types/markdown-it' in deps) { + errors.push('markdown-it 15+ bundles its own types: remove obsolete @types/markdown-it') + } for (const removed of ['vitepress','vue-tsc']) { if (removed in deps) errors.push('Removed framework/checker dependency must not return: ' + removed) } diff --git a/scripts/test-toolchain.ts b/scripts/test-toolchain.ts index d27ce5e..93ccd14 100644 --- a/scripts/test-toolchain.ts +++ b/scripts/test-toolchain.ts @@ -35,6 +35,9 @@ for (const [name, changed] of [ ] as const) { mustFail(name,mutatePackage({devDependencies:changed})) } +mustFail('obsolete markdown-it type package',mutatePackage({ + devDependencies:{'@types/markdown-it':'14.1.2'} +}),yaml,'@types/markdown-it') mustFail('missing Markdown parser',mutatePackage({ devDependencies:{'markdown-it':undefined} }),yaml,'markdown-it')