Skip to content

Commit 7b29db7

Browse files
committed
Bump diff to 5.0.0
1 parent 1db14ff commit 7b29db7

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

lib/util/conflicter.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,14 @@ class Conflicter {
236236
contents.toString(),
237237
this.diffOptions
238238
);
239-
} else {
240-
file.changes = jsdiff.diffLines(
241-
actual.toString(),
242-
contents.toString(),
243-
this.diffOptions
244-
);
239+
const {changes} = file;
240+
return changes.some(change => change.value && change.value.trim() && (change.added || change.removed));
245241
}
242+
file.changes = jsdiff.diffLines(
243+
actual.toString(),
244+
contents.toString(),
245+
this.diffOptions
246+
);
246247

247248
const {changes} = file;
248249
return changes.length > 1 || changes[0].added || changes[0].removed;

package-lock.json

+23-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"cli-table": "^0.3.1",
4747
"dateformat": "^4.5.0",
4848
"debug": "^4.1.1",
49-
"diff": "^4.0.2",
49+
"diff": "^5.0.0",
5050
"escape-string-regexp": "^4.0.0",
5151
"execa": "^5.0.0",
5252
"globby": "^11.0.1",

0 commit comments

Comments
 (0)