๐ 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 matchesparse(..)
. - 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
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 clearerParsedObject
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 },
)
๐ Links
- ๐ฆ npm: yini-parser
- ๐ป GitHub: YINI Parser
- ๐ Spec: YINI Specification
๐ Feedback
As always, feedback and contributions are super welcome! Try it out and let me know if you hit any edge cases.