Skip to content

fix: export getCAStorePath and fix boxToJson unicode escaping#101

Merged
miki725 merged 2 commits into
devfrom
fixes
Jun 30, 2026
Merged

fix: export getCAStorePath and fix boxToJson unicode escaping#101
miki725 merged 2 commits into
devfrom
fixes

Conversation

@miki725

@miki725 miki725 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Export getCAStorePath* so downstream consumers (chalk) can pass the bundled Mozilla CA store path to libgit2 for SSL cert setup
  • Fix boxToJson to correctly escape all Unicode: BMP characters (U+0080..U+FFFF) as \uXXXX, supplementary characters (U+10000+) as surrogate pairs, and ASCII control chars as \u00XX

Test plan

nim c -r tests/tbox.nim

🤖 Generated with Claude Code

- Export getCAStorePath* so downstream consumers (chalk) can access
  the bundled Mozilla CA store path for libgit2 SSL cert setup
- Fix boxToJson to correctly escape all Unicode code points including
  BMP characters (U+0080..U+FFFF as \uXXXX) and supplementary
  characters (U+10000+ as surrogate pairs), and ASCII control chars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@miki725 miki725 requested a review from viega as a code owner June 30, 2026 14:03
30 tests covering named escapes, control chars, BMP non-ASCII, and
supplementary characters (surrogate pairs), with cases drawn from
Nicolas Seriot's JSONTestSuite y_string_* corpus. Includes both
exact-output checks and round-trip parse verification.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@miki725 miki725 merged commit 9523e6c into dev Jun 30, 2026
2 checks passed
@miki725 miki725 deleted the fixes branch June 30, 2026 14:59
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.

1 participant