@wrongstack/tools 0.41.0 → 0.54.1

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/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as fs4 from 'node:fs/promises';
2
2
  import * as path from 'node:path';
3
3
  import { resolve, sep, dirname } from 'node:path';
4
- import { atomicWrite, unifiedDiff, detectNewlineStyle, normalizeToLf, toStyle, compileGlob, buildChildEnv, loadPlan, emptyPlan, clearPlan, savePlan, getPlanTemplate, addPlanItem, deriveTodosFromPlanItem, removePlanItem, setPlanItemStatus, formatPlan, stripAnsi, resolveWstackPaths } from '@wrongstack/core';
4
+ import * as Core from '@wrongstack/core';
5
+ import { atomicWrite, unifiedDiff, detectNewlineStyle, normalizeToLf, toStyle, compileGlob, buildChildEnv, loadPlan, emptyPlan, clearPlan, savePlan, getPlanTemplate, addPlanItem, deriveTodosFromPlanItem, removePlanItem, setPlanItemStatus, formatPlan, resolveWstackPaths } from '@wrongstack/core';
5
6
  import { spawn, execFileSync, spawnSync } from 'node:child_process';
6
7
  import * as os from 'node:os';
7
8
  import * as dns from 'node:dns/promises';
@@ -154,7 +155,7 @@ ${tail}`;
154
155
  }
155
156
  function normalizeCommandOutput(raw, opts = {}) {
156
157
  if (!raw) return raw;
157
- let text = stripAnsi(raw);
158
+ let text = Core.stripAnsi(raw);
158
159
  text = collapseCarriageReturns(text);
159
160
  text = text.replace(/[ \t]+$/gm, "");
160
161
  text = collapseConsecutiveDuplicates(text);
@@ -375,7 +376,8 @@ var editTool = {
375
376
  const newFileLf = input.replace_all ? fileLf.split(oldLf).join(newLf) : fileLf.replace(oldLf, newLf);
376
377
  const newFile = toStyle(newFileLf, style);
377
378
  await atomicWrite(absPath, newFile, { mode: updated.mode & 511 });
378
- ctx.recordRead(absPath, updated.mtimeMs);
379
+ const written = await fs4.stat(absPath);
380
+ ctx.recordRead(absPath, written.mtimeMs);
379
381
  ctx.session.recordFileChange({
380
382
  path: absPath,
381
383
  action: "modified",