GitNexus/gitnexus/test
Tom Hale 6618120f63
Some checks are pending
CI / quality (push) Waiting to run
CI / tests (push) Waiting to run
CI / e2e (push) Waiting to run
CI / scope-parity (push) Waiting to run
CI / Save PR Metadata (push) Blocked by required conditions
CI / CI Gate (push) Blocked by required conditions
Release Candidate / Check if release candidate should run (push) Waiting to run
Release Candidate / ci (push) Blocked by required conditions
Release Candidate / Publish release candidate to npm (push) Blocked by required conditions
Release Candidate / Build & Push RC Docker images (push) Blocked by required conditions
fix: preserve comments and config in opencode.json during setup (#998)
* deps: add jsonc-parser for JSONC-safe config editing

* fix: use jsonc-parser to preserve comments in opencode.json during setup

- Add mergeJsoncFile() using parseTree/modify/applyEdits pipeline
- Add getOpenCodeMcpEntry() for OpenCode MCP format { type: local, command: [...] }
- Replace readJsonFile+writeJsonFile in setupOpenCode with mergeJsoncFile
- Fix wipe bug: JSON.parse on JSONC comments caused catch block to reset config to {}
- Add 9 tests for JSONC comment preservation, corrupt file safety, and format

* fix: use parseTree error collection and detect indentation

- Pass parseErrors array to parseTree() instead of checking
  (tree as any).errors which was always undefined — a real bug
  that allowed corrupt files to be rewritten
- Detect tab indentation from file content to avoid mixed
  indentation in modified JSONC files
- Fix JSDoc to match actual fallback behavior (JSON.parse, not
  readJsonFile)
- Strengthen corrupt-file test to assert exact content match

* style(setup): fix prettier formatting on mergeJsoncFile

* fix(setup): remove dead JSON.parse fallback, detect space-indent width, fix JSDoc

- Remove the semantically unreachable JSON.parse fallback branch in
  mergeJsoncFile (jsonc-parser's parseTree is a strict superset of
  JSON.parse, so the fallback can never fire for content JSON.parse
  would accept)
- Replace binary tab/space detection with detectIndentation() that
  measures actual indent width from the first indented line
- Fix JSDoc: 'valid JSON that is not valid JSONC' is impossible by
  definition
- Add tests for tab indentation and 4-space indentation preservation
2026-04-22 17:21:56 +01:00
..
fixtures fix(group): surface friendly error when group name not found (#903 regression test) (#989) 2026-04-21 15:52:36 +01:00
helpers Fix security issues and critical bugs found in code review (#709) 2026-04-10 05:20:29 +01:00
integration feat(cli): Fingerprint indexed repos by remote URL to detect sibling-clone graph drift (#982) 2026-04-21 21:58:54 +01:00
unit fix: preserve comments and config in opencode.json during setup (#998) 2026-04-22 17:21:56 +01:00
utils ci: add macOS to cross-platform test matrix (#208) 2026-03-07 10:38:32 +00:00
global-setup.ts feat: upgrade @ladybugdb/core to 0.15.2 and remove segfault workarounds (#374) 2026-03-19 08:25:43 +00:00
vitest.d.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00