yaml-validator
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -132,4 +132,5 @@ /** | ||
catch (error) { | ||
_self.errored(`Failed to load the Yaml file "${filepath}"`); | ||
console.error(error.message); | ||
const lineNumber = error.message.match(/line (\d+)/)[1]; | ||
_self.errored(`Failed to load the Yaml file "${filepath}:${lineNumber}"\n${error.message}`); | ||
console.error(`${filepath}:${lineNumber}\n${error.message}`); | ||
@@ -136,0 +137,0 @@ return null; |
{ | ||
"name": "yaml-validator", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Validate Yaml files and enforce a given structure", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "nyc tape tests/*_test.js", | ||
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov", | ||
"lint": "eslint -c .eslintrc.json index.js" | ||
"test": "nyc --exclude tests tape tests/*_test.js", | ||
"coverage": "nyc --exclude tests report --reporter=text-lcov > coverage.lcov && codecov", | ||
"lint": "eslint index.js" | ||
}, | ||
@@ -22,15 +22,15 @@ "repository": { | ||
"engines": { | ||
"node": ">=4.2.0" | ||
"node": ">=6.9.5" | ||
}, | ||
"dependencies": { | ||
"check-type": "^0.4.11", | ||
"js-yaml": "^3.6.1" | ||
"js-yaml": "^3.8.4" | ||
}, | ||
"devDependencies": { | ||
"codecov": "^1.0.1", | ||
"eslint": "^3.7.1", | ||
"eslint-config-paazmaya": "^3.0.0", | ||
"nyc": "^8.3.1", | ||
"tape": "^4.6.2" | ||
"codecov": "^2.2.0", | ||
"eslint": "^4.1.1", | ||
"eslint-config-paazmaya": "^4.0.0", | ||
"nyc": "^11.0.3", | ||
"tape": "^4.7.0" | ||
} | ||
} |
@@ -16,3 +16,3 @@ # yaml-validator | ||
Please note that this library requires the minimum [Node.js](https://nodejs.org/en/) | ||
version to be `4.2.0`, which is the Long Term Support (LTS) version. | ||
version to be `6.9.5`, which is the Long Term Support (LTS) version. | ||
@@ -167,2 +167,6 @@ Installation: | ||
* `v0.4.0` (2017-06-28) | ||
- Provide file name, error message and line number when failing #7 | ||
- Keep dependencies up to date and test against Node.js major version `8` | ||
- Minimum supported Node.js version lifted from `4.2.0` to `6.9.5` | ||
* `v0.3.0` (2016-10-10) | ||
@@ -169,0 +173,0 @@ - Proper unit tests #6 |
@@ -89,9 +89,10 @@ /** | ||
const testfile = 'README.md'; | ||
// Failed to load the Yaml file "README.md" | ||
const validatorInstance = new Validator({ | ||
onWarning: function (error, filepath) { | ||
test.equal(filepath, 'README.md'); | ||
test.equal(filepath, testfile); | ||
} | ||
}); | ||
validatorInstance.validate(['README.md']); | ||
validatorInstance.validate([testfile]); | ||
@@ -202,2 +203,3 @@ test.equal(validatorInstance.inValidFilesCount, 1); | ||
], | ||
notUsedKey: [], | ||
build: 'string' | ||
@@ -204,0 +206,0 @@ } |
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
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
20085
379
186
Updatedjs-yaml@^3.8.4