git-csv-diff
Advanced tools
Comparing version 1.1.11 to 1.1.12
{ | ||
"name": "git-csv-diff", | ||
"author": "Valor-Software", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"license": "GPL-3.0", | ||
@@ -6,0 +6,0 @@ "description": "Library generate difference between csv-files based on Git commit hash", |
@@ -394,20 +394,33 @@ 'use strict'; | ||
// removed | ||
let dataRowRemoved = {}; | ||
// updated, only changed cell | ||
let dataRow = {}; | ||
let dataRowLang = {}; | ||
let dataRowOrigin = {}; | ||
// check that file with datapoints | ||
diffResultColumns.forEach(function (columnValue, columnIndex) { | ||
if ( | ||
fileDiffData.header.remove.indexOf(columnValue) == -1 && | ||
fileDiffData.header.create.indexOf(columnValue) == -1 | ||
) { | ||
// ready columns | ||
dataRowRemoved[columnValue] = value[columnIndex]; | ||
} | ||
value.forEach(function (valueCell, indexCell) { | ||
let columnKey = diffResultColumns[indexCell]; | ||
if (fileDiffData.header.create.indexOf(columnKey) == -1) { | ||
dataRowOrigin[columnKey] = valueCell; | ||
} | ||
// check if not removed column | ||
if (fileDiffData.header.remove.indexOf(columnKey) === -1) { | ||
// collect all changes for translations anyway | ||
dataRowLang[columnKey] = valueCell; | ||
dataRow[columnKey] = valueCell; | ||
} | ||
}); | ||
// fileDiffData.body.remove.push(dataRowRemoved); | ||
modelDiff.metadata.action = 'remove'; | ||
modelDiff.object = dataRowRemoved; | ||
let conceptValueSearchFor = value[indexGid]; | ||
let dataRowUpdated = {}; | ||
dataRowUpdated["gid"] = diffResultGidField; | ||
dataRowUpdated[diffResultGidField] = conceptValueSearchFor; | ||
dataRowUpdated["data-update"] = dataRow; | ||
dataRowUpdated["data-origin"] = dataRowOrigin; | ||
// fileDiffData.body.change.push(dataRowUpdated); | ||
modelDiff.metadata.action = 'change'; | ||
modelDiff.object = dataRowUpdated; | ||
writeToStream(baseStream, modelDiff); | ||
} | ||
@@ -414,0 +427,0 @@ } |
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
73326
926