build(deps): bump document-schema.js to 4.1.0 - #636
Merged
Conversation
Triggered instantly via repository_dispatch when document-schema.js published its own release, rather than waiting for the next scheduled Dependabot scan.
…arrier document-schema.js 4.1.0 widened SectionChild/ShapeChild/ListChild with SectionConstructGroupNode/ShapeConstructGroupNode (docx SDTs, ODF fields, tracked changes, and the rest of #22's fidelity-construct vocabulary), so flattenSectionChildren/flattenListChildren's exhaustive walks no longer compiled against the wider unions. ContentBlock has no construct carrier to flatten a construct group's own semantic wrapper into -- #22 tracks that separately and leaves it deliberately absent for now -- so silently dropping the wrapper and keeping only its flattened children would be a real, silent fidelity loss. Refuse instead, mirroring the file's existing sheet-group-style-ref and missing-styles-table refusals: resolution runs completely or not at all. decompose.ts itself needed no change: it never manufactures a construct group (grepping this package's src/ for ConstructDescriptor/*ConstructGroupNode returns nothing outside document-schema.js's own types), so the two new kinds only ever reach flatten via a hand-built or third-party tree. The ownership test's own 'node'/'children' presence check no longer narrows out every non-anchor shape either, since a SectionConstructGroupNode now carries both too -- swap it for the real isHeadingGroupNode/isListGroupNode schema guards, which state the assertion's actual intent instead of reinventing the anchor-vs-construct narrow that test doesn't need to know about.
document-schema.js 4.1.0's SectionConstructGroupNode/ShapeConstructGroupNode
carry the same { node, style?, children } shape as every other wrapper
factorStyles already mints through, so they join MintWrapper on equal
footing rather than as a special case: a construct descriptor is never
the 'paragraph'/'slide'/'drawPage'/'section' discriminant any existing
guard matches on, so both kinds fall straight through extentOf's and
childWrappers' dispatch chains to the same "no anchor of its own, whole
flow is the extent" default a plain SectionGroupNode already relies on.
No wrapper-classification guard needed changing.
The rebuild side does need its own dispatch: rebuildSectionChild and
rebuildListChild gained an isConstructGroup narrow (mirroring flatten.ts's
identical structural check) feeding two new rebuilders shaped exactly
like rebuildSectionGroup/rebuildShapeGroup -- stamp a minted ref when one
lands, rebuild the flow below. FlowChild widened from SectionChild alone
to SectionChild | ListChild, since ListChild/ShapeChild (both
ListGroupNode | ShapeConstructGroupNode | ContentBlock since 4.1.0) are
no longer a sub-range of SectionChild the way they were pre-4.1.
mint() is exported alongside assemblePackage/factorStyles: it is
otherwise unreachable on a tree carrying a construct group, since
assemblePackage only ever takes flat content (decompose never manufactures
one) and factorStyles flattens its input first, which now refuses one --
the export is what lets a hand-built tree, or the new regression test
proving extentOf/flowExtent actually recurse into a construct group's
children rather than stopping at or skipping it, reach mint() at all.
Add a ShapeConstructGroupNode fixture sat inside a ShapeGroupNode's own children (nested under a SlideGroupNode) so mint()'s shape/list-flow rebuild path gets its own coverage rather than riding untested behind the existing section-flow construct-group test. This exercises rebuildShapeConstructGroup and the isConstructGroup dispatch arm inside rebuildListChild, neither of which the suite previously invoked: the only other ShapeConstructGroupNode fixture in the codebase throws inside flattenPackage before mint is ever reached.
…nt-schema.js#22 A bare #N in this repo's own tracker reads as documents.js#N, not document-schema.js#N -- the comment already qualifies the reference later in the same sentence, so state it consistently from the first mention too, matching flatten.ts's own error message.
Contributor
|
🎉 This PR is included in version 3.0.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic dependency bump triggered instantly by the document-schema.js release.