DEV Community

Mr Smithnen
Mr Smithnen

Posted on

πŸš€ YINI Parser v1.3.0-beta – Smarter Options, Safer Metadata, and New Controls

I've just released yini-parser v1.3.0-beta πŸŽ‰ (Node package) - a big step forward for ergonomics, diagnostics, and developer experience when working with YINI configuration format, the human-friendly configuration format inspired by INI but with modern clarity.

This release focuses on cleaner public APIs, new output controls, and better tooling around metadata and CI.

✨ What's New

πŸ› Fixed

  • Fixed a bug where buildResultMetadata(..) could occasionally produce an undefined error.

πŸ”„ Renamed (Breaking API Changes)

To make public types more ergonomic for end-users, several interfaces were renamed:

  • AllUserOptions β†’ ParseOptions
  • PrimaryUserParams β†’ BasicOptions
  • OnDuplicateKey β†’ DuplicateKeyPolicy

This makes names shorter, more consistent, and closer to their intent.

πŸ“– Clarified

  • The strictMode parameter in TSDoc has been clarified: It defines the baseline ruleset (true = strict, false = lenient). Rule-specific options (e.g., treatEmptyValueAsNull, onDuplicateKey) may override the baseline. When overrides are applied, the effective mode becomes custom.

πŸ†• New Features

  • DocumentTerminatorRule and EmptyValueRule: new user-facing parsing rule value types.

  • quiet option:

    • Only prints errors to the console.
    • Warnings, notices, etc. are suppressed.
    • Diagnostics are still captured in metadata.
  • silent option:

    • Suppresses all console output, even errors.
    • Programmatic callers should use metadata; CLI users should rely on the exit code.
  • throwOnError option:

    • true (default): parser throws on parse errors.
    • false: errors are reported via diagnostics without throwing.
    • ⚠️ Planned change: next release will switch the default to false.
    • βœ… Action: set throwOnError: true to keep current behavior, or throwOnError: false to adopt the upcoming behavior.

πŸ“Š Metadata Improvements

  • Added effectiveMode inside meta.diagnostics.effectiveOptions.
  • Metadata bumped to v1.1.1.
  • Fields strictMode and effectiveOptions now correctly reflect when rules override the initial mode.

The resultet metadata looks like this:

    "meta": {
        "parserVersion": "1.3.0-beta",
        "mode": "strict",
        "totalErrors": 0,
        "totalWarnings": 1,
        "totalMessages": 1,
        "runStartedAt": "2025-09-23T14:23:22.587Z",
        "runFinishedAt": "2025-09-23T14:23:22.618Z",
        "durationMs": 30.746,
        "preservesOrder": true,
        "orderGuarantee": "implementation-defined",
        "source": {
            "sourceType": "inline",
            "hasDocumentTerminator": false,
            "hasYiniMarker": false,
            "lineCount": 10,
            "byteSize": null,
            "sha256": "d79db628387ad8244fc3d394916e20b12c7fe6ef9c39fbf525b9579cdc95130a"
        },
        "structure": {
            "maxDepth": 5,
            "sectionCount": 5,
            "memberCount": 3,
            "keysParsedCount": null,
            "sectionNamePaths": [
                "User2",
                "User2.PrefsOfUser2",
                "User2.PrefsOfUser2.DeepSection",
                "User2.PrefsOfUser2.DeepSection.DeeperSection",
                "User2.PrefsOfUser2.DeepSection.DeeperSection.YetDeeperSection"
            ]
        },
        "metaSchemaVersion": "1.1.1"
    }
Enter fullscreen mode Exit fullscreen mode

πŸ› οΈ CI & Tooling

The repo now runs stronger checks on every PR & release:

  • Security: CodeQL, npm audit, lockfile-lint, Gitleaks (SARIF), Semgrep (SARIF).
  • Grammar drift check: Ensures ANTLR-generated sources are committed.
  • Regression tests: Node/OS matrix coverage.
  • Releases: npm publish with provenance (tag-driven).

πŸ’¬ Other

  • Parser summary logic and messages have been updated for clearer output.

πŸ“¦ Install / Upgrade

npm install yini-parser@1.3.0-beta
Enter fullscreen mode Exit fullscreen mode
npm update yini-parser
Enter fullscreen mode Exit fullscreen mode

πŸ“š Links

πŸ’‘ This release lays groundwork for safer defaults and better developer ergonomics.

Thanks for reading!

Top comments (0)