Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fs-tree-diff

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-tree-diff - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

15

lib/index.js

@@ -104,3 +104,3 @@ 'use strict';

var theirs = otherFSTree.entries;
var operations = [];
var additions = [];

@@ -129,10 +129,10 @@ var i = 0;

// -> directory transforms work correctly
operations.push(command);
additions.push(command);
}
// remove operations
// remove additions
} else if (x.relativePath > y.relativePath) {
// theirs
j++;
operations.push(addCommand(y));
additions.push(addCommand(y));
} else {

@@ -145,3 +145,3 @@ if (!isEqual(x, y)) {

} else {
operations.push(command);
additions.push(command);
}

@@ -161,6 +161,7 @@ }

for (; j < theirs.length; j++) {
operations.push(addCommand(theirs[j]));
additions.push(addCommand(theirs[j]));
}
return operations.concat(removals.reverse());
// operations = removals (in reverse) then additions
return removals.reverse().concat(additions);
};

@@ -167,0 +168,0 @@

{
"name": "fs-tree-diff",
"version": "0.5.3",
"version": "0.5.4",
"description": "Backs out file tree changes",

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

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