jsdoczoom 0.4.16 → 0.4.18

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
@@ -335,12 +335,35 @@ export async function drilldown(
335
335
  truncated,
336
336
  };
337
337
  }
338
- // Single file path — errors are fatal, no barrel gating
338
+ // Single file path — errors are fatal
339
339
  const filePath = files[0];
340
340
  const content = await readFile(filePath, "utf-8");
341
341
  const info = await processWithCache(config, "drilldown", content, () =>
342
342
  parseFileSummaries(filePath),
343
343
  );
344
+ // Barrel transition: when a barrel with a summary is targeted directly
345
+ // at depth >= 3, apply the same transition as the glob pipeline —
346
+ // barrel disappears and children appear at depth - 2.
347
+ if (isBarrel(filePath) && info.summary !== null) {
348
+ let barrelEffectiveDepth = depth;
349
+ if (barrelEffectiveDepth === 2 && info.description === null) {
350
+ barrelEffectiveDepth = 3;
351
+ }
352
+ if (barrelEffectiveDepth >= 3) {
353
+ const children = getBarrelChildren(filePath, cwd);
354
+ const childDepth = barrelEffectiveDepth - 2;
355
+ const results = await collectSafeResults(
356
+ children,
357
+ childDepth,
358
+ cwd,
359
+ config,
360
+ );
361
+ const sorted = results.sort((a, b) =>
362
+ sortKey(a).localeCompare(sortKey(b)),
363
+ );
364
+ return { items: sorted, truncated: false };
365
+ }
366
+ }
344
367
  const effectiveDepth = computeEffectiveDepth(depth, info);
345
368
  const typeDeclarations = await computeTypeDeclarationsIfNeeded(
346
369
  content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsdoczoom",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "description": "CLI tool for extracting JSDoc summaries at configurable depths",
5
5
  "type": "module",
6
6
  "sideEffects": false,