You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import the flat/tree package boundary from document-schema.js instead of the local copy #650
document-schema.js now publishes decompose, flattenPackage, factorStyles, assemblePackage, ConstructMarkerImbalanceError, and the PackageChildren type from its own barrel (ExaDev/document-schema.js#27) -- the same structural transform documents.js currently keeps as its own copy at src/convert/{decompose,flatten,factor-styles,canonicalise}.ts.
Once document-schema.js publishes a release containing that transform (>=4.3.0), documents.js should:
Bump the document-schema.js dependency via the normal sibling-dependency-update flow (not a manual version edit).
Import decompose/flattenPackage/factorStyles/assemblePackage/ConstructMarkerImbalanceError/PackageChildren from document-schema.js rather than src/convert/.
Delete src/convert/decompose.ts, src/convert/flatten.ts, src/convert/factor-styles.ts, and src/convert/canonicalise.ts, along with their dedicated test files, once the relocated implementation is confirmed to cover the same ground.
Keep bijection.test.ts's real-format corpus (readers, editors, onDocument captures) running against the relocated implementation rather than dropping it -- that corpus is exactly what document-schema.js's own copy of the law suite cannot cover, since importing it there would invert the dependency direction the relocation exists to protect. This is the run that actually proves the relocation broke nothing against real documents, not just the hand-built corpus the relocated suite ships with.
Until this lands, src/convert/'s copies and document-schema.js's relocated copies are free to drift from each other.
Activity
github-actions commentedon Aug 19, 2026
🎉 This issue has been resolved in version 4.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀