Skip to content

feat(js): support readable recursive indented data#36

Merged
konard merged 2 commits into
mainfrom
issue-35-03946ff48852
May 10, 2026
Merged

feat(js): support readable recursive indented data#36
konard merged 2 commits into
mainfrom
issue-35-03946ff48852

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented May 10, 2026

Fixes #35.

Summary

  • Added recursive readable indented formatIndented({ id, obj }) output for acyclic JSON-style objects, including nested object and array definitions.
  • Reworked parseIndented({ text }) to resolve recursive definitions and preserve quoted strings while parsing unquoted numbers, booleans, null, and definition references dynamically.
  • Updated the JavaScript README, root JavaScript quick start, and basic usage example so readable indented data is the default documented workflow, while typed encode/decode remains documented for circular references, shared identity, and exact JavaScript types.
  • Added a minor changeset for the JavaScript package.

Reproduction

Before this change, nested values in formatIndented were flattened through String(value), so objects and arrays appeared as [object Object] and a,1, and parseIndented could not reconstruct recursive repository data.

The new regression tests cover the issue shape:

obj_root:
  title 'Indian Law'
  defaultLanguage en
  maxLines 1500
  nested obj_root_nested
  items obj_root_items

obj_root_nested:
  ok true

obj_root_items:
  a
  1

and assert that parsing restores nested objects and arrays with dynamic scalar values.

Verification

  • cd js && npm test — 163 passed
  • cd js && npm run example
  • cd js && npm run check — passes; existing complexity warnings remain in src/codec.js
  • cd js && node scripts/validate-changeset.mjs
  • cd js && npm run format:check
  • git diff --check

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #35
@konard konard self-assigned this May 10, 2026
@konard konard changed the title [WIP] Support readable untyped recursive object encoding as the default documented mode feat(js): support readable recursive indented data May 10, 2026
@konard konard marked this pull request as ready for review May 10, 2026 19:39
@konard
Copy link
Copy Markdown
Member Author

konard commented May 10, 2026

Working session summary

Done. PR 36 is updated, pushed, and marked ready for review:

#36

Commit: a9ad369 (feat(js): add readable recursive indented codec)

Implemented recursive readable formatIndented / parseIndented, added regression tests, updated JS/root docs and examples, and added a minor changeset.

Verified locally:

  • cd js && npm test — 163 passed
  • cd js && npm run example
  • cd js && npm run check — passed, with existing src/codec.js complexity warnings
  • cd js && node scripts/validate-changeset.mjs
  • cd js && npm run format:check
  • git diff --check

CI is green on commit a9ad369: JavaScript CI/CD run 25637892451 completed successfully. Working tree is clean.


This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 10, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $9.973161

📊 Context and tokens usage:

  • 235.4K / 1.1M (22%) input tokens, 39.9K / 128K (31%) output tokens

Total: (235.4K + 5.8M cached) input tokens, 39.9K output tokens, $9.973161 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (55439KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 0529f91 into main May 10, 2026
10 checks passed
@konard
Copy link
Copy Markdown
Member Author

konard commented May 10, 2026

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support readable untyped recursive object encoding as the default documented mode

1 participant