@untool/core
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.5.0](https://github.com/untool/untool/compare/v1.4.1...v1.5.0) (2019-03-26) | ||
### Features | ||
* **core:** add "absolutePath" keyword to ajv config validation ([7dca480](https://github.com/untool/untool/commit/7dca480)) | ||
## [1.4.1](https://github.com/untool/untool/compare/v1.4.0...v1.4.1) (2019-03-22) | ||
@@ -8,0 +19,0 @@ |
@@ -7,3 +7,2 @@ 'use strict'; | ||
const { sync: findUp } = require('find-up'); | ||
const Ajv = require('ajv'); | ||
@@ -14,15 +13,5 @@ const debug = require('debug')('untool:config'); | ||
const { resolveMixins } = require('./resolver'); | ||
const { validate } = require('./validator'); | ||
const { environmentalize, placeholdify, merge } = require('./utils'); | ||
const validate = (config, properties) => { | ||
const ajv = new Ajv({ allErrors: true }); | ||
if (ajv.validate({ properties }, config)) { | ||
return []; | ||
} else { | ||
return ajv.errors.map( | ||
({ dataPath, message }) => `config${dataPath} ${message}` | ||
); | ||
} | ||
}; | ||
exports.getConfig = ({ untoolNamespace = 'untool', ...overrides } = {}) => { | ||
@@ -48,3 +37,3 @@ const pkgFile = findUp('package.json'); | ||
configSchema: { | ||
rootDir: { type: 'string', minLength: 1 }, | ||
rootDir: { type: 'string', minLength: 1, absolutePath: true }, | ||
name: { type: 'string', minLength: 1 }, | ||
@@ -51,0 +40,0 @@ version: { type: 'string', minLength: 1 }, |
{ | ||
"name": "@untool/core", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "untool core", | ||
@@ -36,3 +36,3 @@ "repository": { | ||
}, | ||
"gitHead": "94d805ff9404253b9293dd2f1752fd9a821318b4" | ||
"gitHead": "36f274b1011cb84f4219eb82770f1784a726a4b2" | ||
} |
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
32043
10
312