Skip to content

Commit b8e98cc

Browse files
committed
docs: Update docs-provider to 0.10.0 and use runAllTests
Upgrade @vendure-io/docs-provider from 0.9.0 to 0.10.0 and simplify the test-mdx.ts script to use the new unified runAllTests function which handles frontmatter, admonition, code language, and MDX validation.
1 parent da3865a commit b8e98cc

File tree

3 files changed

+8
-40
lines changed

3 files changed

+8
-40
lines changed

docs/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"typecheck": "tsc --noEmit"
3535
},
3636
"dependencies": {
37-
"@vendure-io/docs-provider": "^0.9.0"
37+
"@vendure-io/docs-provider": "^0.10.0"
3838
},
3939
"devDependencies": {
4040
"@types/node": "^22.10.10",

docs/scripts/test-mdx.ts

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,12 @@
11
import { manifest } from '../src/manifest.js';
2-
import {
3-
testManifestMdx,
4-
formatTestReport,
5-
createProgressReporter,
6-
validateAdmonitions,
7-
formatAdmonitionReport,
8-
} from '@vendure-io/docs-provider/testing';
2+
import { runAllTests } from '@vendure-io/docs-provider/testing';
93

104
async function main() {
115
const verbose = process.argv.includes('--verbose');
12-
let hasErrors = false;
136

14-
// Validate admonition syntax
15-
console.log('Validating admonition syntax...\n');
16-
const admonitionReport = validateAdmonitions(manifest);
17-
18-
if (admonitionReport.errors.length > 0) {
19-
console.log(formatAdmonitionReport(admonitionReport));
20-
hasErrors = true;
21-
} else {
22-
console.log(`✓ All admonitions valid (${admonitionReport.filesScanned} files scanned)\n`);
23-
}
24-
25-
// Test MDX compilation
26-
console.log('Testing MDX files...\n');
27-
28-
const report = await testManifestMdx(manifest, {
29-
onProgress: createProgressReporter(),
7+
await runAllTests(manifest, {
8+
verbose,
309
});
31-
32-
console.log('\n');
33-
console.log(formatTestReport(report, verbose));
34-
35-
if (report.failed > 0) {
36-
hasErrors = true;
37-
}
38-
39-
if (hasErrors) {
40-
process.exit(1);
41-
}
4210
}
4311

4412
main().catch((error) => {

0 commit comments

Comments
 (0)