Comparing version 0.2.2 to 0.3.0
@@ -6,2 +6,18 @@ # Change Log | ||
<a name="0.3.0"></a> | ||
# [0.3.0](https://github.com/Igmat/baset/compare/v0.2.2...v0.3.0) (2018-01-23) | ||
### Bug Fixes | ||
* **CLI:** Non-zero exit code for fail and more informative message ([1aaff03](https://github.com/Igmat/baset/commit/1aaff03)), closes [#2](https://github.com/Igmat/baset/issues/2) | ||
### Features | ||
* **CLI:** Supporting config files and package.json section ([3eb8017](https://github.com/Igmat/baset/commit/3eb8017)), closes [#4](https://github.com/Igmat/baset/issues/4) | ||
<a name="0.2.2"></a> | ||
@@ -8,0 +24,0 @@ ## [0.2.2](https://github.com/Igmat/baset/compare/v0.2.1...v0.2.2) (2018-01-22) |
@@ -12,2 +12,6 @@ "use strict"; | ||
const glob = require("glob-promise"); | ||
const errMessage = (err) => `Expected for ${err.name}: | ||
${err.expected} | ||
Actual: | ||
${err.actual}`; | ||
const testCommand = { | ||
@@ -32,4 +36,14 @@ command: 'test', | ||
handler: (argv) => __awaiter(this, void 0, void 0, function* () { | ||
let isSucceeded = true; | ||
const [specs, baselines] = yield Promise.all([glob(argv.specs), glob(argv.bases)]); | ||
baset_core_1.test(specs, baselines); | ||
const results = yield Promise.all(baset_core_1.test(specs, baselines) | ||
.map(result => result | ||
.catch(err => { | ||
isSucceeded = false; | ||
return err instanceof Error | ||
? err.message | ||
: errMessage(err); | ||
}))); | ||
results.forEach(message => console.log(message)); | ||
process.exit(isSucceeded ? 0 : 1); | ||
}), | ||
@@ -36,0 +50,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const find_up_1 = require("find-up"); | ||
const fs = require("fs"); | ||
const yargs = require("yargs"); | ||
const configPath = find_up_1.sync(['.basetrc', '.basetrc.json']); | ||
const config = configPath ? JSON.parse(fs.readFileSync(configPath, { encoding: 'utf8' })) : {}; | ||
exports.cli = yargs | ||
.usage('$0 <command>') | ||
.commandDir('./commands') | ||
.pkgConf('baset') | ||
.config(config) | ||
.help('h') | ||
@@ -8,0 +14,0 @@ .alias('help', 'h') |
{ | ||
"name": "baset-cli", | ||
"version": "0.2.2", | ||
"description": "", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "npm run tslint && tsc", | ||
"watch": "npm run tslint && tsc -w", | ||
"tslint": "tslint -c tslint.json -p tsconfig.json", | ||
"test": "baset" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/glob": "^5.0.34", | ||
"@types/node": "^9.3.0", | ||
"@types/yargs": "^10.0.1", | ||
"baset": "^0.2.2", | ||
"tslint": "^5.9.1", | ||
"typescript": "^2.6.2" | ||
}, | ||
"dependencies": { | ||
"baset-core": "^0.2.2", | ||
"glob": "^7.1.2", | ||
"glob-promise": "^3.3.0", | ||
"yargs": "^10.1.1" | ||
} | ||
"name": "baset-cli", | ||
"version": "0.3.0", | ||
"description": "", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "npm run tslint && tsc", | ||
"watch": "npm run tslint && tsc -w", | ||
"tslint": "tslint -c tslint.json -p tsconfig.json", | ||
"test": "baset" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/find-up": "^2.1.1", | ||
"@types/glob": "^5.0.34", | ||
"@types/node": "^9.3.0", | ||
"@types/yargs": "^10.0.1", | ||
"baset": "^0.3.0", | ||
"tslint": "^5.9.1", | ||
"typescript": "^2.6.2" | ||
}, | ||
"dependencies": { | ||
"baset-core": "^0.3.0", | ||
"find-up": "^2.1.0", | ||
"glob": "^7.1.2", | ||
"glob-promise": "^3.3.0", | ||
"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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
9230
5
7
11
104
2
+ Addedfind-up@^2.1.0
+ Addedbaset-core@0.3.0(transitive)
- Removedbaset-core@0.2.2(transitive)
Updatedbaset-core@^0.3.0