@wrongstack/tools 0.257.2 → 0.264.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 (59) hide show
  1. package/dist/audit.js +1 -0
  2. package/dist/audit.js.map +1 -1
  3. package/dist/bash.js.map +1 -1
  4. package/dist/builtin.js +15 -10
  5. package/dist/builtin.js.map +1 -1
  6. package/dist/codebase-index/index.js +3 -2
  7. package/dist/codebase-index/index.js.map +1 -1
  8. package/dist/codebase-index/worker.js +3 -2
  9. package/dist/codebase-index/worker.js.map +1 -1
  10. package/dist/diff.js +1 -0
  11. package/dist/diff.js.map +1 -1
  12. package/dist/document.js +5 -4
  13. package/dist/document.js.map +1 -1
  14. package/dist/edit.js +2 -0
  15. package/dist/edit.js.map +1 -1
  16. package/dist/exec.js.map +1 -1
  17. package/dist/fetch.d.ts +19 -1
  18. package/dist/fetch.js +1 -1
  19. package/dist/fetch.js.map +1 -1
  20. package/dist/format.js +1 -0
  21. package/dist/format.js.map +1 -1
  22. package/dist/git.js.map +1 -1
  23. package/dist/glob.js +1 -0
  24. package/dist/glob.js.map +1 -1
  25. package/dist/grep.js +1 -0
  26. package/dist/grep.js.map +1 -1
  27. package/dist/index.js +16 -13
  28. package/dist/index.js.map +1 -1
  29. package/dist/install.js +2 -0
  30. package/dist/install.js.map +1 -1
  31. package/dist/json.js +1 -0
  32. package/dist/json.js.map +1 -1
  33. package/dist/lint.js +1 -0
  34. package/dist/lint.js.map +1 -1
  35. package/dist/logs.js +1 -0
  36. package/dist/logs.js.map +1 -1
  37. package/dist/outdated.js +1 -0
  38. package/dist/outdated.js.map +1 -1
  39. package/dist/pack.js +15 -10
  40. package/dist/pack.js.map +1 -1
  41. package/dist/patch.js +1 -0
  42. package/dist/patch.js.map +1 -1
  43. package/dist/read.js +4 -3
  44. package/dist/read.js.map +1 -1
  45. package/dist/replace.js +1 -0
  46. package/dist/replace.js.map +1 -1
  47. package/dist/scaffold.js +1 -0
  48. package/dist/scaffold.js.map +1 -1
  49. package/dist/search.js +2 -3
  50. package/dist/search.js.map +1 -1
  51. package/dist/test.js +1 -0
  52. package/dist/test.js.map +1 -1
  53. package/dist/tree.js +1 -0
  54. package/dist/tree.js.map +1 -1
  55. package/dist/typecheck.js +1 -0
  56. package/dist/typecheck.js.map +1 -1
  57. package/dist/write.js +2 -0
  58. package/dist/write.js.map +1 -1
  59. package/package.json +2 -2
@@ -2,6 +2,7 @@ import { parentPort } from 'node:worker_threads';
2
2
  import { expectDefined, resolveWstackPaths, compileGlob, truncate } from '@wrongstack/core';
3
3
  import * as fs3 from 'node:fs/promises';
4
4
  import * as path4 from 'node:path';
5
+ import { toErrorMessage } from '@wrongstack/core/utils';
5
6
  import { createRequire } from 'node:module';
6
7
  import * as fs from 'node:fs';
7
8
  import { writeFileSync, mkdirSync } from 'node:fs';
@@ -235,7 +236,7 @@ function loadDatabaseSync() {
235
236
  DatabaseSyncCtor = req("node:sqlite").DatabaseSync;
236
237
  } catch (err) {
237
238
  throw new Error(
238
- `The codebase index needs Node's built-in SQLite (node:sqlite), available since Node 22.5. This runtime doesn't provide it: ${err instanceof Error ? err.message : String(err)}`
239
+ `The codebase index needs Node's built-in SQLite (node:sqlite), available since Node 22.5. This runtime doesn't provide it: ${toErrorMessage(err)}`
239
240
  );
240
241
  }
241
242
  return DatabaseSyncCtor;
@@ -820,7 +821,7 @@ function getSignature(node, sourceFile) {
820
821
  }
821
822
  function getJsDoc(node, sourceFile) {
822
823
  const fullText = sourceFile.getFullText();
823
- const nodePos = node.getFullWidth();
824
+ const nodePos = node.getFullStart();
824
825
  const comments = ts.getLeadingCommentRanges(fullText, nodePos);
825
826
  if (!comments) return "";
826
827
  for (const range of comments) {