Releases

APON.js v1.2.0 Release Notes

This release introduces a major overhaul of the parsing engine and expands output flexibility with new rendering styles, bringing apon.js into full alignment with the latest APON specification.

✨ New Features & Enhancements

  • Brand New Character-Level Parser
    • The parsing engine has been completely rewritten to use character-level token analysis instead of line-based processing.
    • This allows for significantly more precise and flexible parsing of complex APON documents.
  • Support for SINGLE_LINE and COMPACT Styles
    • The parser now natively supports SINGLE_LINE and COMPACT formats, where items are separated by commas (,).
    • JavaScript objects can now be parsed from a single line of APON text, matching the flexibility of JSON.
  • Inline Comment Support
    • You can now add comments starting with # anywhere on a line (except inside quoted strings).
    • The parser correctly treats # as a line-end comment, ignoring everything from the character to the end of the physical line.
  • Flexible Item Delimiters
    • Items within objects and elements within arrays can now be separated by newlines, commas, or a mixture of both.
    • This eliminates common syntax errors when copying or rearranging configuration items.
  • New Rendering Styles in APON.stringify()
    • A new style option has been added to APON.stringify(obj, { style: '...' }).
    • PRETTY (Default): Standard readable format with indentation and multi-line text blocks.
    • SINGLE_LINE: A readable one-line format using comma separators.
    • COMPACT: A dense one-line format with minimal whitespace for maximum transmission efficiency.
  • Automatic Multi-Line String Handling
    • When using SINGLE_LINE or COMPACT styles, APON.stringify() automatically converts multi-line strings into single-line escaped strings (e.g., "line1\nline2").
    • This ensures that the output remains on a single line regardless of the content.
  • Enhanced Interactive Demo
    • The online demo has been updated with a style selector, allowing users to instantly see how different rendering styles affect the APON output.

🧪 Improved Test Coverage

  • A comprehensive test suite with 22 specialized cases has been added to ensure the reliability of the new parser and all rendering styles.

NEWS
Release

Archive