Commit Graph

216 Commits

Author SHA1 Message Date
Marek Madejski
9a519dd114 docs: remove deprecated python-toon in favor of official implementation (#93)
Removed deprecated Python implementation `python-toon`. The official one,  `toon_format`, remains.
2025-11-07 15:27:48 +01:00
laresbernardo
e49636bb87 docs: add R language implementation (#92) 2025-11-07 14:00:29 +01:00
Johann Schopplich
c6ba6446f5 chore(benchmarks): finalize structure-awareness run 2025-11-07 10:33:46 +01:00
Johann Schopplich
89df613059 chore(benchmarks): add structure-awareness questions 2025-11-07 09:03:51 +01:00
Johann Schopplich
853c3babea chore: fix cli entry for testing 2025-11-06 22:20:07 +01:00
Johann Schopplich
54433de930 chore: split token efficiency benchmark into mixed/flat tracks 2025-11-06 22:17:18 +01:00
Johann Schopplich
e22884308b chore(benchmarks): fix undefined in GitHub question generation 2025-11-06 16:06:31 +01:00
Johann Schopplich
a9d52fc69b chore: more work on benchmarks 2025-11-06 15:51:31 +01:00
Johann Schopplich
bc711ccecf test(benchmark): overhaul generation 2025-11-06 14:45:44 +01:00
Johann Schopplich
9863875706 chore: release v0.8.0 2025-11-05 19:04:20 +01:00
Johann Schopplich
840626dc90 feat: minor fixes for spec v1.4 compliance 2025-11-05 19:04:00 +01:00
Pragyan Tripathi
1b87cfe58b docs: add Clojure implementation to community implementations (#82) 2025-11-05 09:27:57 +01:00
Johann Schopplich
af17efe128 docs: add accuracy per 1k tokens report (closes #72) 2025-11-05 08:21:57 +01:00
Johann Schopplich
9268fdf3ef docs: fix typo in OG image 2025-11-04 19:46:34 +01:00
Johann Schopplich
a47005a155 docs: add ctoon implementation (closes #58, #79) 2025-11-04 19:18:57 +01:00
Johann Schopplich
49ba7c4fb6 docs: add official Rust implementation link in README 2025-11-04 19:18:15 +01:00
Johann Schopplich
b17d9bba6f docs: upgrade OG image 2025-11-04 19:17:56 +01:00
Johann Schopplich
3472081b40 docs: clarify CSV vs TOON use cases 2025-11-04 18:12:19 +01:00
Johann Schopplich
cdb90585fa test(cli): add tests for invalid values 2025-11-04 10:17:20 +01:00
Johann Schopplich
af298537a4 test(cli): add basic test suite 2025-11-04 07:45:50 +01:00
Thales Gelinger
8f0156c1af docs: add Neovim/Lua implementation (#73) 2025-11-03 18:42:05 +01:00
Johann Schopplich
314497630d chore: release v0.7.3 2025-11-03 17:42:01 +01:00
Marek Madejski
2c872e3cc4 docs: hint at official Python implementation (#69)
* Remove obsolete Python link in README

Removed pytoon, as it has been archived and the development stopped

* docs: add community implementation note

---------

Co-authored-by: Johann Schopplich <mail@johannschopplich.com>
2025-11-03 17:41:31 +01:00
Johann Schopplich
e174c46ba1 fix: add README files to published packages 2025-11-03 17:36:47 +01:00
Johann Schopplich
fecf4409d2 docs: update social card image 2025-11-03 16:14:20 +01:00
Johann Schopplich
3fc9291a8f chore: release v0.7.2 2025-11-03 11:41:37 +01:00
Johann Schopplich
a3b1a01a8b feat(cli): support stdin for input handling (fixes #71) 2025-11-03 11:39:10 +01:00
Johann Schopplich
f08376ca04 chore: release v0.7.1 2025-11-03 08:23:13 +01:00
Johann Schopplich
6e9519db3a refactor: remove unused comments 2025-11-03 08:19:57 +01:00
Wind
e414ca3671 fix: handle empty list items and nested objects in list items (#65)
* fix: support quoted keys with array syntax

Fixes parsing of quoted keys followed by array syntax like:
"x-codeSamples"[1]{lang,label,source}:

Previously, parseArrayHeaderLine would skip any line starting with
a quoted key. This caused large OpenAPI specs (like Hetzner Cloud API)
to fail decoding.

Changes:
- Modified parseArrayHeaderLine to handle quoted keys
- Added logic to find bracket start after closing quote
- Unescape quoted keys properly
- Added 3 test cases for the new functionality

Closes #62

* fix: handle empty list items and nested objects in list items

This commit fixes two critical decoder bugs that prevented complex
OpenAPI specs (like DigitalOcean's 638 schemas) from being decoded:

1. Empty list items: Items encoded as just `-` (without space) were
   not recognized. The decoder only checked for `LIST_ITEM_PREFIX = '- '`.
   Fixed by adding check for both `- ` and `-` patterns.

2. Nested objects in list items: When a list item contains an object
   with nested properties (e.g., `allOf[2]: - properties: state: ...`),
   the decoder was looking for nested content at the wrong depth level.
   List items add one level of indentation, so nested content should be
   at baseDepth + 2, not baseDepth + 1.

   Fixed by creating `decodeKeyValueForListItem()` that correctly handles
   the extra nesting while maintaining proper followDepth for siblings.

Changes:
- Added `decodeKeyValueForListItem()` function to handle list item nesting
- Updated `decodeObjectFromListItem()` to use new function
- Added empty item detection in `decodeListArray()`
- Added comprehensive unit tests for both bugs
- Added integration test with real DigitalOcean OpenAPI spec (638 schemas)
- Gitignored large fixture files, added README with download instructions

Tests:
- 5 new unit tests in list-item-bugs.test.ts
- 1 integration test in digitalocean-decode.test.ts (skips if fixture missing)
- All 309 existing tests still pass

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* perf: calculate depth on demand

* chore: move tests to test suite

* chore: test against new tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Johann Schopplich <mail@johannschopplich.com>
2025-11-03 08:18:14 +01:00
Johann Schopplich
cfc3dadb21 docs: update gray color 2025-11-03 08:03:47 +01:00
Johann Schopplich
244429dc8f ci: fix fetch depth for changelog generation 2025-11-02 21:54:59 +01:00
Johann Schopplich
cf31d1087d ci: fix fetch depth for changelog generation 2025-11-02 21:49:40 +01:00
Morteza Hosseini
c3db2a138c ci: update CI configuration for improved caching and dependency management (#63)
* build: update CI configuration for improved caching and dependency management

* build: ensure newline at end of file in CI configuration
2025-11-02 18:49:00 +01:00
Johann Schopplich
c1527dcf80 chore: fix type issue 2025-11-02 18:34:00 +01:00
Johann Schopplich
8977c8c7d6 feat: use language-agnostic test suite 2025-11-02 18:31:06 +01:00
Johann Schopplich
662a9d4bc5 feat: move SPEC to @toon-format/spec 2025-11-02 18:30:36 +01:00
David Sancho
7bb5dfb10c docs: add OCaml implementation (#57) 2025-11-01 22:15:32 +01:00
Johann Schopplich
da0a0b9be3 chore: release v0.7.0 2025-11-01 17:28:24 +01:00
Johann Schopplich
5f09a14c61 chore: fix type issues 2025-11-01 17:15:37 +01:00
Johann Schopplich
0710bd19e7 feat!: publish to @toon-format/toon and @toon-format/cli 2025-11-01 16:53:41 +01:00
Johann Schopplich
8bcbdb7315 docs: enhance explanation for TOON format benefits (related to #49) 2025-11-01 07:53:48 +01:00
Johann Schopplich
b8140ce053 chore: release v0.6.0 2025-11-01 00:37:53 +01:00
Johann Schopplich
8567df9131 fix(cli): inline tokenx 2025-11-01 00:37:11 +01:00
SangheeSon
2b882870f7 feat(cli): add --stats flag to show token savings (#51)
* feat(cli): add --stats flag to show token efficiency

- Add --stats boolean flag to display token count comparison
- Calculate approximate tokens using char length / 4 heuristic
- Show JSON vs TOON token counts with savings percentage
- Opt-in feature, default behavior unchanged

* feat: use tokenx for more accurate estimates

---------

Co-authored-by: Johann Schopplich <mail@johannschopplich.com>
2025-11-01 00:35:54 +01:00
Anton Maminov
af068f995d docs: add Crystal implementation (#48) 2025-11-01 00:26:43 +01:00
Johann Schopplich
901fcc53f3 docs(spec): add main title 2025-10-31 22:13:20 +01:00
Morteza Hosseini
baf450b46c docs: update README with badges for CI, npm version, spec, downloads, and license (#52) 2025-10-31 19:48:54 +01:00
Johann Schopplich
5a2040ae81 docs(spec): release v1.3 2025-10-31 13:52:18 +01:00
Johann Schopplich
617e5f1bda docs(spec): more work on v1.3 draft 2025-10-31 13:23:55 +01:00