v2.5.1
Bug Fixes
@byline/richtext-lexical— Internal-link and inline-image populate batches now fetch their target documents through the storage adapter'sgetDocumentsByDocumentIdsprimitive instead ofclient.collection(path).find({ where: { id: { $in: ids } } }).parseWherehas no handler forid, so the previous shape silently dropped the filter and returned arbitrary documents ordered bycreated_at desc, capped atids.lengthrows. In a single-published-doc target collection the broken query accidentally returned the right document; once a target collection contained more than one published document, embeds could resolve link envelopes against the wrong target (writing the wrongdocument.title/document.path) or trip the "internal link target not found" branch (marking the link_resolved: falseeven though the target existed and was published). Surfaced reliably after bulk-importing markdown through theimport-docsscript, where the docs collection grew past one published row. The fix mirrors the primitivepopulateDocumentsalready uses for ID-based batch fetches atpackages/core/src/services/populate.ts, so richtext link populate and relation populate now share the same target-lookup path. Returned rows are normalised to the{ id, path, status, fields }shape both visitors expect, solinkVisitorandinlineImageVisitorneed no changes.readContextstays on therunLexicalPopulateoptions interface for forward compatibility but is no longer threaded — the direct adapter call doesn't recurse into populate orafterRead, so there is no visited-set or read-budget state to share. Companion ticket tracks teachingparseWhereto recogniseidas a reserved key sowhere: { id }becomes a first-class client API surface (the CHANGELOG entry that referenced it previously was misleading).
All other @byline/* packages bumped to 2.5.1 in lockstep with no behavioural changes this cycle.