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
Copy file name to clipboardExpand all lines: release-notes.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ This is a release containing many, *many* breaking changes. The objective of thi
33
33
-[#490](https://github.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`.)
34
34
-[#489](github.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`.
35
35
-[#518](https://github.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.
36
-
-[#521](https://github.com/kpdecker/jsdiff/pull/521)**the `callback` option is now supported by `structuredPatch`, `createPatch
36
+
-[#521](https://github.com/kpdecker/jsdiff/pull/521)**the `callback` option is now supported by `structuredPatch`, `createPatch`, and `createTwoFilesPatch`**
37
37
-[#529](https://github.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.
38
-
-[#530](https://github.com/kpdecker/jsdiff/pull/530)**Added `ignoreNewlineAtEof` option` to `diffLines`**
38
+
-[#530](https://github.com/kpdecker/jsdiff/pull/530)**Added `ignoreNewlineAtEof` option to `diffLines`**
39
39
-[#533](https://github.com/kpdecker/jsdiff/pull/533)**`applyPatch` uses an entirely new algorithm for fuzzy matching.** Differences between the old and new algorithm are as follows:
40
40
* 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`.)
41
41
* 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.)
0 commit comments