Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix: resolve absolute vs relative path comparison in link checker
Use resolve() to normalize paths before deduplication so absolute paths from Fumadocs sources match relative paths from glob. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 17, 2026 at 20:17 UTC
5f7ad3374b00e982dfd3788a4b3c19960fb5fee0
1 file changed
+3
-2
docs/scripts/validate-links.ts
+3
-2
@@ -1,5 +1,6 @@
1
import { readFile } from 'node:fs/promises';
2
import { glob } from 'node:fs/promises';
3
+import { resolve } from 'node:path';
4
import {
5
type FileObject,
6
printErrors,
@@ -162,10 +163,10 @@ async function getFiles(): Promise<FileObject[]> {
163
}
164
165
// Scan any .md files under content/ not already covered by Fumadocs sources
165
- const coveredPaths = new Set(allFiles.map((f) => f.path));
166
+ const coveredPaths = new Set(allFiles.map((f) => resolve(f.path)));
167
const extraMdFiles = await Array.fromAsync(glob('content/**/*.md'));
168
for (const filePath of extraMdFiles) {
168
- if (coveredPaths.has(filePath)) continue;
169
+ if (coveredPaths.has(resolve(filePath))) continue;
170
const content = await readFile(filePath, 'utf-8');
171
allFiles.push({ path: filePath, content });
172
}