DEV Community

Mr Smithnen
Mr Smithnen

Posted on

πŸŽ‰ YINI Parser v1.2.0-beta Released

Hi folks!

I just published YINI Parser v1.2.0-beta 🎊 β€” the latest beta release of the TypeScript/Node.js parser for the YINI configuration format.

This release comes with a mix of fixes, refactors, and quality-of-life improvements, especially around runtime safety and metadata handling.

✨ What's New

πŸ› οΈ Fixes

  • parseFile() now correctly passes through all options (e.g. includeDiagnostics), so behavior now matches parse(..).
  • Fixed a small typo (in in) in file parsing error messages.

πŸ“Š Metadata Improvements

The result metadata structure has been bumped to version 1.1.0.

preservesOrder: true // Member/section order is implementation-defined, not mandated by the spec.
orderGuarantee: 'implementation-defined'
orderNotes?: string
Enter fullscreen mode Exit fullscreen mode

These fields make it easier for tooling to reason about how order is preserved.

πŸ”’ Safer Runtime

The public YINI class was refactored to use per-invocation runtime state.
This prevents race conditions when multiple parse(..) / parseFile(..) calls run in parallel.

πŸ—‚οΈ File Layout & Naming

To keep things consistent and tidy:

  • src/parseEntry.ts β†’ src/pipeline.ts (and _parseEntry(..) β†’ runPipeline(..)).
  • core/types.ts β†’ core/internalTypes.ts.
  • Public-facing types/interfaces moved to src/types/index.ts.
  • src/yiniHelpers.ts β†’ src/utils/yiniHelpers.ts.

🧹 Naming Consistency

  • Renamed includeMetaData β†’ includeMetadata.
  • Replaced old TJSObject type with the clearer ParsedObject type throughout the codebase.

πŸ“š Documentation & Tests

  • Expanded and improved TSDoc comments across the public API.
  • Unit tests are now colocated with source files (src/**), ensuring 1:1 visibility between code and its tests. This reduces the chance of missing coverage when refactoring.

πŸš€ Why This Matters

This release is all about stability and clarity:

  • You get more accurate metadata out of the box.
  • Safer runtime behavior when parsing concurrently.
  • Cleaner project layout that makes contributing and navigating the repo easier.
  • Better docs for anyone building on top of YINI Parser.

Code Example:

import { ParsedObject, YiniParseResult } from '../types'
import YINI from '../YINI'

const result: YiniParseResult = YINI.parseFile(
    'myConfigFile.yini',
    { includeMetadata: true },
)

Enter fullscreen mode Exit fullscreen mode

πŸ”— Links

πŸ™ Feedback

As always, feedback and contributions are super welcome! Try it out and let me know if you hit any edge cases.

Top comments (0)