flatconfig 0.2.0
flatconfig: ^0.2.0 copied to clipboard
Flat, human-friendly key=value configuration format for Dart & Flutter — inspired by Ghostty, simpler than INI or TOML.
0.2.0 #
Added #
- Generic & context-aware accessors:
getAs<T>(key, converter)– lenient “try” variant; returnsnullon missing/empty/invalid.getAsOr<T>(key, converter, default)– lenient with fallback.requireAs<T>(key, converter)– strict; throwsFormatExceptionwith context.getAsWith<T>(key, (raw, key, doc) => T?)– advanced, document-aware converter.requireAsWith<T>(...)– strict variant for advanced converters.getAllAs<T>(key, converter)– lazy, lenient conversion for duplicate keys.requireAllAs<T>(key, converter)– strict conversion for all values.
- README: New Custom Converters section with examples.
- README: Comparison to INI/TOML and Design Philosophy sections.
Improved #
- Consistent, idiomatic error semantics:
- Lenient
get*accessors never throw; strictrequire*accessors throw with.explain(key, got, cause)context.
- Lenient
Notes #
- No breaking changes. Web/WASM-safe core remains unchanged; I/O helpers are still VM-only.
0.1.4 #
Added #
- Web/WASM Stubs: Added
includes_stub.dartandio_stub.dartto safely throwUnsupportedErroron non-IO platforms. The package now loads cleanly in Flutter Web / WASM projects (core parsing remains available).
Changed #
- Barrel Exports: Simplified conditional exports — the full units for
io.dartandincludes.dartare exported so that all extensions are visible on IO platforms. - README & Example: Updated to use the recommended path-based helpers:
parseFlatFile,parseFlatFileSync,parseFileWithIncludes,writeFlat,writeFlatSync(no moresrc/imports). File-based extensions remain available as ergonomic sugar.
Fixed #
- Pub.dev analysis warning: Missing
lintsdependency inexample/package. - Web/WASM analysis: no longer fails due to missing
dart:ioreferences.
Notes #
- This release is non-breaking (
0.1.x→0.1.4).
0.1.3 #
Added #
- Added full support for recursive
config-fileincludes (Ghostty-compatible).- Supports optional includes (
?path), nested includes, relative paths, and cycle detection. - Defensive maximum include depth (
maxIncludeDepth, default 64). - Async/sync I/O via
File.parseWithIncludes()andparseFileWithIncludes().
- Supports optional includes (
- Introduced example and documentation for null-reset semantics (
key = → null, blocks later assignments). - Clarified behavior for one include per line — comma-separated paths are treated as a single literal.
- Improved README with clear include semantics, usage examples, and quote-awareness notes (
getMap()vsgetDocument()).
Improved #
- Internal include handling now normalizes paths and detects circular dependencies more robustly.
- Minor parser cleanups and docstring refinements for consistency.
0.1.2 #
Documentation & metadata improvements #
- Updated dependency constraints and topics for pub.dev
- Updated README with slightly clearer description
0.1.1 #
0.1.0 #
🎉 Initial public release.