Changelog¶
2026.08.30.1¶
No documented changes.
2026.08.30¶
No documented changes.
2026.08.29¶
Refuse empty input rather than answering differently per format. The same empty input produced a JSON parse error,
Nonefor YAML and an empty dict for TOML.Strip a leading byte order mark from input. It is a decoding artifact rather than data, and reached the parsers as content.
Add
--input-fileto read input from a path instead of standard input.Refuse a
--modifiergiven more than once, which previously collapsed into the modifier set with no feedback.Warn when
--include-preambleis given for output that has no preamble.Report the
literalizerversion alongside theliteralizeversion, since the library decides what the output looks like.Keep the originating library exception attached when reporting an error, rather than discarding it with
from None.Say in
--helpthat language-option choices are the union across every language, since--helprenders before--languageis known.Reject formatting options that produce malformed output.
--indentno longer accepts an empty string or one holding a line break,--ref-keyno longer accepts an empty or whitespace-only marker, and--pre-indent-levelis now bounded because each level repeats the indent on every output line.Reject options that the selected mode ignores.
--call-function,--call-paramsand--per-elementin literal mode, and--pre-indent-leveland--include-delimitersin call mode, previously had no effect and produced output that did not reflect the request.--no-new-variablewithout--variable-namewas a silent no-op and is now refused too.Report a
--call-paramsvalue that names no parameter as such. An empty, whitespace-only or comma-only value previously reached the arity check, which reported “Expected 0 parameters but got N values”.Report every
literalizererror as a clean CLI message. The CLI matched two hand-maintained tuples of exception classes, so the 32LiteralizerErrorsubclasses missing from them escaped as Python tracebacks. Both sites now match theLiteralizerErrorbase class.Sign the macOS binary with a Developer ID certificate and notarize it, so Gatekeeper no longer blocks it when it is downloaded in a browser. The
xattr -d com.apple.quarantineworkaround is no longer needed.
2026.08.16.1¶
No documented changes.
2026.08.16¶
Add manual Sphinx linkcheck and spelling pre-commit hooks to complete the lint tooling alignment with
literalizer.Bump
literalizerto 2026.7.24.1. The CLI now offers C++14, C++17, and C++20 through--language-versionand exposes generated heterogeneous-value carrier names through--heterogeneous-value-variant-name. The release also adopts upstream fixes for RECORD shape inference, null-byte strings, empty containers, wide integers, and variable-name validation; invalid or reserved new variable names are surfaced as clean CLI errors.Expose Python annotation evaluation and union format options.
Add
--record-struct-name-prefixfor naming the structs/records that therecord--heterogeneous-strategygenerates (e.g.Widget0,Widget1instead ofRecord0,Record1). Therecordstrategy is now available for many more languages in this release (C, C#, C++, Crystal, D, Go, Java, Kotlin, Nim, Odin, Python, Rust, Scala, Swift, V, Zig). The strategy and the new option are surfaced automatically per language exactly like every other language-specific option.An invalid
--record-struct-name-prefix(not a PascalCase identifier for the target language) now surfaces the upstreamInvalidRecordNameErroras a clean CLI error rather than a traceback.Bump
literalizerto 2026.5.17.Bump
literalizerto 2026.8.2. Native multiline string formats are now available through--string-format multilinefor supported languages, and--multiline-raw-string-delimiter-baseconfigures fallback delimiters for C++ raw strings. Invalid C++ delimiter bases are surfaced as clean CLI errors.--heterogeneous-strategy tupleis now offered for the languages that gained the upstreamTUPLEstrategy (C++, Kotlin, Rust, Scala, TypeScript). A tuple arity that has no native fixed-size tuple in the target language (e.g. a 4+-element heterogeneous array in Kotlin) now surfaces the new upstreamTupleArityNotRepresentableErroras a clean CLI error rather than a traceback.literalizerremovedDottedCallStubNotSupportedErrorandFreeFunctionCallNotSupportedErrorbecause the context-awarecall_transformmade them unreachable. They are no longer referenced. Languages whose declaration template previously only wrapped literal values (Bash, Objective-C, Tcl, and others) now bind a call result through their idiomatic call-binding form, so--variable-namein--mode callworks for them too.
2026.05.14.1¶
Bump
literalizerto 2026.5.14.1.YAML inputs with non-string dict keys (integers, dates, booleans) now flow through to the target language’s value-formatting path instead of being silently stringified. Languages that can represent the key natively (Python, Ruby, Clojure, Lua, Bash, and others) produce the corresponding literal. Languages whose dict syntax requires string keys or a homogeneous typed map surface the new upstream
UnrepresentableInputErroras a clean CLI error.
2026.05.14¶
Bump
literalizerto 2026.5.14.--variable-name(with--new-variable/--no-new-variableand--modifier) now applies in--mode callas well, wrapping the rendered call in the language’s idiomatic per-language variable binding (e.g.let user = createUser(...),const user = createUser(...),user = create_user(...)). Mutability and inference are picked up from--declaration-styleand--modifierexactly as in literal mode. Languages whose declaration template wraps or transforms the right-hand side in a way only valid for literal values (e.g. Bash command substitution, Objective-C boxing, tagged-enum heterogeneous-strategy languages) surface the upstreamUnsupportedCallShapeErroras a clean CLI error, as does the combination with--per-element(which has no per-element name vector).
2026.05.13¶
Bump
literalizerto 2026.5.13.1. The new release re-exposes thesupports_*class attributes forempty_dict_key,call_style, and the fivedefault_*_typeoptions, restoring a type-safe probe for runtime-dispatched constructor kwargs (cf. upstream issue #2147).Replace
--line-endingwith--statement-terminator-style. The upstreamLineEndingsenum was removed;StatementTerminatorStyles(semicolon,none) is its successor.Add
--call-stylefor picking between per-language call shapes (e.g.curriedfor Haskell / OCaml / F# / SML / Elm,namedfor Visual Basic).Add
--numeric-stylefor languages that support multiple numeric rendering styles (e.g.overloadedvs.explicit).Add
--language-versionfor selecting the target language version (each language exposes aVersionFormatsenum).Add
--module-namefor languages whose--wrap-in-fileform introduces a named scope (C, C++, D, Erlang, Fortran, F#, Java, Objective-C, Occam, SystemVerilog). Previously amodule_nameargument toliteralizeitself, now a per-language constructor argument.Add
--ref-keyfor picking a marker key other than$reffor variable-reference mappings in the input data.Surface the new typed
literalizerexceptions as clean CLI errors rather than tracebacks:UnsupportedCallShapeError,VariableNameNotSupportedError,WrapInFileWithoutVariableNotSupportedError,WrapCombinedInFileNotSupportedError,DottedCallTargetNotSupportedError,DottedCallStubNotSupportedError,FreeFunctionCallNotSupportedError,CallArgNotSupportedError,HeterogeneousScalarCollectionError,UnrepresentableSpecialFloatError.--variable-type-hints autois now--variable-type-hints never(upstream rename), with a newsafeoption that annotates only when the language’s own inference would widen the variable to a permissive type (e.g.unknown[]for an empty TypeScript array).
2026.04.30¶
Bump
literalizerto 2026.4.29 (adds Roc, Wren, Mojo, V, Ada, Nim, Tcl, Scheme, PureScript, OCaml, SystemVerilog, COBOL, Fortran, Dart, Dhall, Elixir, Elm, and PowerShell toliteralize_callsupport).Add
--ref-casefor emitting$refmarkers in input data as bare identifiers re-cased tosnake,camel,pascal,upper_snake, orkebab.Bump
literalizerto 2026.4.21.4.Add
--heterogeneous-strategyto pick between per-language strategies for collections with mixed scalar types (e.g. Rust’stagged_enum, which emits a generated taggedenumpreamble and wraps each value at the call site).Surface
literalize_callerrors as clean CLI messages rather than tracebacks: parameter-count mismatches, languages with no call syntax (YAML, TOML, JSON5, Norg), and languages whose call rendering is not yet implemented all now exit with a descriptiveError:line.Add
--modifier(repeatable) for declaration modifiers on new variables in languages that support them (Java, C#, C++).Remove
--error-on-coercion:literalizernow always errors on heterogeneous data that cannot be represented in the target language.Add
--mode callfor converting data into function call expressions, with--call-function,--call-params, and--per-elementoptions.
2026.04.06¶
2026.03.29¶
Bump
literalizerto 2026.03.26.1.Replace
--line-prefixCLI option with--pre-indent-level.