@mintlify/link-rot 3.0.894 → 3.0.896

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.d.ts CHANGED
@@ -85,7 +85,9 @@ export declare class Graph {
85
85
  addEdgesBetweenNodes(): void;
86
86
  precomputeFileResolutions(): void;
87
87
  private getHeadingSlugsForPath;
88
- getBrokenInternalLinks(): MdxPath[];
88
+ getBrokenInternalLinks(options?: {
89
+ checkAnchors?: boolean;
90
+ }): MdxPath[];
89
91
  getAllInternalPaths(): string[];
90
92
  }
91
93
  export {};
package/dist/graph.js CHANGED
@@ -360,7 +360,7 @@ export class Graph {
360
360
  return indexNode.headingSlugs;
361
361
  return undefined;
362
362
  }
363
- getBrokenInternalLinks() {
363
+ getBrokenInternalLinks(options) {
364
364
  if (this.fileResolutionMap.size === 0) {
365
365
  this.precomputeFileResolutions();
366
366
  }
@@ -390,7 +390,7 @@ export class Graph {
390
390
  if (!hasExistingFile && !hasValidRedirect) {
391
391
  brokenLinks.push(path);
392
392
  }
393
- else if (path.anchorLink) {
393
+ else if ((options === null || options === void 0 ? void 0 : options.checkAnchors) && path.anchorLink) {
394
394
  const anchor = path.anchorLink.slice(1);
395
395
  const headingSlugs = this.getHeadingSlugsForPath(pathString, nodeSet);
396
396
  if (headingSlugs && !headingSlugs.has(anchor)) {
@@ -7,4 +7,6 @@ export declare const decorateGraphNodeFromPageContent: (graphNode: Node, content
7
7
  * Files matching .mintignore patterns are excluded from valid link targets,
8
8
  * so links pointing to ignored files will be reported as broken.
9
9
  */
10
- export declare const getBrokenInternalLinks: (repoPath?: string) => Promise<import("../graph.js").MdxPath[]>;
10
+ export declare const getBrokenInternalLinks: (repoPath?: string, options?: {
11
+ checkAnchors?: boolean;
12
+ }) => Promise<import("../graph.js").MdxPath[]>;
@@ -76,7 +76,7 @@ export const decorateGraphNodeFromPageContent = (graphNode, content) => __awaite
76
76
  * Files matching .mintignore patterns are excluded from valid link targets,
77
77
  * so links pointing to ignored files will be reported as broken.
78
78
  */
79
- export const getBrokenInternalLinks = (repoPath) => __awaiter(void 0, void 0, void 0, function* () {
79
+ export const getBrokenInternalLinks = (repoPath, options) => __awaiter(void 0, void 0, void 0, function* () {
80
80
  const baseDir = repoPath ? repoPath : process.cwd();
81
81
  const mintIgnoreGlobs = yield getMintIgnore(baseDir);
82
82
  const graph = new Graph(baseDir, mintIgnoreGlobs);
@@ -121,5 +121,5 @@ export const getBrokenInternalLinks = (repoPath) => __awaiter(void 0, void 0, vo
121
121
  })));
122
122
  // Precompute file resolutions before checking for broken links
123
123
  graph.precomputeFileResolutions();
124
- return graph.getBrokenInternalLinks();
124
+ return graph.getBrokenInternalLinks(options);
125
125
  });