Release History¶
This page mirrors the project CHANGELOG.md.
The format follows Keep a Changelog, and the project adheres
to Semantic Versioning. kBars has not yet cut a 0.1.0
release; everything below is unreleased, in-development history.
Unreleased¶
Added¶
- Conformance manifest, machine-readable error codes, and a versioned distribution. A generated
conformance/manifest.jsonlists every fixture file with its version and case count so a runner can detect a truncated or edited suite.conformance/error-codes.jsonis the machine-readable companion toERROR-CODES.md, in the same envelope shape as a fixture file. The suite's schema$ids resolve live on the Bars specification site, and the whole suite ships as a downloadable, checksummed ZIP per version. See Porting, Error Codes, and Distribution. - Number rendering is now ECMA-262
Number::toStringcanonical.{{ n }}(and any numeric interpolation) renders the shortest round-trip decimal string, using ECMA-262's fixed/exponential notation rules — the same algorithm a browser console uses — instead of each Kotlin target's nativeDouble.toString(). See Number Rendering. {{#each}}struct iteration is documented as normative insertion order. No behavior change, but now specified and tested — see Blocks.kbars render --json. A machine-readable output mode restricted to a single render, emitting one sealed JSON envelope (output,error, orinvalid-context) to stdout. See CLI Reference.kbars conformanceruns the full six-shape fixture suite, dispatched by each fixture's declaredschemafield, and gained--full-report[=PATH]with a documented exit-code contract. See CLI Reference.- Handlebars-style partials (
{{> key }}). Renders a separately-loaded template in place, via aKbPartialLoaderregistered on the environment. See Partials. - Source locations on exceptions.
KbParseExceptionandKbRenderExceptioncarry aKbSourceLocation(line, column, verbatim source text, and — for partials — the fulltemplateStack), folded into the exception message. - Soft-fail event listener. A
KbEventListenerobserves soft failures during rendering —TypeMismatch,DegenerateValue,UnparseableInput,ComparisonMismatch,UnresolvedReference, andNoMatch— each carrying a source location. Custom transforms can report their own viaKbTransformScope.softFail(…). - Environment properties (
@env) and scoped variables ({{= }}). Environments carry aMap<String, KbTransformable>of properties, read via{{ @env/name }}; every environment includes a defaultnowproperty.{{= @env/name = … }}and{{= @local/name = … }}bind render-global and frame-scoped variables respectively. See Environment Properties and Scoped Variables. - First-class date-time support. A
KbTransformable.DateTimesubtype plusas_date_time,parse_date_time, andformat_date_timetransforms, and date-time-aware overloads ofplus,minus,at_least, andat_most. See Date/Time Transforms. - 40+ Liquid-equivalent transforms across math (
abs,at_least,at_most,ceil,divided_by,floor,minus,modulo,plus,round,times), lists (compact,concat,find,find_index,first,has,join,last,map,reject,reverse,size,sort,sum,uniq,where), and strings (replace_first,replace_last,rstrip,slice,split,strip,strip_html,strip_newlines,truncate,url_decode,url_encode,url_escape,url_param_escape, and more), plus adefaulttransform. See Transforms and its family pages. - New modules
kbars-kxs,kbars-yamlkt, andkbars-conformance.kbars-kxsandkbars-yamlktaddKbEnvironment.from(json)/.fromYaml(yaml)convenience factories;kbars-conformancehosts the conformance fixture runners and Gradle codegen. See Usage. - The core template language:
{{ }}/{{{ }}}interpolation with HTML escaping, comments, raw blocks, whitespace trimming;{{#if}}/{{else if}}/{{else}},{{#unless}},{{#each}}(list and struct,@index/@key), and{{#with}}blocks;this/./dot-notation/RFC 6901 pointer/../identifier forms; binary expressions (||,&&,==,!=,<,<=,>,>=) with documented equality/ordering/truthiness rules; a pipe-and-argument transform pipeline. See Usage. - The
kbarsCLI (renderandconformancesubcommands) and itsshadowJardistribution.
Changed¶
- Templates are reusable across renders, and documented as not thread-safe: a compiled
KbTemplatecaches its parsed AST and identifier classification, so re-rendering against a newKbEnvironmentre-parses nothing. - CLI
--contextaccepts YAML as a JSON fallback: JSON is tried first; YAML is attempted only when JSON parsing itself fails. :kbarscontext model migrated tokpointer-adapter.KbEnvironment.createnow accepts aKpaStruct?instead of aJsonObject?, and transforms consumeKpaElement?rather thanJsonElement?— the engine is no longer tied to kotlinx-serialization.
Breaking¶
- Exception hierarchy:
KbParseExceptionandKbRenderExceptionnow extendKbException.Template.renderthrowsKbRenderException(notKbParseException) for render-time hard failures. CatchKbExceptionto handle both, or add a separateKbRenderExceptionclause. - Transform builder methods renamed
add/override/remove→addTransform/overrideTransform/removeTransform(to make room for the paralleladdProperty/overrideProperty/removePropertymethods), andKbEnvironment.create/fromJson/fromYamlgained aclockparameter.
Removed¶
KbEnvironment.from(json: String)removed from:kbars. Add akbars-kxsdependency andimport com.commonsware.kbars.kxs.fromto keep using it.RenderFixture/RenderConformanceRunner/RenderExpect/RenderConformanceResultmoved out of:kbarsinto:kbars-conformance(package paths unchanged).asIntandrequireNumberremoved from the public API in favor ofasIntOrNullandasNumberOrNull, which don't throw on type mismatch.
See the full CHANGELOG.md
for the complete, unabridged history, including internal-only entries.