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

yaml-validator

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-validator - npm Package Compare versions

Comparing version 2.2.0 to 3.0.0

2

bin/yaml-validator.js

@@ -11,4 +11,2 @@ #!/usr/bin/env node

'use strict';
const fs = require('fs'),

@@ -15,0 +13,0 @@ path = require('path');

10

index.js

@@ -9,4 +9,2 @@ /**

'use strict';
const fs = require('fs');

@@ -17,2 +15,4 @@

const FIND_LINENUMBER = /line (\d+)/u;
class YamlValidatore {

@@ -117,3 +117,2 @@ constructor (options) {

loadData(filepath, data) {
const onWarning = (error) => {

@@ -133,3 +132,6 @@ this.errored(filepath + ' > ' + error);

catch (error) {
const lineNumber = error.message.match(/line (\d+)/u)[1];
const findNumber = error.message.match(FIND_LINENUMBER);
const lineNumber = findNumber.length > 0 ?
findNumber[1] :
'unknown';
this.errored(`Failed to load the Yaml file "${filepath}:${lineNumber}"\n${error.message}`);

@@ -136,0 +138,0 @@ console.error(`${filepath}:${lineNumber}\n${error.message}`);

{
"name": "yaml-validator",
"version": "2.2.0",
"version": "3.0.0",
"description": "Validate Yaml files and enforce a given structure",

@@ -9,5 +9,5 @@ "main": "index.js",

"scripts": {
"test": "nyc --all --exclude tests tape tests/*_test.js",
"test": "nyc --all --exclude tests --exclude typings tape tests/*_test.js",
"test:typings": "tsc -p tsconfig.json",
"coverage": "nyc --all --exclude tests report --reporter=text-lcov > coverage.lcov && codecov",
"coverage": "nyc --all --exclude tests --exclude typings report --reporter=text-lcov > coverage.lcov && codecov",
"lint": "eslint index.js bin"

@@ -26,3 +26,3 @@ },

"engines": {
"node": ">=8.11.1"
"node": ">=10.13.0"
},

@@ -39,14 +39,14 @@ "files": [

"check-type": "^0.4.11",
"js-yaml": "^3.13.1",
"optionator": "^0.8.2"
"js-yaml": "^3.14.0",
"optionator": "^0.9.1"
},
"devDependencies": {
"@types/node": "12.0.3",
"codecov": "3.5.0",
"eslint": "5.16.0",
"eslint-config-paazmaya": "5.3.0",
"nyc": "14.1.1",
"tape": "4.10.2",
"typescript": "3.5.1"
"@types/node": "14.0.6",
"codecov": "3.7.0",
"eslint": "7.1.0",
"eslint-config-paazmaya": "7.0.0",
"nyc": "15.0.1",
"tape": "5.0.1",
"typescript": "3.9.3"
}
}

@@ -9,2 +9,3 @@ # yaml-validator

[![dependencies Status](https://david-dm.org/paazmaya/yaml-validator/status.svg)](https://david-dm.org/paazmaya/yaml-validator)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=paazmaya_yaml-validator&metric=code_smells)](https://sonarcloud.io/dashboard?id=paazmaya_yaml-validator)

@@ -17,3 +18,3 @@ [Yaml](http://yaml.org/) files are parsed via [`js-yaml`](https://github.com/nodeca/js-yaml)

Please note that the minimum supported version of [Node.js](https://nodejs.org/en/) is `8.11.1`, which is [the active Long Term Support (LTS) version](https://github.com/nodejs/Release#release-schedule).
Please note that the minimum supported version of [Node.js](https://nodejs.org/en/) is `10.13.0`, which is [the active Long Term Support (LTS) version](https://github.com/nodejs/Release#release-schedule).

@@ -212,2 +213,5 @@ This tool can be used in two ways, either via Node.js script, or as a command line tool.

* `v3.0.0` (2020-05-30)
- Minimum Node.js version lifted from `8.11.1` to `10.13.0`
- Test code smells at Sonarcloud.io
* `v2.2.0` (2019-05-29)

@@ -214,0 +218,0 @@ - Internally written as ES2015 Class, instead of ES5 way which polluted `prototype`

Sorry, the diff of this file is too big to display

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