find-node-modules
Version:
Return an array of all parent node_modules directories
153 lines (146 loc) • 2.83 kB
JavaScript
"use strict";
var cov_v1ucos01h = function () {
var path = "/home/travis/build/commitizen/cz-cli/src/git/add.js";
var hash = "2d768bd65ce099136dd9e4e3ee013c0c206f76bd";
var global = new Function("return this")();
var gcv = "__coverage__";
var coverageData = {
path: "/home/travis/build/commitizen/cz-cli/src/git/add.js",
statementMap: {
"0": {
start: {
line: 10,
column: 2
},
end: {
line: 10,
column: 18
}
},
"1": {
start: {
line: 11,
column: 2
},
end: {
line: 11,
column: 23
}
},
"2": {
start: {
line: 18,
column: 2
},
end: {
line: 18,
column: 18
}
},
"3": {
start: {
line: 19,
column: 2
},
end: {
line: 19,
column: 32
}
}
},
fnMap: {
"0": {
name: "addPath",
decl: {
start: {
line: 9,
column: 9
},
end: {
line: 9,
column: 16
}
},
loc: {
start: {
line: 9,
column: 32
},
end: {
line: 12,
column: 1
}
},
line: 9
},
"1": {
name: "addFile",
decl: {
start: {
line: 17,
column: 9
},
end: {
line: 17,
column: 16
}
},
loc: {
start: {
line: 17,
column: 42
},
end: {
line: 20,
column: 1
}
},
line: 17
}
},
branchMap: {},
s: {
"0": 0,
"1": 0,
"2": 0,
"3": 0
},
f: {
"0": 0,
"1": 0
},
b: {},
_coverageSchema: "43e27e138ebf9cfc5966b082cf9a028302ed4184",
hash: "2d768bd65ce099136dd9e4e3ee013c0c206f76bd"
};
var coverage = global[gcv] || (global[gcv] = {});
if (coverage[path] && coverage[path].hash === hash) {
return coverage[path];
}
return coverage[path] = coverageData;
}();
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.addPath = addPath;
exports.addFile = addFile;
/**
* Synchronously adds a path to git staging
*/
function addPath(sh, repoPath) {
cov_v1ucos01h.f[0]++;
cov_v1ucos01h.s[0]++;
sh.cd(repoPath);
cov_v1ucos01h.s[1]++;
sh.exec('git add .');
}
/**
* Synchronously adds a file to git staging
*/
function addFile(sh, repoPath, filename) {
cov_v1ucos01h.f[1]++;
cov_v1ucos01h.s[2]++;
sh.cd(repoPath);
cov_v1ucos01h.s[3]++;
sh.exec('git add ' + filename);
}