@wrongstack/tools 0.260.0 → 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
@@ -1,4 +1,5 @@
1
1
  import { resolveWstackPaths, expectDefined, compileGlob, truncate } from '@wrongstack/core';
2
+ import { toErrorMessage } from '@wrongstack/core/utils';
2
3
  import { createRequire } from 'node:module';
3
4
  import * as fs from 'node:fs';
4
5
  import { writeFileSync, mkdirSync } from 'node:fs';
@@ -278,7 +279,7 @@ function loadDatabaseSync() {
278
279
  DatabaseSyncCtor = req("node:sqlite").DatabaseSync;
279
280
  } catch (err) {
280
281
  throw new Error(
281
- `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)}`
282
+ `The codebase index needs Node's built-in SQLite (node:sqlite), available since Node 22.5. This runtime doesn't provide it: ${toErrorMessage(err)}`
282
283
  );
283
284
  }
284
285
  return DatabaseSyncCtor;
@@ -863,7 +864,7 @@ function getSignature(node, sourceFile) {
863
864
  }
864
865
  function getJsDoc(node, sourceFile) {
865
866
  const fullText = sourceFile.getFullText();
866
- const nodePos = node.getFullWidth();
867
+ const nodePos = node.getFullStart();
867
868
  const comments = ts.getLeadingCommentRanges(fullText, nodePos);
868
869
  if (!comments) return "";
869
870
  for (const range of comments) {