🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-diff-view

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-diff-view - npm Package Compare versions

Comparing version

to
1.4.1

2

package.json
{
"name": "react-diff-view",
"version": "1.4.0",
"version": "1.4.1",
"description": "A git diff component to consume the git unified diff output.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -471,1 +471,5 @@ # react-diff-view

- `stubHunk` option on `parse` function is deprecated.
### 1.4.1
- Fix an edge case in `sliceHunk`.

@@ -94,3 +94,3 @@ import leven from 'leven';

const baseLineNumber = baseSide === 'old' ? computeOldLineNumber : computeNewLineNumber;
const correspondingLineNumber = baseSide === 'old' ? computeOldLineNumber : computeNewLineNumber;
const correspondingLineNumber = baseSide === 'old' ? computeNewLineNumber : computeOldLineNumber;
const isInHunk = createIsInHunkFunction(baseStart, baseLines);

@@ -180,2 +180,6 @@ const isBetweenHunks = createIsBetweenHunksFunction(baseStart, baseLines);

if (!slicedChanges.length) {
return null;
}
const firstChange = first(slicedChanges);

@@ -200,2 +204,10 @@ const oldStart = computeOldLineNumber(firstChange);

const mergeHunk = (previousHunk, nextHunk) => {
if (!previousHunk) {
return nextHunk;
}
if (!nextHunk) {
return previousHunk;
}
const previousStart = computeOldLineNumber(first(previousHunk.changes));

@@ -202,0 +214,0 @@ const previousEnd = computeOldLineNumber(last(previousHunk.changes));

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet