jsdoczoom 0.4.17 → 0.4.19

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/cli.js CHANGED
@@ -421,6 +421,7 @@ function writeValidationResult(result, pretty) {
421
421
  * Write lint result to stdout and set exit code 2 if issues found.
422
422
  */
423
423
  function writeLintResult(result, pretty) {
424
+ if (result.summary.filesWithIssues === 0) return;
424
425
  writeResult(result, pretty);
425
426
  if (result.summary.filesWithIssues > 0) {
426
427
  process.exitCode = 2;
package/dist/drilldown.js CHANGED
@@ -62,8 +62,15 @@ function sortKey(entry) {
62
62
  * If the requested depth level is null (empty), advance to the next non-null level.
63
63
  * Output contains next_id when more detail is available, or id at terminal level.
64
64
  */
65
- function processFile(info, typeDeclarations, fileContent, depth, cwd) {
66
- const idPath = displayPath(info.path, cwd);
65
+ function processFile(
66
+ filePath,
67
+ info,
68
+ typeDeclarations,
69
+ fileContent,
70
+ depth,
71
+ cwd,
72
+ ) {
73
+ const idPath = displayPath(filePath, cwd);
67
74
  const levels = buildLevels(info, typeDeclarations, fileContent);
68
75
  // Clamp depth to [1, TERMINAL_LEVEL], advance past null levels
69
76
  let effectiveDepth = Math.max(1, Math.min(depth, TERMINAL_LEVEL));
@@ -149,7 +156,7 @@ async function processFileSafe(filePath, depth, cwd, config) {
149
156
  effectiveDepth,
150
157
  config,
151
158
  );
152
- return processFile(info, typeDeclarations, content, depth, cwd);
159
+ return processFile(filePath, info, typeDeclarations, content, depth, cwd);
153
160
  } catch (error) {
154
161
  if (isParseError(error)) return makeParseErrorItem(filePath, error, cwd);
155
162
  throw error;
@@ -371,7 +378,9 @@ export async function drilldown(
371
378
  effectiveDepth,
372
379
  config,
373
380
  );
374
- const items = [processFile(info, typeDeclarations, content, depth, cwd)];
381
+ const items = [
382
+ processFile(filePath, info, typeDeclarations, content, depth, cwd),
383
+ ];
375
384
  return { items, truncated: false };
376
385
  }
377
386
  // Glob selector — apply barrel gating
@@ -225,7 +225,6 @@ export function parseFileSummaries(filePath) {
225
225
  const jsdocText = extractFileJsdoc(sourceText, filePath);
226
226
  if (jsdocText === null) {
227
227
  return {
228
- path: filePath,
229
228
  summary: null,
230
229
  description: null,
231
230
  summaryCount: 0,
@@ -234,7 +233,6 @@ export function parseFileSummaries(filePath) {
234
233
  }
235
234
  const { summary, description, summaryCount } = parseJsdocContent(jsdocText);
236
235
  return {
237
- path: filePath,
238
236
  summary,
239
237
  description,
240
238
  summaryCount,
package/dist/lint.js CHANGED
@@ -28,13 +28,16 @@ import { DEFAULT_CACHE_DIR } from "./types.js";
28
28
  */
29
29
  async function lintSingleFile(eslint, filePath, cwd, config) {
30
30
  const sourceText = await readFile(filePath, "utf-8");
31
- return processWithCache(config, "lint", sourceText, async () => {
32
- const diagnostics = await lintFileForLint(eslint, sourceText, filePath);
33
- return {
34
- filePath: relative(cwd, filePath),
35
- diagnostics,
36
- };
37
- });
31
+ const { diagnostics } = await processWithCache(
32
+ config,
33
+ "lint",
34
+ sourceText,
35
+ async () => {
36
+ const diagnostics = await lintFileForLint(eslint, sourceText, filePath);
37
+ return { diagnostics };
38
+ },
39
+ );
40
+ return { filePath: relative(cwd, filePath), diagnostics };
38
41
  }
39
42
  /**
40
43
  * Build a LintResult from per-file results, applying a limit to files with issues.
package/dist/validate.js CHANGED
@@ -27,11 +27,21 @@ async function classifyFile(eslint, filePath, cwd, config) {
27
27
  } catch {
28
28
  throw new JsdocError("FILE_NOT_FOUND", `File not found: ${filePath}`);
29
29
  }
30
- return processWithCache(config, "validate", sourceText, async () => {
31
- const messages = await lintFileForValidation(eslint, sourceText, filePath);
32
- const status = mapToValidationStatus(messages);
33
- return { path: relativePath, status };
34
- });
30
+ const { status } = await processWithCache(
31
+ config,
32
+ "validate",
33
+ sourceText,
34
+ async () => {
35
+ const messages = await lintFileForValidation(
36
+ eslint,
37
+ sourceText,
38
+ filePath,
39
+ );
40
+ const status = mapToValidationStatus(messages);
41
+ return { status };
42
+ },
43
+ );
44
+ return { path: relativePath, status };
35
45
  }
36
46
  /**
37
47
  * Group file statuses into a ValidationResult, applying a limit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsdoczoom",
3
- "version": "0.4.17",
3
+ "version": "0.4.19",
4
4
  "description": "CLI tool for extracting JSDoc summaries at configurable depths",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/types/types.d.ts CHANGED
@@ -69,7 +69,6 @@ export interface ValidationResult {
69
69
  }
70
70
  /** Parsed summary and description from a file's JSDoc */
71
71
  export interface ParsedFileInfo {
72
- path: string;
73
72
  summary: string | null;
74
73
  description: string | null;
75
74
  summaryCount: number;