-
v2.1.0 Stable
released this
2026-08-11 18:21:23 +02:00 | 2 commits to main since this releaseBreaking changes
- All public functions (
dispatch,build_usage,render_form,
render_record,render_table,render,prompt,confirm) now
returnnil, <daw_error/v1 object>instead ofnil, <string>. See
MIGRATION-DAW-MODUL-BERHTJAN-CLI-2.1.mdfor the full code
reference. render_form()andprompt()gainedlang/default_lang
parameters and no longer fall back to the group id when a label
can't be resolved -- consistent with
daw-modul-berhtjan-core'sresolve_label()"no silent fallbacks"
rule.render_form(),render_record(),render_table()now actually
returntrue, nil | nil, erron their success/failure paths
(previously returned nothing at all).init.lua's facade no longer crashes viaerror()at load time if
a submodule is missing -- every export degrades individually via a
missing()stub.
Fixes
render_record()/render_table()/render(): a field value of
falsewas rendered as an empty string (x or ""treated it the
same as a missing value). Now onlynilbecomes"";false
renders as"false".prompt_field()/confirm():read_line()returningnil(EOF,
perdaw.common.sys's contract) was silently treated as an empty
answer. Now surfaced asinput_ended.- Local
sorted_subs()indispatch.lua(a duplicate re-
implementation of subcommand ordering) removed, replaced by
daw-modul-berhtjan-core'score.sorted_subcommands()
(DAW/daw-modul-berhtjan-core#4). Works unchanged at the index level
despite different field names, since the shared helper only ever
copies fields generically and sorts by.order. dispatch():cmd.subcommands[sub_name]could crash on anil
cmd.subcommands(a command with no subcommands at all). Now
guarded.
Internal
dispatch.lua(flat file, 289 lines) split intodispatch/
(init.lua,args.lua,display.lua) -- exceeded the 250-line
limit.require("daw.berhtjan_cli.dispatch")unchanged.test/dev-module-map.lua: addeddaw.common.errorand the new
dispatch.*/scanner.*submodule entries, matching the
corresponding split indaw-modul-berhtjan-core.- New
test/test_berhtjan-cli-prompt.lua-- didn't exist before this
release; covers thegroup_label_resolve_failed,deps_unavailable
andinput_endederror paths. test/test_berhtjan-cli-dispatch.lua: new fixtures for
handler_not_foundand for provingcore.sorted_subcommands()is
actually wired in (subcommand output order follows.order, not
declaration order in the fixture's JSON).- Test suite: 68 -> 87 tests.
Migration
Every dispatching/rendering call site that reads
erras a string
needs updating; code that only checksif err thenis unaffected.
MIGRATION-DAW-MODUL-BERHTJAN-CLI-2.1.mdwalks through the full
change set.Requires daw-modul-berhtjan-core >= 2.1.0.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- All public functions (