Repository navigation
dmp: @cocalc/diff-match-patch ^1.1.1 (whole-text patches for small edits to long texts; lost high-surrogate edits) - #33
Merged
Merged
Conversation
…ch; an emoji changed in its high surrogate is not lost (both need @cocalc/diff-match-patch 1.1.1)
…small under the work budget; edits changing only a high surrogate are no longer lost) The lockfile moves only @cocalc/diff-match-patch 1.1.0 -> 1.1.1; pnpm also re-points tinyglobby's picomatch peer from 4.0.4 to 4.0.7 (already locked).
Merged
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.
Moves patchflow to
@cocalc/diff-match-patch^1.1.1, which fixes two bugs that 0.12–0.15 shipped with via 1.1.0.diffWorkLimit, texts over about 780 KB in total couldn't pay for stripping their common prefix and suffix, so the diff was the whole text deleted and inserted. A one-line edit to 800 KB gave a 1.68 MB patch. It is now a patch of the line (75 B), up to 4 MB and beyond.makePatch/applyPatchleft the old text. In random emoji edits at 25M, about 12% of edits were lost on 1.1.0, and none are now. The author's device kept the intended text (and its recordedhash), while the stored patch lacked the edit.Changes:
package.json:@cocalc/diff-match-patch^1.1.0 → ^1.1.1.pnpm-lock.yaml: diff-match-patch 1.1.0 → 1.1.1. pnpm also re-pointstinyglobby'spicomatchpeer from 4.0.4 to 4.0.7, which was already in the lockfile.src/dmp-work-limit.test.ts, regression tests:Against 1.1.0, three of these fail; with 1.1.1 all pass.
Checks:
pnpm check(tests, lint, build) passes, with 246 tests passed and 1 skipped.Still in diff-match-patch and unchanged here:
patch_toTextcan throw on surrogate pairs thatpatch_addContextsplits. patchflow stores patch objects and doesn't call it.No version bump: "release: 0.16.0" follows as its own PR, as for 0.15.0.