feat(js): support readable recursive indented data#36
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #35
Working session summaryDone. PR 36 is updated, pushed, and marked ready for review: Commit: Implemented recursive readable Verified locally:
CI is green on commit This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (235.4K + 5.8M cached) input tokens, 39.9K output tokens, $9.973161 cost 🤖 Models used:
📎 Log file uploaded as Repository (55439KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
Fixes #35.
Summary
formatIndented({ id, obj })output for acyclic JSON-style objects, including nested object and array definitions.parseIndented({ text })to resolve recursive definitions and preserve quoted strings while parsing unquoted numbers, booleans,null, and definition references dynamically.encode/decoderemains documented for circular references, shared identity, and exact JavaScript types.Reproduction
Before this change, nested values in
formatIndentedwere flattened throughString(value), so objects and arrays appeared as[object Object]anda,1, andparseIndentedcould not reconstruct recursive repository data.The new regression tests cover the issue shape:
and assert that parsing restores nested objects and arrays with dynamic scalar values.
Verification
cd js && npm test— 163 passedcd js && npm run examplecd js && npm run check— passes; existing complexity warnings remain insrc/codec.jscd js && node scripts/validate-changeset.mjscd js && npm run format:checkgit diff --check