Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

baset-cli

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baset-cli - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

dist/TAP.d.ts

12

CHANGELOG.md

@@ -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)

35

dist/commands/test.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc