@mintlify/link-rot 3.0.1539 → 3.0.1540

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/dist/graph.js CHANGED
@@ -69,9 +69,8 @@ export class MdxPath {
69
69
  if (normalizedPath.endsWith('/')) {
70
70
  normalizedPath = normalizedPath.slice(0, -1);
71
71
  }
72
- // if path is "", then path points to same page
73
72
  if (normalizedPath === '') {
74
- normalizedPath = join(this.relativeDir, this.filename);
73
+ normalizedPath = '.';
75
74
  }
76
75
  path = parse(normalizedPath);
77
76
  }
@@ -436,7 +435,9 @@ export class Graph {
436
435
  if (path.pathType === PathType.INTERNAL) {
437
436
  const pathString = path.toString();
438
437
  const resolvedFiles = this.fileResolutionMap.get(pathString);
439
- const hasExistingFile = (resolvedFiles && [...resolvedFiles].some((file) => nodeSet.has(file))) ||
438
+ const isSiteRoot = pathString === '.';
439
+ const hasExistingFile = isSiteRoot ||
440
+ (resolvedFiles && [...resolvedFiles].some((file) => nodeSet.has(file))) ||
440
441
  this.virtualNodes.has(pathString);
441
442
  if (!hasExistingFile && !this.reachesPage(pathString)) {
442
443
  brokenLinks.add(path);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { buildGraph, getBrokenInternalLinks } from './static-checking/getBrokenInternalLinks.js';
1
+ export { buildGraph, decorateGraphNodeFromPageContent, getBrokenInternalLinks, } from './static-checking/getBrokenInternalLinks.js';
2
+ export { Node, PathType } from './graph.js';
2
3
  export { getBrokenExternalLinks } from './static-checking/getBrokenExternalLinks.js';
3
4
  export type { ExternalLinkResult } from './static-checking/getBrokenExternalLinks.js';
4
5
  export { getFilesLinksDependOn } from './static-checking/resolveSnippetLinksFromRenderingPages.js';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export { buildGraph, getBrokenInternalLinks } from './static-checking/getBrokenInternalLinks.js';
1
+ export { buildGraph, decorateGraphNodeFromPageContent, getBrokenInternalLinks, } from './static-checking/getBrokenInternalLinks.js';
2
+ export { Node, PathType } from './graph.js';
2
3
  export { getBrokenExternalLinks } from './static-checking/getBrokenExternalLinks.js';
3
4
  export { getFilesLinksDependOn } from './static-checking/resolveSnippetLinksFromRenderingPages.js';
4
5
  export { getBrokenRedirects } from './static-checking/getBrokenRedirects.js';