Comparing version 0.33.1 to 0.33.2
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="0.33.2"></a> | ||
## [0.33.2](https://github.com/stryker-mutator/stryker/compare/stryker@0.33.1...stryker@0.33.2) (2018-12-12) | ||
**Note:** Version bump only for package stryker | ||
<a name="0.33.1"></a> | ||
@@ -8,0 +16,0 @@ ## [0.33.1](https://github.com/stryker-mutator/stryker/compare/stryker@0.33.0...stryker@0.33.1) (2018-11-29) |
{ | ||
"name": "stryker", | ||
"version": "0.33.1", | ||
"version": "0.33.2", | ||
"description": "The extendable JavaScript mutation testing framework", | ||
@@ -86,3 +86,3 @@ "main": "src/Stryker.js", | ||
"@types/progress": "~2.0.1", | ||
"stryker-api": "^0.22.0" | ||
"stryker-api": "^0.22.1" | ||
}, | ||
@@ -89,0 +89,0 @@ "peerDependencies": { |
@@ -33,3 +33,6 @@ "use strict"; | ||
switch (_b.label) { | ||
case 0: return [4 /*yield*/, Promise.all([this.resolveInputFiles(), this.mutateResolver.resolve()])]; | ||
case 0: return [4 /*yield*/, Promise.all([ | ||
this.resolveInputFiles(), | ||
this.mutateResolver.resolve() | ||
])]; | ||
case 1: | ||
@@ -57,3 +60,4 @@ _a = _b.sent(), inputFileNames = _a[0], mutateFiles = _a[1]; | ||
InputFileResolver.prototype.resolveFilesUsingGit = function () { | ||
return util_2.childProcessAsPromised.exec('git ls-files --others --exclude-standard --cached --exclude .stryker-tmp', { maxBuffer: 10 * 1000 * 1024 }) | ||
return util_2.childProcessAsPromised | ||
.exec('git ls-files --others --exclude-standard --cached --exclude .stryker-tmp', { maxBuffer: 10 * 1000 * 1024 }) | ||
.then(function (_a) { | ||
@@ -63,4 +67,10 @@ var stdout = _a.stdout; | ||
}) | ||
.then(function (output) { return output.split('\n').map(function (fileName) { return fileName.trim(); }); }) | ||
.then(function (fileNames) { return fileNames.filter(function (fileName) { return fileName; }).map(function (fileName) { return path.resolve(fileName); }); }) | ||
.then(function (output) { | ||
return output.split('\n').map(function (fileName) { return fileName.trim(); }); | ||
}) | ||
.then(function (fileNames) { | ||
return fileNames | ||
.filter(function (fileName) { return fileName; }) | ||
.map(function (fileName) { return path.resolve(fileName); }); | ||
}) | ||
.catch(function (error) { | ||
@@ -78,13 +88,16 @@ throw new StrykerError_1.default("Cannot determine input files. Either specify a `files` array in your stryker configuration, or make sure \"" + process.cwd() + "\" is located inside a git repository", error); | ||
var _this = this; | ||
return Promise.all(files.map(function (fileName) { return _this.readFile(fileName); })) | ||
.then(objectUtils_1.filterEmpty); | ||
return Promise.all(files.map(function (fileName) { return _this.readFile(fileName); })).then(objectUtils_1.filterEmpty); | ||
}; | ||
InputFileResolver.prototype.readFile = function (fileName) { | ||
var _this = this; | ||
return util_1.fsAsPromised.readFile(fileName).then(function (content) { return new core_1.File(fileName, content); }) | ||
return util_1.fsAsPromised | ||
.readFile(fileName) | ||
.then(function (content) { return new core_1.File(fileName, content); }) | ||
.then(function (file) { | ||
_this.reportSourceFilesRead(file); | ||
return file; | ||
}).catch(function (error) { | ||
if (objectUtils_1.isErrnoException(error) && error.code === 'ENOENT' || error.code === 'EISDIR') { | ||
}) | ||
.catch(function (error) { | ||
if ((objectUtils_1.isErrnoException(error) && error.code === 'ENOENT') || | ||
error.code === 'EISDIR') { | ||
return null; // file is deleted or a directory. This can be a valid result of the git command | ||
@@ -141,3 +154,6 @@ } | ||
if (!this.previous) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, Promise.all([this.previous.resolve(), globbingTask])]; | ||
return [4 /*yield*/, Promise.all([ | ||
this.previous.resolve(), | ||
globbingTask | ||
])]; | ||
case 2: | ||
@@ -149,3 +165,5 @@ results = _a.sent(); | ||
if (this.ignore) { | ||
return [2 /*return*/, previousFiles_1.filter(function (previousFile) { return currentFiles_1.every(function (currentFile) { return previousFile !== currentFile; }); })]; | ||
return [2 /*return*/, previousFiles_1.filter(function (previousFile) { | ||
return currentFiles_1.every(function (currentFile) { return previousFile !== currentFile; }); | ||
})]; | ||
} | ||
@@ -152,0 +170,0 @@ else { |
@@ -1,7 +0,7 @@ | ||
import { StrykerOptions } from 'stryker-api/core'; | ||
import StrictReporter from './reporters/StrictReporter'; | ||
import { Config } from 'stryker-api/config'; | ||
export default class ReporterOrchestrator { | ||
private readonly options; | ||
private readonly log; | ||
constructor(options: StrykerOptions); | ||
constructor(options: Config); | ||
createBroadcastReporter(): StrictReporter; | ||
@@ -8,0 +8,0 @@ private createReporter; |
@@ -31,3 +31,5 @@ "use strict"; | ||
if (reporterOption && reporterOption.length) { | ||
reporterOption.forEach(function (reporterName) { return reporters.push(_this.createReporter(reporterName)); }); | ||
reporterOption.forEach(function (reporterName) { | ||
return reporters.push(_this.createReporter(reporterName)); | ||
}); | ||
} | ||
@@ -43,6 +45,12 @@ else { | ||
this.log.info('Detected that current console does not support the "progress" reporter, downgrading to "progress-append-only" reporter'); | ||
return { name: 'progress-append-only', reporter: report_1.ReporterFactory.instance().create('progress-append-only', this.options) }; | ||
return { | ||
name: 'progress-append-only', | ||
reporter: report_1.ReporterFactory.instance().create('progress-append-only', this.options) | ||
}; | ||
} | ||
else { | ||
return { name: name, reporter: report_1.ReporterFactory.instance().create(name, this.options) }; | ||
return { | ||
name: name, | ||
reporter: report_1.ReporterFactory.instance().create(name, this.options) | ||
}; | ||
} | ||
@@ -52,3 +60,5 @@ }; | ||
var possibleReportersCsv = ''; | ||
report_1.ReporterFactory.instance().knownNames().forEach(function (name) { | ||
report_1.ReporterFactory.instance() | ||
.knownNames() | ||
.forEach(function (name) { | ||
if (possibleReportersCsv.length) { | ||
@@ -55,0 +65,0 @@ possibleReportersCsv += ', '; |
@@ -112,6 +112,8 @@ "use strict"; | ||
var timer = setTimeout(function () { return res(exports.TimeoutExpired); }, ms); | ||
promise.then(function (result) { | ||
promise | ||
.then(function (result) { | ||
clearTimeout(timer); | ||
res(result); | ||
}).catch(function (error) { | ||
}) | ||
.catch(function (error) { | ||
clearTimeout(timer); | ||
@@ -125,5 +127,8 @@ rej(error); | ||
function padLeft(input) { | ||
return input.split('\n').map(function (str) { return '\t' + str; }).join('\n'); | ||
return input | ||
.split('\n') | ||
.map(function (str) { return '\t' + str; }) | ||
.join('\n'); | ||
} | ||
exports.padLeft = padLeft; | ||
//# sourceMappingURL=objectUtils.js.map |
415056
7438