yaml-validator
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -175,3 +175,3 @@ /** | ||
const json = JSON.stringify(doc, null, ' '); | ||
fs.writeFileSync(filepath.replace(/\.yml$/, '.json'), json, 'utf8'); | ||
fs.writeFileSync(filepath.replace(/\.y(a)?ml$/i, '.json'), json, 'utf8'); | ||
} | ||
@@ -178,0 +178,0 @@ |
{ | ||
"name": "yaml-validator", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Validate Yaml files and enforce a given structure", | ||
"main": "index.js", | ||
"typings": "typings/index.d.ts", | ||
"bin": "bin/yaml-validator.js", | ||
"scripts": { | ||
"test": "nyc --exclude tests tape tests/*_test.js", | ||
"test:typings": "tsc -p tsconfig.json", | ||
"coverage": "nyc --exclude tests report --reporter=text-lcov > coverage.lcov && codecov", | ||
@@ -27,12 +29,14 @@ "lint": "eslint index.js bin" | ||
"check-type": "^0.4.11", | ||
"js-yaml": "^3.10.0", | ||
"js-yaml": "^3.11.0", | ||
"optionator": "^0.8.2" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^9.4.7", | ||
"codecov": "^3.0.0", | ||
"eslint": "^4.15.0", | ||
"eslint": "^4.18.2", | ||
"eslint-config-paazmaya": "^4.3.0", | ||
"nyc": "^11.4.1", | ||
"tape": "^4.8.0" | ||
"nyc": "^11.6.0", | ||
"tape": "^4.9.0", | ||
"typescript": "^2.7.2" | ||
} | ||
} |
@@ -123,2 +123,6 @@ # yaml-validator | ||
## Typescript Support | ||
`YamlValidator` ships with its own typing definition in the library, no need to use `@types`. | ||
## Examples | ||
@@ -204,2 +208,6 @@ | ||
* `v1.3.0` (2018-03-16) | ||
- Contents of the Yaml file were overwritten, in the case when saving to JSON and the Yaml file suffix was not `.yml` #14 | ||
- TypeScript types are available #13 | ||
- Dependencies up to :tophat: | ||
* `v1.2.0` (2018-01-17) | ||
@@ -206,0 +214,0 @@ - Separated parsing method from file reading method, hence one method more available to use |
@@ -284,2 +284,14 @@ /** | ||
tape('checkFile creates JSON when requested', test => { | ||
test.plan(1); | ||
const name = 'tests/fixtures/just-checking-json-file-appears'; | ||
const validatorInstance = new Validator({ | ||
writeJson: true | ||
}); | ||
validatorInstance.checkFile(`${name}.YAML`); | ||
test.ok(fs.existsSync(`${name}.json`)); | ||
}); | ||
/* | ||
@@ -286,0 +298,0 @@ tape('Wrong kind of file contents trigger onWarning callback', {timeout: 1200}, test => { |
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
30910
15
724
238
7
Updatedjs-yaml@^3.11.0