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.
Top comments (0)