Comparing version 1.2.0 to 1.3.0
@@ -0,1 +1,7 @@ | ||
### Version 1.3.0 (2017-02-04) | ||
- Improved: Artifacts are now written to disk when using the `--reproduce` flag. | ||
This makes it easier to narrow down errors. | ||
### Version 1.2.0 (2017-02-03) | ||
@@ -9,2 +15,3 @@ | ||
### Version 1.1.1 (2017-01-30) | ||
@@ -11,0 +18,0 @@ |
30
index.js
@@ -222,5 +222,6 @@ "use strict"; | ||
].join("\n"); | ||
const extraMessage = options.reproduce | ||
? null | ||
: writeFiles(outputDir, testData.code, {}); | ||
const extraMessage = writeFiles(outputDir, { | ||
code: testData.code, | ||
reproduce: options.reproduce | ||
}); | ||
yield { | ||
@@ -240,5 +241,7 @@ message: ( | ||
].join("\n"); | ||
const extraMessage = options.reproduce | ||
? null | ||
: writeFiles(outputDir, testData.code, result); | ||
const extraMessage = writeFiles(outputDir, { | ||
code: testData.code, | ||
result, | ||
reproduce: options.reproduce | ||
}); | ||
yield { | ||
@@ -268,3 +271,6 @@ message: ( | ||
function writeFiles(outputDir, code, result) { | ||
function writeFiles( | ||
outputDir, | ||
{ code = null, result = {}, reproduce = false } = {} | ||
) { | ||
try { | ||
@@ -288,3 +294,3 @@ mkdirp.sync(outputDir); | ||
let reproductionDataString; | ||
if ("reproductionData" in result) { | ||
if ("reproductionData" in result && !reproduce) { | ||
try { | ||
@@ -303,6 +309,8 @@ reproductionDataString = JSON.stringify(result.reproductionData, null, 2); | ||
tryWrite(FILES.random, code); | ||
tryWrite(FILES.randomBackup, code); | ||
if (code !== null && !reproduce) { | ||
tryWrite(FILES.random, code); | ||
tryWrite(FILES.randomBackup, code); | ||
} | ||
if (reproductionDataString) { | ||
if (reproductionDataString && !reproduce) { | ||
tryWrite(FILES.reproductionData, reproductionDataString); | ||
@@ -309,0 +317,0 @@ } |
{ | ||
"name": "eslump", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": "Simon Lydell", |
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
25246
496