fix: v2.3.1 — correct version, say why a plugin update failed, gitignored files in Files

- v2.3.0's tree reported 2.2.1, so every install saw an update forever;
  package.json, the lockfile, openapi.yaml, the CLAUDE.md marker and the
  snapshot now read 2.3.1
- A failed plugin-update step records the tail of the command's stdout and
  stderr plus its exit code or signal (failureText); plugin-bootstrap.js
  prints its refusal on stdout, which the verdict used to drop. Update all
  uses the same text
- updates.test.js never applies an update: it skips when the checkout is
  behind a release (apply ran npm run setup and pruned dev dependencies)
- Files tree lists gitignored files and folders, named in orange
  (addIgnored in git-diff.js); change-tree rows indent in whole steps
This commit is contained in:
2026-10-06 16:22:53 +07:00
parent 7ca1134c3d
commit 837da6e5de
14 changed files with 191 additions and 49 deletions
+14 -2
View File
@@ -463,20 +463,32 @@ describe("listCommits / readFileAt / listPaths / listTree", () => {
it("lists untracked-but-not-ignored files and marks what changed, folders included", async () => {
write(LANE, "src/main.ts", "m\n");
write(LANE, ".gitignore", "*.log\n");
write(LANE, ".gitignore", "*.log\nvendor/\n");
gc(LANE, "add", "-A");
gc(LANE, "commit", "-qm", "src");
write(LANE, "a.txt", "modified\n");
write(LANE, "new.txt", "fresh\n");
write(LANE, "gen/deep/out.txt", "wholly untracked folder\n");
write(LANE, "noise.log", "ignored\n");
write(LANE, "vendor/lib/x.js", "ignored folder\n");
const root = await listTree(LANE, {});
const by = Object.fromEntries(root.entries.map((e) => [e.name, e]));
assert.equal(by["a.txt"].status, " M");
assert.equal(by["new.txt"].status, "??");
assert.equal(by["keep.txt"].status, undefined);
assert.equal(by["noise.log"], undefined, "an ignored file stays out of the tree");
assert.equal(by["noise.log"].ignored, true, "an ignored file is listed, marked");
assert.equal(by.vendor.ignored, true);
assert.equal(by.vendor.dir, true);
assert.equal(by[".git"], undefined, "git's own dir is never listed");
assert.equal(by["a.txt"].ignored, undefined);
assert.equal(by.src.ignored, undefined);
// Inside an ignored folder, which `ls-files --ignored` cannot list.
const lib = await listTree(LANE, { subdir: "vendor/lib" });
assert.deepEqual(
lib.entries.map((e) => [e.name, e.ignored]),
[["x.js", true]]
);
assert.equal(by.gen.changed, true);
assert.equal(by.src.changed, undefined);