Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.4.10 to 1.4.11

2

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

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

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

- Fix a logic bug when split range of lines into valid ones.
### 1.4.11
- Fix a bug where a stub hunk will crash the hunk insertion.

@@ -327,3 +327,10 @@ import leven from 'leven';

const insertionOldLineNumber = computeOldLineNumber(insertion.changes[0]);
const insertPosition = hunks.findIndex(hunk => computeOldLineNumber(hunk.changes[0]) >= insertionOldLineNumber);
const isLaterThanInsertion = ({changes}) => {
if (!changes.length) {
return false;
}
return computeOldLineNumber(changes[0]) >= insertionOldLineNumber;
};
const insertPosition = hunks.findIndex(isLaterThanInsertion);
const hunksWithInsertion = insertPosition === -1

@@ -330,0 +337,0 @@ ? hunks.concat(insertion)

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc