PureYAML/Sources
Mihaela Mihaljevic ec3642bacc feat(emitting): add indentWidth and sortKeys emitter options
Closes two of the four emitter gaps a feature-parity audit against Yams
found (PureYAMLYamsComparison's FEATURE-PARITY.md): no configurable
indentation and no sorted-key output.

indentWidth replaces every hardcoded indent + 2 in Dumper.swift/
Dumper.Mapping.swift, verified with round-trip tests since indentation is
purely a rendering choice and must never change what a document means.

sortKeys sorts a mapping's pairs by their string key in both block and flow
style, but only when every key in that mapping is a plain string; a mapping
with any complex (mapping/sequence) key stays in insertion order, since
there is no well-defined ordering across mixed key kinds. Off by default,
since insertion order is what makes a duplicate-key-preserving Mapping
round-trip meaningfully in the first place.

width-based line wrapping and canonical mode are each a correctness surface
of their own and are deliberately left for later, not folded into this.
2026-07-10 17:49:44 +02:00
..
Coding feat(codable): broaden compatibility coverage 2026-06-05 12:49:20 +02:00
Decoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Emitting feat(emitting): add indentWidth and sortKeys emitter options 2026-07-10 17:49:44 +02:00
Encoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Model feat(parsing): opt-in located parse on the hand-rolled engine 2026-06-29 07:14:42 +02:00
Parsing fix(parsing): reject raw control characters in parse(), matching libyaml 2026-07-10 11:03:27 +02:00
PureYAMLJSON Merge conformance/yaml-test-suite-gaps: the libyaml port becomes the engine on main 2026-07-05 00:23:48 +02:00
Stream feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
Streaming feat(parsing): persist mid-token suspension and expose it as a public streaming API 2026-07-10 09:10:56 +02:00
Tagged Merge conformance/yaml-test-suite-gaps: the libyaml port becomes the engine on main 2026-07-05 00:23:48 +02:00
Validation Merge conformance/yaml-test-suite-gaps: the libyaml port becomes the engine on main 2026-07-05 00:23:48 +02:00
API.swift feat(parsing): opt-in located parse on the hand-rolled engine 2026-06-29 07:14:42 +02:00
PureYAML.swift feat(parsing): persist mid-token suspension and expose it as a public streaming API 2026-07-10 09:10:56 +02:00