fs-tree-diff
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16401
273