chore(deps): upgrade diff to 7.0.0

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2024-11-11 16:34:48 +01:00
parent 0bb09a1597
commit e65cbd95d9
6 changed files with 18 additions and 33 deletions

View file

@ -48,7 +48,7 @@
"cli-color": "2.0.4",
"connect-typeorm": "2.0.0",
"cookie": "0.7.2",
"diff": "5.2.0",
"diff": "7.0.0",
"express-session": "1.18.1",
"file-type": "16.5.4",
"htmlparser2": "9.1.0",
@ -80,7 +80,7 @@
"@types/cli-color": "2.0.6",
"@types/cookie": "0.6.0",
"@types/cookie-signature": "1.1.2",
"@types/diff": "5.2.3",
"@types/diff": "6.0.0",
"@types/express": "5.0.0",
"@types/express-session": "1.18.0",
"@types/jest": "29.5.13",

View file

@ -60,7 +60,7 @@
"d3-graphviz": "5.6.0",
"d3-selection": "3.0.0",
"deepmerge": "4.3.1",
"diff": "5.2.0",
"diff": "7.0.0",
"dom-serializer": "2.0.0",
"domhandler": "5.0.3",
"dompurify": "3.1.6",
@ -127,7 +127,7 @@
"@testing-library/react-hooks": "8.0.1",
"@testing-library/user-event": "14.5.2",
"@types/d3-graphviz": "2.6.10",
"@types/diff": "5.2.3",
"@types/diff": "6.0.0",
"@types/dompurify": "3.0.5",
"@types/jest": "29.5.13",
"@types/katex": "0.16.7",

View file

@ -4,20 +4,6 @@ exports[`invert unified patch inverts a patch correctly 1`] = `
{
"hunks": [
{
"linedelimiters": [
"
",
"
",
"
",
"
",
"
",
"
",
],
"lines": [
"+a",
"+b",

View file

@ -16,13 +16,12 @@ export const invertUnifiedPatch = (parsedDiff: ParsedDiff): ParsedDiff => {
const { oldFileName, newFileName, oldHeader, newHeader, hunks, index } = parsedDiff
const newHunks: Hunk[] = hunks.map((hunk) => {
const { oldLines, oldStart, newLines, newStart, lines, linedelimiters } = hunk
const { oldLines, oldStart, newLines, newStart, lines } = hunk
return {
oldLines: newLines,
oldStart: newStart,
newLines: oldLines,
newStart: oldStart,
linedelimiters: linedelimiters,
lines: lines.map((line) => {
if (line.startsWith('-')) {
return `+${line.slice(1)}`

View file

@ -73,7 +73,7 @@ export class LineContentToLineIdMapper {
* @return {@link true} if the given change is neither adding nor removing lines.
*/
private static changeIsNotChangingLines(change: LineChange): boolean {
return change.added === undefined && change.removed === undefined
return change.added === false && change.removed === false
}
/**

View file

@ -2577,7 +2577,7 @@ __metadata:
"@types/cli-color": "npm:2.0.6"
"@types/cookie": "npm:0.6.0"
"@types/cookie-signature": "npm:1.1.2"
"@types/diff": "npm:5.2.3"
"@types/diff": "npm:6.0.0"
"@types/express": "npm:5.0.0"
"@types/express-session": "npm:1.18.0"
"@types/jest": "npm:29.5.13"
@ -2600,7 +2600,7 @@ __metadata:
cli-color: "npm:2.0.4"
connect-typeorm: "npm:2.0.0"
cookie: "npm:0.7.2"
diff: "npm:5.2.0"
diff: "npm:7.0.0"
eslint: "npm:8.57.1"
eslint-config-prettier: "npm:9.1.0"
eslint-plugin-import: "npm:2.31.0"
@ -2715,7 +2715,7 @@ __metadata:
"@testing-library/react-hooks": "npm:8.0.1"
"@testing-library/user-event": "npm:14.5.2"
"@types/d3-graphviz": "npm:2.6.10"
"@types/diff": "npm:5.2.3"
"@types/diff": "npm:6.0.0"
"@types/dompurify": "npm:3.0.5"
"@types/jest": "npm:29.5.13"
"@types/katex": "npm:0.16.7"
@ -2741,7 +2741,7 @@ __metadata:
d3-graphviz: "npm:5.6.0"
d3-selection: "npm:3.0.0"
deepmerge: "npm:4.3.1"
diff: "npm:5.2.0"
diff: "npm:7.0.0"
dom-serializer: "npm:2.0.0"
domhandler: "npm:5.0.3"
dompurify: "npm:3.1.6"
@ -5268,10 +5268,10 @@ __metadata:
languageName: node
linkType: hard
"@types/diff@npm:5.2.3":
version: 5.2.3
resolution: "@types/diff@npm:5.2.3"
checksum: 10c0/dd2e99e272a7023f3e5c71099599553c7d6c9a6b9d67f202b593b8d59b0528361eba39a8674ab18eba76217b6bad8f1a09417a9a571daaf7c0f49d67d4f305e2
"@types/diff@npm:6.0.0":
version: 6.0.0
resolution: "@types/diff@npm:6.0.0"
checksum: 10c0/229325cd8039de546dc370d63d62eaf5774122a616eb09cd446d479181e58e941c2983303d23ebcb405109b1b2653ab3bbfcf63a24f827e976e98c8eb83dd34f
languageName: node
linkType: hard
@ -9353,10 +9353,10 @@ __metadata:
languageName: node
linkType: hard
"diff@npm:5.2.0":
version: 5.2.0
resolution: "diff@npm:5.2.0"
checksum: 10c0/aed0941f206fe261ecb258dc8d0ceea8abbde3ace5827518ff8d302f0fc9cc81ce116c4d8f379151171336caf0516b79e01abdc1ed1201b6440d895a66689eb4
"diff@npm:7.0.0":
version: 7.0.0
resolution: "diff@npm:7.0.0"
checksum: 10c0/251fd15f85ffdf814cfc35a728d526b8d2ad3de338dcbd011ac6e57c461417090766b28995f8ff733135b5fbc3699c392db1d5e27711ac4e00244768cd1d577b
languageName: node
linkType: hard