Skip to content

Reference ​

ts
import { diffLines, draftOf, patchOf, splitBlocks, splitLines } from '@adecore/merge';

Limits ​

LimitValueWhat happens past itExplained in
Edits in one diff4000, fixedThe changed middle becomes one change, or one coarse hunk in patchOfLines and diffs
Changed lines in a hunk4000The hunk gets coarse: truePatches
maxWork of patchOfNone unless you pass oneThe unmatched middle becomes one coarse hunkPatches
Line length for wordChangesVery long linesIt returns nullDiff rows

Block kinds ​

MergeBlockKindMerges to
stableOurs
oursOurs
theirsTheirs
bothOurs, once
conflictNothing until someone answers

Three-way merge explains each kind.

Exports ​

Every name @adecore/merge exports, read from its source. Anything not listed is internal and may change in any release.

@adecore/merge ​

Lines, diffs, patches, diff rows and displays, and the three-way merge.

NameKindSource
diffLinesfunctiondiff
Changetypediff
splitBlocksfunctionblocks
MergeBlocktypeblocks
MergeBlockKindtypeblocks
bothLinesfunctionresolve
draftOffunctionresolve
fingerprintfunctionresolve
sideLinesfunctionresolve
wandLinesfunctionresolve
MergeDrafttyperesolve
MergeSidetyperesolve
MergeSpantyperesolve
joinLinesfunctiontext
shapeOffunctiontext
splitLinesfunctiontext
TextShapetypetext
missingSidesfunctionpatch
patchFitsfunctionpatch
parsePatchfunctionpatch-parser
parseHunkHeaderfunctionpatch-parser
HunkHeadertypepatch-parser
Hunktypepatch-parser
ParsedPatchtypepatch-parser
PatchLinetypepatch-parser
diffDocumentfunctiondiff-document
diffRowsfunctiondiff-document
DiffDocumenttypediff-document
DiffGapRowtypediff-document
DiffLineReftypediff-document
DiffLineRowtypediff-document
DiffRowtypediff-document
patchOffunctionpatch-of
wordChangesfunctionword-changes
DiffWordRangetypeword-changes
diffDisplayfunctiondiff-display
DiffDisplaytypediff-display
DiffDisplayGaptypediff-display
diffSplitfunctiondiff-split
DiffSplittypediff-split
DiffSplitRowtypediff-split
sourceLineOffunctiondiff-source
DiffSourceLinetypediff-source

Licenses and third-party notices are listed in each package.