@doccov/cli 0.5.8 → 0.6.0

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.
Files changed (2) hide show
  1. package/dist/cli.js +10 -11
  2. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -185,8 +185,8 @@ import {
185
185
  detectExampleAssertionFailures,
186
186
  detectExampleRuntimeErrors,
187
187
  detectMonorepo,
188
- findPackageByName,
189
188
  findJSDocLocation,
189
+ findPackageByName,
190
190
  generateFixesForExport,
191
191
  getDefaultConfig as getLintDefaultConfig,
192
192
  hasNonAssertionComments,
@@ -401,7 +401,10 @@ function registerCheckCommand(program, dependencies = {}) {
401
401
  const allExamplesForTypecheck = [];
402
402
  for (const exp of spec.exports ?? []) {
403
403
  if (exp.examples && exp.examples.length > 0) {
404
- allExamplesForTypecheck.push({ exportName: exp.name, examples: exp.examples });
404
+ allExamplesForTypecheck.push({
405
+ exportName: exp.name,
406
+ examples: exp.examples
407
+ });
405
408
  }
406
409
  }
407
410
  if (allExamplesForTypecheck.length > 0) {
@@ -889,7 +892,6 @@ function registerDiffCommand(program, dependencies = {}) {
889
892
  case "report":
890
893
  log(generateHTMLReport(diff));
891
894
  break;
892
- case "text":
893
895
  default:
894
896
  printTextDiff(diff, log, error);
895
897
  if (options.ai && diff.docsImpact && hasDocsImpact(diff)) {
@@ -1027,7 +1029,7 @@ function printAPIChanges(diff, log) {
1027
1029
  }
1028
1030
  const added = changes.filter((c) => c.changeType === "added");
1029
1031
  if (added.length > 0) {
1030
- const addedNames = added.map((a) => a.memberName + "()").join(", ");
1032
+ const addedNames = added.map((a) => `${a.memberName}()`).join(", ");
1031
1033
  log(chalk2.green(` + ${addedNames}`));
1032
1034
  }
1033
1035
  }
@@ -1694,9 +1696,9 @@ import * as path6 from "node:path";
1694
1696
  import {
1695
1697
  applyEdits as applyEdits2,
1696
1698
  createSourceFile as createSourceFile2,
1699
+ DocCov as DocCov3,
1697
1700
  detectEntryPoint as detectEntryPoint3,
1698
1701
  detectMonorepo as detectMonorepo3,
1699
- DocCov as DocCov3,
1700
1702
  findJSDocLocation as findJSDocLocation2,
1701
1703
  findPackageByName as findPackageByName3,
1702
1704
  getDefaultConfig,
@@ -2150,6 +2152,7 @@ function registerReportCommand(program) {
2150
2152
 
2151
2153
  // src/commands/scan.ts
2152
2154
  import * as fs8 from "node:fs";
2155
+ import * as fsPromises from "node:fs/promises";
2153
2156
  import * as os from "node:os";
2154
2157
  import * as path9 from "node:path";
2155
2158
  import {
@@ -2586,11 +2589,7 @@ function registerScanCommand(program, dependencies = {}) {
2586
2589
  process.exitCode = 1;
2587
2590
  } finally {
2588
2591
  if (tempDir && options.cleanup !== false) {
2589
- const { spawn } = await import("node:child_process");
2590
- spawn("rm", ["-rf", tempDir], {
2591
- detached: true,
2592
- stdio: "ignore"
2593
- }).unref();
2592
+ fsPromises.rm(tempDir, { recursive: true, force: true }).catch(() => {});
2594
2593
  } else if (tempDir) {
2595
2594
  log(chalk8.gray(`Repo preserved at: ${tempDir}`));
2596
2595
  }
@@ -2641,9 +2640,9 @@ function printTextResult(result, log) {
2641
2640
  import * as fs9 from "node:fs";
2642
2641
  import * as path10 from "node:path";
2643
2642
  import {
2643
+ DocCov as DocCov6,
2644
2644
  detectEntryPoint as detectEntryPoint6,
2645
2645
  detectMonorepo as detectMonorepo6,
2646
- DocCov as DocCov6,
2647
2646
  findPackageByName as findPackageByName6,
2648
2647
  NodeFileSystem as NodeFileSystem6,
2649
2648
  typecheckExamples as typecheckExamples2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doccov/cli",
3
- "version": "0.5.8",
3
+ "version": "0.6.0",
4
4
  "description": "DocCov CLI - Documentation coverage and drift detection for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",
@@ -49,14 +49,14 @@
49
49
  "@ai-sdk/anthropic": "^1.0.0",
50
50
  "@ai-sdk/openai": "^1.0.0",
51
51
  "@inquirer/prompts": "^7.8.0",
52
- "@doccov/sdk": "^0.5.8",
53
- "@openpkg-ts/spec": "^0.4.0",
52
+ "@doccov/sdk": "^0.6.0",
53
+ "@openpkg-ts/spec": "^0.4.1",
54
54
  "ai": "^4.0.0",
55
55
  "chalk": "^5.4.1",
56
56
  "commander": "^14.0.0",
57
57
  "glob": "^11.0.0",
58
58
  "simple-git": "^3.27.0",
59
- "zod": "^3.23.8"
59
+ "zod": "^3.25.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/bun": "latest",