From 7682c3bf7662f7e663f8c45fe20b697a66ba6207 Mon Sep 17 00:00:00 2001 From: Ryota Kameoka Date: Wed, 2 Oct 2024 00:57:48 +0900 Subject: [PATCH] `linedelimiters` no longer exists on patch objects https://github.com/kpdecker/jsdiff/pull/518 --- types/diff/index.d.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/types/diff/index.d.ts b/types/diff/index.d.ts index 9dd1a1af210d9c2..1944a1dae5f4904 100644 --- a/types/diff/index.d.ts +++ b/types/diff/index.d.ts @@ -79,6 +79,11 @@ export interface PatchOptions extends LinesOptions { } export interface ApplyPatchOptions { + /** + * If `true`, and if the file to be patched consistently uses different line endings to the patch (i.e. either the file always uses Unix line endings while the patch uses Windows ones, or vice versa), then `applyPatch` will behave as if the line endings in the patch were the same as those in the source file. (If `false`, the patch will usually fail to apply in such circumstances since lines deleted in the patch won't be considered to match those in the source file.) Defaults to `true`. + */ + autoConvertLineEndings?: boolean | undefined; + /** * Number of lines that are allowed to differ before rejecting a patch. * @default 0 @@ -145,8 +150,6 @@ export interface Hunk { newStart: number; newLines: number; lines: string[]; - // Line Delimiters is only returned by parsePatch() - linedelimiters?: string[]; } export interface BestPath {