-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.x] Update @elastic/kibana-data-discovery dependencies (main) (#202622) #205647
Merged
kibanamachine
merged 2 commits into
elastic:8.x
from
kibanamachine:backport/8.x/pr-202622
Jan 7, 2025
Merged
[8.x] Update @elastic/kibana-data-discovery dependencies (main) (#202622) #205647
kibanamachine
merged 2 commits into
elastic:8.x
from
kibanamachine:backport/8.x/pr-202622
Jan 7, 2025
+90
−42
Conversation
This file contains 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
…2622) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/diff](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/diff) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff)) | devDependencies | major | [`^5.0.8` -> `^6.0.0`](https://renovatebot.com/diffs/npm/@types%2fdiff/5.0.8/6.0.0) | | [diff](https://togithub.com/kpdecker/jsdiff) | dependencies | major | [`^5.1.0` -> `^7.0.0`](https://renovatebot.com/diffs/npm/diff/5.1.0/7.0.0) | | [fastest-levenshtein](https://togithub.com/ka-weihe/fastest-levenshtein) | dependencies | patch | [`^1.0.12` -> `^1.0.16`](https://renovatebot.com/diffs/npm/fastest-levenshtein/1.0.12/1.0.16) | --- ### Release Notes <details> <summary>kpdecker/jsdiff (diff)</summary> ### [`v7.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#700) [Compare Source](https://togithub.com/kpdecker/jsdiff/compare/v6.0.0...7.0.0) Just a single (breaking) bugfix, undoing a behaviour change introduced accidentally in 6.0.0: - [#&elastic#8203;554](https://togithub.com/kpdecker/jsdiff/pull/554) **`diffWords` treats numbers and underscores as word characters again.** This behaviour was broken in v6.0.0. ### [`v6.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#600) [Compare Source](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0) This is a release containing many, *many* breaking changes. The objective of this release was to carry out a mass fix, in one go, of all the open bugs and design problems that required breaking changes to fix. A substantial, but exhaustive, changelog is below. [Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0) - [#&elastic#8203;497](https://togithub.com/kpdecker/jsdiff/pull/497) **`diffWords` behavior has been radically changed.** Previously, even with `ignoreWhitespace: true`, runs of whitespace were tokens, which led to unhelpful and unintuitive diffing behavior in typical texts. Specifically, even when two texts contained overlapping passages, `diffWords` would sometimes choose to delete all the words from the old text and insert them anew in their new positions in order to avoid having to delete or insert whitespace tokens. Whitespace sequences are no longer tokens as of this release, which affects both the generated diffs and the `count`s. Runs of whitespace are still tokens in `diffWordsWithSpace`. As part of the changes to `diffWords`, **a new `.postProcess` method has been added on the base `Diff` type**, which can be overridden in custom `Diff` implementations. **`diffLines` with `ignoreWhitespace: true` will no longer ignore the insertion or deletion of entire extra lines of whitespace at the end of the text**. Previously, these would not show up as insertions or deletions, as a side effect of a hack in the base diffing algorithm meant to help ignore whitespace in `diffWords`. More generally, **the undocumented special handling in the core algorithm for ignored terminals has been removed entirely.** (This special case behavior used to rewrite the final two change objects in a scenario where the final change object was an addition or deletion and its `value` was treated as equal to the empty string when compared using the diff object's `.equals` method.) - [#&elastic#8203;500](https://togithub.com/kpdecker/jsdiff/pull/500) **`diffChars` now diffs Unicode code points** instead of UTF-16 code units. - [#&elastic#8203;508](https://togithub.com/kpdecker/jsdiff/pull/508) **`parsePatch` now always runs in what was previously "strict" mode; the undocumented `strict` option has been removed.** Previously, by default, `parsePatch` (and other patch functions that use it under the hood to parse patches) would accept a patch where the line counts in the headers were inconsistent with the actual patch content - e.g. where a hunk started with the header `@@&elastic#8203; -1,3 +1,6 @&elastic#8203;@&elastic#8203;`, indicating that the content below spanned 3 lines in the old file and 6 lines in the new file, but then the actual content below the header consisted of some different number of lines, say 10 lines of context, 5 deletions, and 1 insertion. Actually trying to work with these patches using `applyPatch` or `merge`, however, would produce incorrect results instead of just ignoring the incorrect headers, making this "feature" more of a trap than something actually useful. It's been ripped out, and now we are always "strict" and will reject patches where the line counts in the headers aren't consistent with the actual patch content. - [#&elastic#8203;435](https://togithub.com/kpdecker/jsdiff/pull/435) **Fix `parsePatch` handling of control characters.** `parsePatch` used to interpret various unusual control characters - namely vertical tabs, form feeds, lone carriage returns without a line feed, and EBCDIC NELs - as line breaks when parsing a patch file. This was inconsistent with the behavior of both JsDiff's own `diffLines` method and also the Unix `diff` and `patch` utils, which all simply treat those control characters as ordinary characters. The result of this discrepancy was that some well-formed patches - produced either by `diff` or by JsDiff itself and handled properly by the `patch` util - would be wrongly parsed by `parsePatch`, with the effect that it would disregard the remainder of a hunk after encountering one of these control characters. - [#&elastic#8203;439](https://togithub.com/kpdecker/jsdiff/pull/439) **Prefer diffs that order deletions before insertions.** When faced with a choice between two diffs with an equal total edit distance, the Myers diff algorithm generally prefers one that does deletions before insertions rather than insertions before deletions. For instance, when diffing `abcd` against `acbd`, it will prefer a diff that says to delete the `b` and then insert a new `b` after the `c`, over a diff that says to insert a `c` before the `b` and then delete the existing `c`. JsDiff deviated from the published Myers algorithm in a way that led to it having the opposite preference in many cases, including that example. This is now fixed, meaning diffs output by JsDiff will more accurately reflect what the published Myers diff algorithm would output. - [#&elastic#8203;455](https://togithub.com/kpdecker/jsdiff/pull/455) **The `added` and `removed` properties of change objects are now guaranteed to be set to a boolean value.** (Previously, they would be set to `undefined` or omitted entirely instead of setting them to false.) - [#&elastic#8203;464](https://togithub.com/kpdecker/jsdiff/pull/464) Specifying `{maxEditLength: 0}` now sets a max edit length of 0 instead of no maximum. - [#&elastic#8203;460](https://togithub.com/kpdecker/jsdiff/pull/460) **Added `oneChangePerToken` option.** - [#&elastic#8203;467](https://togithub.com/kpdecker/jsdiff/pull/467) **Consistent ordering of arguments to `comparator(left, right)`.** Values from the old array will now consistently be passed as the first argument (`left`) and values from the new array as the second argument (`right`). Previously this was almost (but not quite) always the other way round. - [#&elastic#8203;480](https://togithub.com/kpdecker/jsdiff/pull/480) **Passing `maxEditLength` to `createPatch` & `createTwoFilesPatch` now works properly** (i.e. returns undefined if the max edit distance is exceeded; previous behavior was to crash with a `TypeError` if the edit distance was exceeded). - [#&elastic#8203;486](https://togithub.com/kpdecker/jsdiff/pull/486) **The `ignoreWhitespace` option of `diffLines` behaves more sensibly now.** `value`s in returned change objects now include leading/trailing whitespace even when `ignoreWhitespace` is used, just like how with `ignoreCase` the `value`s still reflect the case of one of the original texts instead of being all-lowercase. `ignoreWhitespace` is also now compatible with `newlineIsToken`. Finally, **`diffTrimmedLines` is deprecated** (and removed from the docs) in favour of using `diffLines` with `ignoreWhitespace: true`; the two are, and always have been, equivalent. - [#&elastic#8203;490](https://togithub.com/kpdecker/jsdiff/pull/490) **When calling diffing functions in async mode by passing a `callback` option, the diff result will now be passed as the *first* argument to the callback instead of the second.** (Previously, the first argument was never used at all and would always have value `undefined`.) - [#&elastic#8203;489](togithub.com/kpdecker/jsdiff/pull/489) **`this.options` no longer exists on `Diff` objects.** Instead, `options` is now passed as an argument to methods that rely on options, like `equals(left, right, options)`. This fixes a race condition in async mode, where diffing behaviour could be changed mid-execution if a concurrent usage of the same `Diff` instances overwrote its `options`. - [#&elastic#8203;518](https://togithub.com/kpdecker/jsdiff/pull/518) **`linedelimiters` no longer exists** on patch objects; instead, when a patch with Windows-style CRLF line endings is parsed, **the lines in `lines` will end with `\r`**. There is now a **new `autoConvertLineEndings` option, on by default**, which makes it so that when a patch with Windows-style line endings is applied to a source file with Unix style line endings, the patch gets autoconverted to use Unix-style line endings, and when a patch with Unix-style line endings is applied to a source file with Windows-style line endings, it gets autoconverted to use Windows-style line endings. - [#&elastic#8203;521](https://togithub.com/kpdecker/jsdiff/pull/521) **the `callback` option is now supported by `structuredPatch`, `createPatch`, and `createTwoFilesPatch`** - [#&elastic#8203;529](https://togithub.com/kpdecker/jsdiff/pull/529) **`parsePatch` can now parse patches where lines starting with `--` or `++` are deleted/inserted**; previously, there were edge cases where the parser would choke on valid patches or give wrong results. - [#&elastic#8203;530](https://togithub.com/kpdecker/jsdiff/pull/530) **Added `ignoreNewlineAtEof` option to `diffLines`** - [#&elastic#8203;533](https://togithub.com/kpdecker/jsdiff/pull/533) **`applyPatch` uses an entirely new algorithm for fuzzy matching.** Differences between the old and new algorithm are as follows: - The `fuzzFactor` now indicates the maximum [*Levenshtein* distance](https://en.wikipedia.org/wiki/Levenshtein_distance) that there can be between the context shown in a hunk and the actual file content at a location where we try to apply the hunk. (Previously, it represented a maximum [*Hamming* distance](https://en.wikipedia.org/wiki/Hamming_distance), meaning that a single insertion or deletion in the source file could stop a hunk from applying even with a high `fuzzFactor`.) - A hunk containing a deletion can now only be applied in a context where the line to be deleted actually appears verbatim. (Previously, as long as enough context lines in the hunk matched, `applyPatch` would apply the hunk anyway and delete a completely different line.) - The context line immediately before and immediately after an insertion must match exactly between the hunk and the file for a hunk to apply. (Previously this was not required.) - [#&elastic#8203;535](https://togithub.com/kpdecker/jsdiff/pull/535) **A bug in patch generation functions is now fixed** that would sometimes previously cause `\ No newline at end of file` to appear in the wrong place in the generated patch, resulting in the patch being invalid. - [#&elastic#8203;535](https://togithub.com/kpdecker/jsdiff/pull/535) **Passing `newlineIsToken: true` to *patch*-generation functions is no longer allowed.** (Passing it to `diffLines` is still supported - it's only functions like `createPatch` where passing `newlineIsToken` is now an error.) Allowing it to be passed never really made sense, since in cases where the option had any effect on the output at all, the effect tended to be causing a garbled patch to be created that couldn't actually be applied to the source file. - [#&elastic#8203;539](https://togithub.com/kpdecker/jsdiff/pull/539) **`diffWords` now takes an optional `intlSegmenter` option** which should be an `Intl.Segmenter` with word-level granularity. This provides better tokenization of text into words than the default behaviour, even for English but especially for some other languages for which the default behaviour is poor. ### [`v5.2.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#v520) [Compare Source](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0) [Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0) - [#&elastic#8203;411](https://togithub.com/kpdecker/jsdiff/pull/411) Big performance improvement. Previously an O(n) array-copying operation inside the innermost loop of jsdiff's base diffing code increased the overall worst-case time complexity of computing a diff from O(n²) to O(n³). This is now fixed, bringing the worst-case time complexity down to what it theoretically should be for a Myers diff implementation. - [#&elastic#8203;448](https://togithub.com/kpdecker/jsdiff/pull/448) Performance improvement. Diagonals whose furthest-reaching D-path would go off the edge of the edit graph are now skipped, rather than being pointlessly considered as called for by the original Myers diff algorithm. This dramatically speeds up computing diffs where the new text just appends or truncates content at the end of the old text. - [#&elastic#8203;351](https://togithub.com/kpdecker/jsdiff/issues/351) Importing from the lib folder - e.g. `require("diff/lib/diff/word.js")` - will work again now. This had been broken for users on the latest version of Node since Node 17.5.0, which changed how Node interprets the `exports` property in jsdiff's `package.json` file. - [#&elastic#8203;344](https://togithub.com/kpdecker/jsdiff/issues/344) `diffLines`, `createTwoFilesPatch`, and other patch-creation methods now take an optional `stripTrailingCr: true` option which causes Windows-style `\r\n` line endings to be replaced with Unix-style `\n` line endings before calculating the diff, just like GNU `diff`'s `--strip-trailing-cr` flag. - [#&elastic#8203;451](https://togithub.com/kpdecker/jsdiff/pull/451) Added `diff.formatPatch`. - [#&elastic#8203;450](https://togithub.com/kpdecker/jsdiff/pull/450) Added `diff.reversePatch`. - [#&elastic#8203;478](https://togithub.com/kpdecker/jsdiff/pull/478) Added `timeout` option. </details> <details> <summary>ka-weihe/fastest-levenshtein (fastest-levenshtein)</summary> ### [`v1.0.16`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3) [Compare Source](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3) ### [`v1.0.15`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/37bd0917de8347c73d67467bd1c5ea803cba5f94...1.0.15) [Compare Source](https://togithub.com/ka-weihe/fastest-levenshtein/compare/37bd0917de8347c73d67467bd1c5ea803cba5f94...1.0.15) ### [`v1.0.14`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/45d58d245e0d75138bb7da00dd1188ef8d6fdb84...37bd0917de8347c73d67467bd1c5ea803cba5f94) [Compare Source](https://togithub.com/ka-weihe/fastest-levenshtein/compare/45d58d245e0d75138bb7da00dd1188ef8d6fdb84...37bd0917de8347c73d67467bd1c5ea803cba5f94) ### [`v1.0.13`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/606c132c58039c22989fa0d2d91d4e2d8bbb2404...45d58d245e0d75138bb7da00dd1188ef8d6fdb84) [Compare Source](https://togithub.com/ka-weihe/fastest-levenshtein/compare/606c132c58039c22989fa0d2d91d4e2d8bbb2404...45d58d245e0d75138bb7da00dd1188ef8d6fdb84) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkRhdGFEaXNjb3ZlcnkiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19--> --------- Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Davis McPhee <davis.mcphee@elastic.co> Co-authored-by: Nikita Indik <nikita.indik@elastic.co> Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co> (cherry picked from commit 90e738f)
1 task
💔 Build Failed
Failed CI Steps |
/ci |
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.
Backport
This will backport the following commits from
main
to8.x
:Questions ?
Please refer to the Backport tool documentation
If you want to rebase/retry this PR, check\r\nthis box\r\n\r\n---\r\n\r\nThis PR has been generated by [Renovate\r\nBot](https://togithub.com/renovatebot/renovate).\r\n\r\n\r\n\r\n---------\r\n\r\nCo-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Davis McPhee \r\nCo-authored-by: Nikita Indik \r\nCo-authored-by: Matthias Wilhelm ","sha":"90e738f09d586e96ccad8a257e40c7b3beb36674","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:DataDiscovery","backport:prev-minor"],"title":"Update @elastic/kibana-data-discovery dependencies (main)","number":202622,"url":"https://github.com//pull/202622","mergeCommit":{"message":"Update @elastic/kibana-data-discovery dependencies (main) (#202622)\n\nThis PR contains the following updates:\r\n\r\n| Package | Type | Update | Change |\r\n|---|---|---|---|\r\n|\r\n[@types/diff](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/diff)\r\n([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff))\r\n| devDependencies | major | [`^5.0.8` ->\r\n`^6.0.0`](https://renovatebot.com/diffs/npm/@types%2fdiff/5.0.8/6.0.0) |\r\n| [diff](https://togithub.com/kpdecker/jsdiff) | dependencies | major |\r\n[`^5.1.0` ->\r\n`^7.0.0`](https://renovatebot.com/diffs/npm/diff/5.1.0/7.0.0) |\r\n|\r\n[fastest-levenshtein](https://togithub.com/ka-weihe/fastest-levenshtein)\r\n| dependencies | patch | [`^1.0.12` ->\r\n`^1.0.16`](https://renovatebot.com/diffs/npm/fastest-levenshtein/1.0.12/1.0.16)\r\n|\r\n\r\n---\r\n\r\n### Release Notes\r\n\r\nkpdecker/jsdiff (diff)
\r\n\r\n###\r\n[`v7.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#700)\r\n\r\n[Compare\r\nSource](https://togithub.com/kpdecker/jsdiff/compare/v6.0.0...7.0.0)\r\n\r\nJust a single (breaking) bugfix, undoing a behaviour change introduced\r\naccidentally in 6.0.0:\r\n\r\n- [#554](https://togithub.com/kpdecker/jsdiff/pull/554)\r\n**`diffWords` treats numbers and underscores as word characters again.**\r\nThis behaviour was broken in v6.0.0.\r\n\r\n###\r\n[`v6.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#600)\r\n\r\n[Compare\r\nSource](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0)\r\n\r\nThis is a release containing many, *many* breaking changes. The\r\nobjective of this release was to carry out a mass fix, in one go, of all\r\nthe open bugs and design problems that required breaking changes to fix.\r\nA substantial, but exhaustive, changelog is below.\r\n\r\n[Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0)\r\n\r\n- [#497](https://togithub.com/kpdecker/jsdiff/pull/497)\r\n**`diffWords` behavior has been radically changed.** Previously, even\r\nwith `ignoreWhitespace: true`, runs of whitespace were tokens, which led\r\nto unhelpful and unintuitive diffing behavior in typical texts.\r\nSpecifically, even when two texts contained overlapping passages,\r\n`diffWords` would sometimes choose to delete all the words from the old\r\ntext and insert them anew in their new positions in order to avoid\r\nhaving to delete or insert whitespace tokens. Whitespace sequences are\r\nno longer tokens as of this release, which affects both the generated\r\ndiffs and the `count`s.\r\n\r\n Runs of whitespace are still tokens in `diffWordsWithSpace`.\r\n\r\nAs part of the changes to `diffWords`, **a new `.postProcess` method has\r\nbeen added on the base `Diff` type**, which can be overridden in custom\r\n`Diff` implementations.\r\n\r\n**`diffLines` with `ignoreWhitespace: true` will no longer ignore the\r\ninsertion or deletion of entire extra lines of whitespace at the end of\r\nthe text**. Previously, these would not show up as insertions or\r\ndeletions, as a side effect of a hack in the base diffing algorithm\r\nmeant to help ignore whitespace in `diffWords`. More generally, **the\r\nundocumented special handling in the core algorithm for ignored\r\nterminals has been removed entirely.** (This special case behavior used\r\nto rewrite the final two change objects in a scenario where the final\r\nchange object was an addition or deletion and its `value` was treated as\r\nequal to the empty string when compared using the diff object's\r\n`.equals` method.)\r\n\r\n- [#500](https://togithub.com/kpdecker/jsdiff/pull/500)\r\n**`diffChars` now diffs Unicode code points** instead of UTF-16 code\r\nunits.\r\n\r\n- [#508](https://togithub.com/kpdecker/jsdiff/pull/508)\r\n**`parsePatch` now always runs in what was previously \"strict\" mode; the\r\nundocumented `strict` option has been removed.** Previously, by default,\r\n`parsePatch` (and other patch functions that use it under the hood to\r\nparse patches) would accept a patch where the line counts in the headers\r\nwere inconsistent with the actual patch content - e.g. where a hunk\r\nstarted with the header `@@ -1,3 +1,6 @@`,\r\nindicating that the content below spanned 3 lines in the old file and 6\r\nlines in the new file, but then the actual content below the header\r\nconsisted of some different number of lines, say 10 lines of context, 5\r\ndeletions, and 1 insertion. Actually trying to work with these patches\r\nusing `applyPatch` or `merge`, however, would produce incorrect results\r\ninstead of just ignoring the incorrect headers, making this \"feature\"\r\nmore of a trap than something actually useful. It's been ripped out, and\r\nnow we are always \"strict\" and will reject patches where the line counts\r\nin the headers aren't consistent with the actual patch content.\r\n\r\n- [#435](https://togithub.com/kpdecker/jsdiff/pull/435) **Fix\r\n`parsePatch` handling of control characters.** `parsePatch` used to\r\ninterpret various unusual control characters - namely vertical tabs,\r\nform feeds, lone carriage returns without a line feed, and EBCDIC NELs -\r\nas line breaks when parsing a patch file. This was inconsistent with the\r\nbehavior of both JsDiff's own `diffLines` method and also the Unix\r\n`diff` and `patch` utils, which all simply treat those control\r\ncharacters as ordinary characters. The result of this discrepancy was\r\nthat some well-formed patches - produced either by `diff` or by JsDiff\r\nitself and handled properly by the `patch` util - would be wrongly\r\nparsed by `parsePatch`, with the effect that it would disregard the\r\nremainder of a hunk after encountering one of these control characters.\r\n\r\n- [#439](https://togithub.com/kpdecker/jsdiff/pull/439) **Prefer\r\ndiffs that order deletions before insertions.** When faced with a choice\r\nbetween two diffs with an equal total edit distance, the Myers diff\r\nalgorithm generally prefers one that does deletions before insertions\r\nrather than insertions before deletions. For instance, when diffing\r\n`abcd` against `acbd`, it will prefer a diff that says to delete the `b`\r\nand then insert a new `b` after the `c`, over a diff that says to insert\r\na `c` before the `b` and then delete the existing `c`. JsDiff deviated\r\nfrom the published Myers algorithm in a way that led to it having the\r\nopposite preference in many cases, including that example. This is now\r\nfixed, meaning diffs output by JsDiff will more accurately reflect what\r\nthe published Myers diff algorithm would output.\r\n\r\n- [#455](https://togithub.com/kpdecker/jsdiff/pull/455) **The\r\n`added` and `removed` properties of change objects are now guaranteed to\r\nbe set to a boolean value.** (Previously, they would be set to\r\n`undefined` or omitted entirely instead of setting them to false.)\r\n\r\n- [#464](https://togithub.com/kpdecker/jsdiff/pull/464)\r\nSpecifying `{maxEditLength: 0}` now sets a max edit length of 0 instead\r\nof no maximum.\r\n\r\n- [#460](https://togithub.com/kpdecker/jsdiff/pull/460) **Added\r\n`oneChangePerToken` option.**\r\n\r\n- [#467](https://togithub.com/kpdecker/jsdiff/pull/467)\r\n**Consistent ordering of arguments to `comparator(left, right)`.**\r\nValues from the old array will now consistently be passed as the first\r\nargument (`left`) and values from the new array as the second argument\r\n(`right`). Previously this was almost (but not quite) always the other\r\nway round.\r\n\r\n- [#480](https://togithub.com/kpdecker/jsdiff/pull/480) **Passing\r\n`maxEditLength` to `createPatch` & `createTwoFilesPatch` now works\r\nproperly** (i.e. returns undefined if the max edit distance is exceeded;\r\nprevious behavior was to crash with a `TypeError` if the edit distance\r\nwas exceeded).\r\n\r\n- [#486](https://togithub.com/kpdecker/jsdiff/pull/486) **The\r\n`ignoreWhitespace` option of `diffLines` behaves more sensibly now.**\r\n`value`s in returned change objects now include leading/trailing\r\nwhitespace even when `ignoreWhitespace` is used, just like how with\r\n`ignoreCase` the `value`s still reflect the case of one of the original\r\ntexts instead of being all-lowercase. `ignoreWhitespace` is also now\r\ncompatible with `newlineIsToken`. Finally, **`diffTrimmedLines` is\r\ndeprecated** (and removed from the docs) in favour of using `diffLines`\r\nwith `ignoreWhitespace: true`; the two are, and always have been,\r\nequivalent.\r\n\r\n- [#490](https://togithub.com/kpdecker/jsdiff/pull/490) **When\r\ncalling diffing functions in async mode by passing a `callback` option,\r\nthe diff result will now be passed as the *first* argument to the\r\ncallback instead of the second.** (Previously, the first argument was\r\nnever used at all and would always have value `undefined`.)\r\n\r\n- [#489](togithub.com/kpdecker/jsdiff/pull/489) **`this.options`\r\nno longer exists on `Diff` objects.** Instead, `options` is now passed\r\nas an argument to methods that rely on options, like `equals(left,\r\nright, options)`. This fixes a race condition in async mode, where\r\ndiffing behaviour could be changed mid-execution if a concurrent usage\r\nof the same `Diff` instances overwrote its `options`.\r\n\r\n- [#518](https://togithub.com/kpdecker/jsdiff/pull/518)\r\n**`linedelimiters` no longer exists** on patch objects; instead, when a\r\npatch with Windows-style CRLF line endings is parsed, **the lines in\r\n`lines` will end with `\\r`**. There is now a **new\r\n`autoConvertLineEndings` option, on by default**, which makes it so that\r\nwhen a patch with Windows-style line endings is applied to a source file\r\nwith Unix style line endings, the patch gets autoconverted to use\r\nUnix-style line endings, and when a patch with Unix-style line endings\r\nis applied to a source file with Windows-style line endings, it gets\r\nautoconverted to use Windows-style line endings.\r\n\r\n- [#521](https://togithub.com/kpdecker/jsdiff/pull/521) **the\r\n`callback` option is now supported by `structuredPatch`, `createPatch`,\r\nand `createTwoFilesPatch`**\r\n\r\n- [#529](https://togithub.com/kpdecker/jsdiff/pull/529)\r\n**`parsePatch` can now parse patches where lines starting with `--` or\r\n`++` are deleted/inserted**; previously, there were edge cases where the\r\nparser would choke on valid patches or give wrong results.\r\n\r\n- [#530](https://togithub.com/kpdecker/jsdiff/pull/530) **Added\r\n`ignoreNewlineAtEof` option to `diffLines`**\r\n\r\n- [#533](https://togithub.com/kpdecker/jsdiff/pull/533)\r\n**`applyPatch` uses an entirely new algorithm for fuzzy matching.**\r\nDifferences between the old and new algorithm are as follows:\r\n- The `fuzzFactor` now indicates the maximum [*Levenshtein*\r\ndistance](https://en.wikipedia.org/wiki/Levenshtein_distance) that there\r\ncan be between the context shown in a hunk and the actual file content\r\nat a location where we try to apply the hunk. (Previously, it\r\nrepresented a maximum [*Hamming*\r\ndistance](https://en.wikipedia.org/wiki/Hamming_distance), meaning that\r\na single insertion or deletion in the source file could stop a hunk from\r\napplying even with a high `fuzzFactor`.)\r\n- A hunk containing a deletion can now only be applied in a context\r\nwhere the line to be deleted actually appears verbatim. (Previously, as\r\nlong as enough context lines in the hunk matched, `applyPatch` would\r\napply the hunk anyway and delete a completely different line.)\r\n- The context line immediately before and immediately after an insertion\r\nmust match exactly between the hunk and the file for a hunk to apply.\r\n(Previously this was not required.)\r\n\r\n- [#535](https://togithub.com/kpdecker/jsdiff/pull/535) **A bug\r\nin patch generation functions is now fixed** that would sometimes\r\npreviously cause `\\ No newline at end of file` to appear in the wrong\r\nplace in the generated patch, resulting in the patch being invalid.\r\n\r\n- [#535](https://togithub.com/kpdecker/jsdiff/pull/535) **Passing\r\n`newlineIsToken: true` to *patch*-generation functions is no longer\r\nallowed.** (Passing it to `diffLines` is still supported - it's only\r\nfunctions like `createPatch` where passing `newlineIsToken` is now an\r\nerror.) Allowing it to be passed never really made sense, since in cases\r\nwhere the option had any effect on the output at all, the effect tended\r\nto be causing a garbled patch to be created that couldn't actually be\r\napplied to the source file.\r\n\r\n- [#539](https://togithub.com/kpdecker/jsdiff/pull/539)\r\n**`diffWords` now takes an optional `intlSegmenter` option** which\r\nshould be an `Intl.Segmenter` with word-level granularity. This provides\r\nbetter tokenization of text into words than the default behaviour, even\r\nfor English but especially for some other languages for which the\r\ndefault behaviour is poor.\r\n\r\n###\r\n[`v5.2.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#v520)\r\n\r\n[Compare\r\nSource](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0)\r\n\r\n[Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0)\r\n\r\n- [#411](https://togithub.com/kpdecker/jsdiff/pull/411) Big\r\nperformance improvement. Previously an O(n) array-copying operation\r\ninside the innermost loop of jsdiff's base diffing code increased the\r\noverall worst-case time complexity of computing a diff from O(n²) to\r\nO(n³). This is now fixed, bringing the worst-case time complexity down\r\nto what it theoretically should be for a Myers diff implementation.\r\n- [#448](https://togithub.com/kpdecker/jsdiff/pull/448)\r\nPerformance improvement. Diagonals whose furthest-reaching D-path would\r\ngo off the edge of the edit graph are now skipped, rather than being\r\npointlessly considered as called for by the original Myers diff\r\nalgorithm. This dramatically speeds up computing diffs where the new\r\ntext just appends or truncates content at the end of the old text.\r\n- [#351](https://togithub.com/kpdecker/jsdiff/issues/351)\r\nImporting from the lib folder - e.g. `require(\"diff/lib/diff/word.js\")`\r\n- will work again now. This had been broken for users on the latest\r\nversion of Node since Node 17.5.0, which changed how Node interprets the\r\n`exports` property in jsdiff's `package.json` file.\r\n- [#344](https://togithub.com/kpdecker/jsdiff/issues/344)\r\n`diffLines`, `createTwoFilesPatch`, and other patch-creation methods now\r\ntake an optional `stripTrailingCr: true` option which causes\r\nWindows-style `\\r\\n` line endings to be replaced with Unix-style `\\n`\r\nline endings before calculating the diff, just like GNU `diff`'s\r\n`--strip-trailing-cr` flag.\r\n- [#451](https://togithub.com/kpdecker/jsdiff/pull/451) Added\r\n`diff.formatPatch`.\r\n- [#450](https://togithub.com/kpdecker/jsdiff/pull/450) Added\r\n`diff.reversePatch`.\r\n- [#478](https://togithub.com/kpdecker/jsdiff/pull/478) Added\r\n`timeout` option.\r\n\r\nka-weihe/fastest-levenshtein (fastest-levenshtein)
\r\n\r\n###\r\n[`v1.0.16`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3)\r\n\r\n###\r\n[`v1.0.15`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/37bd0917de8347c73d67467bd1c5ea803cba5f94...1.0.15)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/37bd0917de8347c73d67467bd1c5ea803cba5f94...1.0.15)\r\n\r\n###\r\n[`v1.0.14`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/45d58d245e0d75138bb7da00dd1188ef8d6fdb84...37bd0917de8347c73d67467bd1c5ea803cba5f94)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/45d58d245e0d75138bb7da00dd1188ef8d6fdb84...37bd0917de8347c73d67467bd1c5ea803cba5f94)\r\n\r\n###\r\n[`v1.0.13`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/606c132c58039c22989fa0d2d91d4e2d8bbb2404...45d58d245e0d75138bb7da00dd1188ef8d6fdb84)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/606c132c58039c22989fa0d2d91d4e2d8bbb2404...45d58d245e0d75138bb7da00dd1188ef8d6fdb84)\r\n\r\nkpdecker/jsdiff (diff)
\r\n\r\n###\r\n[`v7.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#700)\r\n\r\n[Compare\r\nSource](https://togithub.com/kpdecker/jsdiff/compare/v6.0.0...7.0.0)\r\n\r\nJust a single (breaking) bugfix, undoing a behaviour change introduced\r\naccidentally in 6.0.0:\r\n\r\n- [#554](https://togithub.com/kpdecker/jsdiff/pull/554)\r\n**`diffWords` treats numbers and underscores as word characters again.**\r\nThis behaviour was broken in v6.0.0.\r\n\r\n###\r\n[`v6.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#600)\r\n\r\n[Compare\r\nSource](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0)\r\n\r\nThis is a release containing many, *many* breaking changes. The\r\nobjective of this release was to carry out a mass fix, in one go, of all\r\nthe open bugs and design problems that required breaking changes to fix.\r\nA substantial, but exhaustive, changelog is below.\r\n\r\n[Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0)\r\n\r\n- [#497](https://togithub.com/kpdecker/jsdiff/pull/497)\r\n**`diffWords` behavior has been radically changed.** Previously, even\r\nwith `ignoreWhitespace: true`, runs of whitespace were tokens, which led\r\nto unhelpful and unintuitive diffing behavior in typical texts.\r\nSpecifically, even when two texts contained overlapping passages,\r\n`diffWords` would sometimes choose to delete all the words from the old\r\ntext and insert them anew in their new positions in order to avoid\r\nhaving to delete or insert whitespace tokens. Whitespace sequences are\r\nno longer tokens as of this release, which affects both the generated\r\ndiffs and the `count`s.\r\n\r\n Runs of whitespace are still tokens in `diffWordsWithSpace`.\r\n\r\nAs part of the changes to `diffWords`, **a new `.postProcess` method has\r\nbeen added on the base `Diff` type**, which can be overridden in custom\r\n`Diff` implementations.\r\n\r\n**`diffLines` with `ignoreWhitespace: true` will no longer ignore the\r\ninsertion or deletion of entire extra lines of whitespace at the end of\r\nthe text**. Previously, these would not show up as insertions or\r\ndeletions, as a side effect of a hack in the base diffing algorithm\r\nmeant to help ignore whitespace in `diffWords`. More generally, **the\r\nundocumented special handling in the core algorithm for ignored\r\nterminals has been removed entirely.** (This special case behavior used\r\nto rewrite the final two change objects in a scenario where the final\r\nchange object was an addition or deletion and its `value` was treated as\r\nequal to the empty string when compared using the diff object's\r\n`.equals` method.)\r\n\r\n- [#500](https://togithub.com/kpdecker/jsdiff/pull/500)\r\n**`diffChars` now diffs Unicode code points** instead of UTF-16 code\r\nunits.\r\n\r\n- [#508](https://togithub.com/kpdecker/jsdiff/pull/508)\r\n**`parsePatch` now always runs in what was previously \"strict\" mode; the\r\nundocumented `strict` option has been removed.** Previously, by default,\r\n`parsePatch` (and other patch functions that use it under the hood to\r\nparse patches) would accept a patch where the line counts in the headers\r\nwere inconsistent with the actual patch content - e.g. where a hunk\r\nstarted with the header `@@ -1,3 +1,6 @@`,\r\nindicating that the content below spanned 3 lines in the old file and 6\r\nlines in the new file, but then the actual content below the header\r\nconsisted of some different number of lines, say 10 lines of context, 5\r\ndeletions, and 1 insertion. Actually trying to work with these patches\r\nusing `applyPatch` or `merge`, however, would produce incorrect results\r\ninstead of just ignoring the incorrect headers, making this \"feature\"\r\nmore of a trap than something actually useful. It's been ripped out, and\r\nnow we are always \"strict\" and will reject patches where the line counts\r\nin the headers aren't consistent with the actual patch content.\r\n\r\n- [#435](https://togithub.com/kpdecker/jsdiff/pull/435) **Fix\r\n`parsePatch` handling of control characters.** `parsePatch` used to\r\ninterpret various unusual control characters - namely vertical tabs,\r\nform feeds, lone carriage returns without a line feed, and EBCDIC NELs -\r\nas line breaks when parsing a patch file. This was inconsistent with the\r\nbehavior of both JsDiff's own `diffLines` method and also the Unix\r\n`diff` and `patch` utils, which all simply treat those control\r\ncharacters as ordinary characters. The result of this discrepancy was\r\nthat some well-formed patches - produced either by `diff` or by JsDiff\r\nitself and handled properly by the `patch` util - would be wrongly\r\nparsed by `parsePatch`, with the effect that it would disregard the\r\nremainder of a hunk after encountering one of these control characters.\r\n\r\n- [#439](https://togithub.com/kpdecker/jsdiff/pull/439) **Prefer\r\ndiffs that order deletions before insertions.** When faced with a choice\r\nbetween two diffs with an equal total edit distance, the Myers diff\r\nalgorithm generally prefers one that does deletions before insertions\r\nrather than insertions before deletions. For instance, when diffing\r\n`abcd` against `acbd`, it will prefer a diff that says to delete the `b`\r\nand then insert a new `b` after the `c`, over a diff that says to insert\r\na `c` before the `b` and then delete the existing `c`. JsDiff deviated\r\nfrom the published Myers algorithm in a way that led to it having the\r\nopposite preference in many cases, including that example. This is now\r\nfixed, meaning diffs output by JsDiff will more accurately reflect what\r\nthe published Myers diff algorithm would output.\r\n\r\n- [#455](https://togithub.com/kpdecker/jsdiff/pull/455) **The\r\n`added` and `removed` properties of change objects are now guaranteed to\r\nbe set to a boolean value.** (Previously, they would be set to\r\n`undefined` or omitted entirely instead of setting them to false.)\r\n\r\n- [#464](https://togithub.com/kpdecker/jsdiff/pull/464)\r\nSpecifying `{maxEditLength: 0}` now sets a max edit length of 0 instead\r\nof no maximum.\r\n\r\n- [#460](https://togithub.com/kpdecker/jsdiff/pull/460) **Added\r\n`oneChangePerToken` option.**\r\n\r\n- [#467](https://togithub.com/kpdecker/jsdiff/pull/467)\r\n**Consistent ordering of arguments to `comparator(left, right)`.**\r\nValues from the old array will now consistently be passed as the first\r\nargument (`left`) and values from the new array as the second argument\r\n(`right`). Previously this was almost (but not quite) always the other\r\nway round.\r\n\r\n- [#480](https://togithub.com/kpdecker/jsdiff/pull/480) **Passing\r\n`maxEditLength` to `createPatch` & `createTwoFilesPatch` now works\r\nproperly** (i.e. returns undefined if the max edit distance is exceeded;\r\nprevious behavior was to crash with a `TypeError` if the edit distance\r\nwas exceeded).\r\n\r\n- [#486](https://togithub.com/kpdecker/jsdiff/pull/486) **The\r\n`ignoreWhitespace` option of `diffLines` behaves more sensibly now.**\r\n`value`s in returned change objects now include leading/trailing\r\nwhitespace even when `ignoreWhitespace` is used, just like how with\r\n`ignoreCase` the `value`s still reflect the case of one of the original\r\ntexts instead of being all-lowercase. `ignoreWhitespace` is also now\r\ncompatible with `newlineIsToken`. Finally, **`diffTrimmedLines` is\r\ndeprecated** (and removed from the docs) in favour of using `diffLines`\r\nwith `ignoreWhitespace: true`; the two are, and always have been,\r\nequivalent.\r\n\r\n- [#490](https://togithub.com/kpdecker/jsdiff/pull/490) **When\r\ncalling diffing functions in async mode by passing a `callback` option,\r\nthe diff result will now be passed as the *first* argument to the\r\ncallback instead of the second.** (Previously, the first argument was\r\nnever used at all and would always have value `undefined`.)\r\n\r\n- [#489](togithub.com/kpdecker/jsdiff/pull/489) **`this.options`\r\nno longer exists on `Diff` objects.** Instead, `options` is now passed\r\nas an argument to methods that rely on options, like `equals(left,\r\nright, options)`. This fixes a race condition in async mode, where\r\ndiffing behaviour could be changed mid-execution if a concurrent usage\r\nof the same `Diff` instances overwrote its `options`.\r\n\r\n- [#518](https://togithub.com/kpdecker/jsdiff/pull/518)\r\n**`linedelimiters` no longer exists** on patch objects; instead, when a\r\npatch with Windows-style CRLF line endings is parsed, **the lines in\r\n`lines` will end with `\\r`**. There is now a **new\r\n`autoConvertLineEndings` option, on by default**, which makes it so that\r\nwhen a patch with Windows-style line endings is applied to a source file\r\nwith Unix style line endings, the patch gets autoconverted to use\r\nUnix-style line endings, and when a patch with Unix-style line endings\r\nis applied to a source file with Windows-style line endings, it gets\r\nautoconverted to use Windows-style line endings.\r\n\r\n- [#521](https://togithub.com/kpdecker/jsdiff/pull/521) **the\r\n`callback` option is now supported by `structuredPatch`, `createPatch`,\r\nand `createTwoFilesPatch`**\r\n\r\n- [#529](https://togithub.com/kpdecker/jsdiff/pull/529)\r\n**`parsePatch` can now parse patches where lines starting with `--` or\r\n`++` are deleted/inserted**; previously, there were edge cases where the\r\nparser would choke on valid patches or give wrong results.\r\n\r\n- [#530](https://togithub.com/kpdecker/jsdiff/pull/530) **Added\r\n`ignoreNewlineAtEof` option to `diffLines`**\r\n\r\n- [#533](https://togithub.com/kpdecker/jsdiff/pull/533)\r\n**`applyPatch` uses an entirely new algorithm for fuzzy matching.**\r\nDifferences between the old and new algorithm are as follows:\r\n- The `fuzzFactor` now indicates the maximum [*Levenshtein*\r\ndistance](https://en.wikipedia.org/wiki/Levenshtein_distance) that there\r\ncan be between the context shown in a hunk and the actual file content\r\nat a location where we try to apply the hunk. (Previously, it\r\nrepresented a maximum [*Hamming*\r\ndistance](https://en.wikipedia.org/wiki/Hamming_distance), meaning that\r\na single insertion or deletion in the source file could stop a hunk from\r\napplying even with a high `fuzzFactor`.)\r\n- A hunk containing a deletion can now only be applied in a context\r\nwhere the line to be deleted actually appears verbatim. (Previously, as\r\nlong as enough context lines in the hunk matched, `applyPatch` would\r\napply the hunk anyway and delete a completely different line.)\r\n- The context line immediately before and immediately after an insertion\r\nmust match exactly between the hunk and the file for a hunk to apply.\r\n(Previously this was not required.)\r\n\r\n- [#535](https://togithub.com/kpdecker/jsdiff/pull/535) **A bug\r\nin patch generation functions is now fixed** that would sometimes\r\npreviously cause `\\ No newline at end of file` to appear in the wrong\r\nplace in the generated patch, resulting in the patch being invalid.\r\n\r\n- [#535](https://togithub.com/kpdecker/jsdiff/pull/535) **Passing\r\n`newlineIsToken: true` to *patch*-generation functions is no longer\r\nallowed.** (Passing it to `diffLines` is still supported - it's only\r\nfunctions like `createPatch` where passing `newlineIsToken` is now an\r\nerror.) Allowing it to be passed never really made sense, since in cases\r\nwhere the option had any effect on the output at all, the effect tended\r\nto be causing a garbled patch to be created that couldn't actually be\r\napplied to the source file.\r\n\r\n- [#539](https://togithub.com/kpdecker/jsdiff/pull/539)\r\n**`diffWords` now takes an optional `intlSegmenter` option** which\r\nshould be an `Intl.Segmenter` with word-level granularity. This provides\r\nbetter tokenization of text into words than the default behaviour, even\r\nfor English but especially for some other languages for which the\r\ndefault behaviour is poor.\r\n\r\n###\r\n[`v5.2.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#v520)\r\n\r\n[Compare\r\nSource](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0)\r\n\r\n[Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0)\r\n\r\n- [#411](https://togithub.com/kpdecker/jsdiff/pull/411) Big\r\nperformance improvement. Previously an O(n) array-copying operation\r\ninside the innermost loop of jsdiff's base diffing code increased the\r\noverall worst-case time complexity of computing a diff from O(n²) to\r\nO(n³). This is now fixed, bringing the worst-case time complexity down\r\nto what it theoretically should be for a Myers diff implementation.\r\n- [#448](https://togithub.com/kpdecker/jsdiff/pull/448)\r\nPerformance improvement. Diagonals whose furthest-reaching D-path would\r\ngo off the edge of the edit graph are now skipped, rather than being\r\npointlessly considered as called for by the original Myers diff\r\nalgorithm. This dramatically speeds up computing diffs where the new\r\ntext just appends or truncates content at the end of the old text.\r\n- [#351](https://togithub.com/kpdecker/jsdiff/issues/351)\r\nImporting from the lib folder - e.g. `require(\"diff/lib/diff/word.js\")`\r\n- will work again now. This had been broken for users on the latest\r\nversion of Node since Node 17.5.0, which changed how Node interprets the\r\n`exports` property in jsdiff's `package.json` file.\r\n- [#344](https://togithub.com/kpdecker/jsdiff/issues/344)\r\n`diffLines`, `createTwoFilesPatch`, and other patch-creation methods now\r\ntake an optional `stripTrailingCr: true` option which causes\r\nWindows-style `\\r\\n` line endings to be replaced with Unix-style `\\n`\r\nline endings before calculating the diff, just like GNU `diff`'s\r\n`--strip-trailing-cr` flag.\r\n- [#451](https://togithub.com/kpdecker/jsdiff/pull/451) Added\r\n`diff.formatPatch`.\r\n- [#450](https://togithub.com/kpdecker/jsdiff/pull/450) Added\r\n`diff.reversePatch`.\r\n- [#478](https://togithub.com/kpdecker/jsdiff/pull/478) Added\r\n`timeout` option.\r\n\r\nka-weihe/fastest-levenshtein (fastest-levenshtein)
\r\n\r\n###\r\n[`v1.0.16`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3)\r\n\r\n###\r\n[`v1.0.15`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/37bd0917de8347c73d67467bd1c5ea803cba5f94...1.0.15)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/37bd0917de8347c73d67467bd1c5ea803cba5f94...1.0.15)\r\n\r\n###\r\n[`v1.0.14`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/45d58d245e0d75138bb7da00dd1188ef8d6fdb84...37bd0917de8347c73d67467bd1c5ea803cba5f94)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/45d58d245e0d75138bb7da00dd1188ef8d6fdb84...37bd0917de8347c73d67467bd1c5ea803cba5f94)\r\n\r\n###\r\n[`v1.0.13`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/606c132c58039c22989fa0d2d91d4e2d8bbb2404...45d58d245e0d75138bb7da00dd1188ef8d6fdb84)\r\n\r\n[Compare\r\nSource](https://togithub.com/ka-weihe/fastest-levenshtein/compare/606c132c58039c22989fa0d2d91d4e2d8bbb2404...45d58d245e0d75138bb7da00dd1188ef8d6fdb84)\r\n\r\n