DEV Community

Cover image for I spent a week working on regression tests & metadata guarantees on the YINI config/settings parser
Mr Smithnen
Mr Smithnen

Posted on

I spent a week working on regression tests & metadata guarantees on the YINI config/settings parser

Hey πŸ‘‹

I just wanted to share a small win from my side project.

I've been working on something called YINI for a while now - it's a configuration format together with a TypeScript parser (with spec, grammar, etc).
The goal is basically to be a calmer middle ground between INI, JSON, and YAML for larger, real-world configuration files.

This past week I didn't really add any new features.
Instead, I finally sat down and did something I've been postponing for a long time: making the parser really solid.

I just shipped v1.3.3-beta, and most of the work went into building proper smoke and regression tests around the parser.
Not glamorous work at all - but it feels incredibly good now that it's in place.

The new tests parse a couple of large production-style configurations (one corporate SaaS setup and one more high-security / distributed setup) and verify that:

the output is identical in default mode, strict mode, and strict+metadata mode

metadata and diagnostics behave correctly for both valid and broken inputs

The API didn't change at all in this release - it's simply about making the project more predictable, safer to depend on, and easier to evolve.

It took longer than I expected, but I'm genuinely happy with where it landed.

This release was also important to get out because I'm using this parser as the foundation for the next big step of the project: expanding and refactoring the YINI CLI to make it more robust and production-ready.

If you're building developer tools, working with config-heavy systems, or just dealing with a lot of INI/JSON/XML files in general, you might find YINI interesting:

https://github.com/YINI-lang/yini-parser-typescript

I'd really appreciate any real-world testing or feedback. And good luck with your own side projects, they always end up being a lot more work than they first appear.

Thanks for reading.

Top comments (0)