v4.4.1
Bug Fixes
-
@byline/admin— form field paths are now identity-stable across a reorder. Editor field paths addressed array and block items by position (content[0].alt), while a drag reorder updated the rendered list without reordering the form store. Between the reorder and the save the two disagreed, so an edit made in that window was written against whichever item still occupied that index — a different item than the one on screen. Conditions evaluated against the wrong item's values, and a deferred upload could attach its file to the wrong item. Paths now carry the item's stable_id(content[id=…].alt) wherever one exists, so an item keeps its identity through any structural change; positional addressing remains as a fallback for items that have no id yet. Pending uploads and repeating-item state were moved onto the same identity, and are now discarded correctly when their item is removed. -
@byline/core— bracket characters are rejected in field, block, and collection names at boot, alongside the existing rule for dots.[and]delimit item selectors in instance paths, so a name containing one could not survive a parse round trip; it is now refused where it is declared rather than corrupting a path later. The check also reports an empty segment distinctly from one carrying grammar punctuation. -
@byline/core— a stray closing bracket in a declaration path is reported as malformed rather than as a wrong-dialect item index. The previous message steered authors from instance notation toward declaration notation, which is unhelpful advice for what is simply a typo.
Migrations
-
@byline/core—FieldHookContext.pathand the paths passed tosetFieldValuenow use[id=…]selectors instead of positional indices. A field hook receivesfiles[id=01924f…].filesGroup.generateThumbnailwhere it previously receivedfiles[2].filesGroup.generateThumbnail. The type is unchanged and nothing fails to compile, so a hook that parses or pattern-matches onpathwill stop matching silently.Action: review any hook that inspects
pathrather than passing it through. The pattern to look for is a positional regex, for examplepath.match(/^files\[(\d+)\]/)used to identify the current item among its siblings. Match the item's id instead —path.match(/^files\[id=([^\]]+)\]/)compared against each item's_id— or accept both forms during a transition. Hooks that only forwardpathtosetFieldValueneed no change, andsetFieldValuestill accepts positional paths.
Chores
- monorepo — the Path Grammar architecture reference was reconciled against the current implementation and is now the authoritative account of every path notation Byline uses. A regression test pins the one case that distinguishes correct relative-scope arithmetic: an
upload.contextentry of../declared on a field directly on a block must climb out of the block and resolve at the document root.
All other @byline/* packages bumped to 4.4.1 in lockstep with no behavioural changes this cycle.