Comparing version 0.12.0 to 0.13.0
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="0.13.0"></a> | ||
# [0.13.0](https://github.com/Igmat/baset/compare/v0.12.1...v0.13.0) (2018-05-31) | ||
### Features | ||
* **cli:** implementing tap compatible output ([80d2fc4](https://github.com/Igmat/baset/commit/80d2fc4)), closes [#55](https://github.com/Igmat/baset/issues/55) | ||
* **cli:** option for using tap reporters ([4955454](https://github.com/Igmat/baset/commit/4955454)), closes [#55](https://github.com/Igmat/baset/issues/55) | ||
<a name="0.12.0"></a> | ||
@@ -8,0 +20,0 @@ # [0.12.0](https://github.com/Igmat/baset/compare/v0.11.1...v0.12.0) (2018-05-03) |
@@ -15,9 +15,3 @@ "use strict"; | ||
const glob_promise_1 = __importDefault(require("glob-promise")); | ||
const errMessage = (err) => `Temp baseline for ${err.name} is written. | ||
Expected for ${err.name}: | ||
${err.expected} | ||
Actual: | ||
${err.actual}`; | ||
const successMessage = (err) => `Temp baseline for ${err.name} is written. | ||
Test for ${err.name} is passed`; | ||
const TAP_1 = require("../TAP"); | ||
function filterNodeModules(filePath) { | ||
@@ -43,2 +37,8 @@ return !filePath.includes('node_modules'); | ||
}, | ||
reporter: { | ||
alias: 'r', | ||
type: 'string', | ||
describe: 'TAP reporter to use, `false` for plain output', | ||
default: 'tap-diff', | ||
}, | ||
}, | ||
@@ -51,12 +51,21 @@ handler: (argv) => __awaiter(this, void 0, void 0, function* () { | ||
const baselines = allBaselines.filter(filterNodeModules); | ||
let reporterIsSkipped; | ||
try { | ||
const results = yield Promise.all(tester.test(specs, baselines)); | ||
isSucceeded = results.every(result => result.isPassed); | ||
results.forEach(result => (result.isPassed) | ||
? console.log(successMessage(result)) | ||
: console.log(errMessage(result))); | ||
reporterIsSkipped = JSON.parse(argv.reporter) === false; | ||
} | ||
catch (err) { | ||
reporterIsSkipped = !argv.reporter; | ||
} | ||
try { | ||
const { tapStream, finish } = TAP_1.getTapStream(tester.test(specs, baselines)); | ||
if (reporterIsSkipped) | ||
tapStream.pipe(process.stdout); | ||
else | ||
tapStream.pipe(require(argv.reporter)()).pipe(process.stdout); | ||
const results = yield finish; | ||
isSucceeded = !(results.failed) && !(results.crashed); | ||
} | ||
catch (err) { | ||
isSucceeded = false; | ||
console.log(err); | ||
console.error(err); | ||
} | ||
@@ -63,0 +72,0 @@ process.exit(isSucceeded ? 0 : 1); |
@@ -43,3 +43,3 @@ "use strict"; | ||
function resolveModule(name) { | ||
return (name && name.startsWith('baset')) | ||
return (name && !name.startsWith('.') && !name.startsWith('/')) | ||
? `./node_modules/${name}` | ||
@@ -46,0 +46,0 @@ : name; |
{ | ||
"name": "baset-cli", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "CLI for BaseT project.", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"@types/yargs": "^10.0.1", | ||
"baset": "^0.12.0", | ||
"baset": "^0.13.0", | ||
"doctoc": "^1.3.0", | ||
@@ -42,8 +42,9 @@ "tslint": "^5.9.1", | ||
"dependencies": { | ||
"baset-core": "^0.12.0", | ||
"baset-core": "^0.13.0", | ||
"find-up": "^2.1.0", | ||
"glob": "^7.1.2", | ||
"glob-promise": "^3.3.0", | ||
"tap-diff": "^0.1.1", | ||
"yargs": "^10.1.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
34269
22
404
6
2
+ Addedtap-diff@^0.1.1
+ Addedansi-styles@2.2.1(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedbaset-core@0.13.7(transitive)
+ Addedbaset-vm@0.13.7(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddiff@2.2.3(transitive)
+ Addedduplexer@0.1.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedevents-to-array@1.1.2(transitive)
+ Addedfigures@1.7.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedis-finite@1.1.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedparse-ms@1.0.1(transitive)
+ Addedplur@1.0.0(transitive)
+ Addedpretty-ms@2.1.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedtap-diff@0.1.1(transitive)
+ Addedtap-parser@1.3.2(transitive)
+ Addedthrough2@2.0.5(transitive)
+ Addedtypescript@3.0.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedxtend@4.0.2(transitive)
- Removedbaset-core@0.12.0(transitive)
- Removedbaset-vm@0.9.0(transitive)
- Removedtypescript@5.8.0-dev.20241108(transitive)
Updatedbaset-core@^0.13.0