@asyncapi/parser
Advanced tools
Comparing version 1.5.2 to 1.6.0-2021-06-release.1
@@ -11,3 +11,3 @@ const ParserError = require('../errors/parser-error'); | ||
constructor (json) { | ||
if (json === undefined || json === null) throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`); | ||
if (!json) throw new ParserError(`Invalid JSON to instantiate the ${this.constructor.name} object.`); | ||
this._json = json; | ||
@@ -14,0 +14,0 @@ } |
@@ -368,9 +368,2 @@ const { createMapOfType, getMapValueOfType, mix } = require('./utils'); | ||
*/ | ||
isBooleanSchema() { | ||
return typeof this._json === 'boolean'; | ||
} | ||
/** | ||
* @returns {boolean} | ||
*/ | ||
isCircular() { | ||
@@ -377,0 +370,0 @@ return !!this.ext('x-parser-circular'); |
@@ -34,3 +34,3 @@ const path = require('path'); | ||
* | ||
* @param {(String | Object)} asyncapiYAMLorJSON An AsyncAPI document in JSON or YAML format. | ||
* @param {String} asyncapiYAMLorJSON An AsyncAPI document in JSON or YAML format. | ||
* @param {Object} [options] Configuration options. | ||
@@ -37,0 +37,0 @@ * @param {String} [options.path] Path to the AsyncAPI document. It will be used to resolve relative references. Defaults to current working dir. |
{ | ||
"name": "@asyncapi/parser", | ||
"version": "1.5.2", | ||
"version": "1.6.0-2021-06-release.1", | ||
"description": "JavaScript AsyncAPI parser.", | ||
@@ -52,3 +52,3 @@ "main": "lib/index.js", | ||
"conventional-changelog-conventionalcommits": "^4.2.3", | ||
"eslint": "^7.27.0", | ||
"eslint": "^7.0.0", | ||
"eslint-plugin-mocha": "^7.0.1", | ||
@@ -72,3 +72,3 @@ "eslint-plugin-security": "^1.4.0", | ||
"@apidevtools/json-schema-ref-parser": "^9.0.6", | ||
"@asyncapi/specs": "^2.7.8", | ||
"@asyncapi/specs": "2.8.0-2021-06-release.3", | ||
"@fmvilas/pseudo-yaml-ast": "^0.3.1", | ||
@@ -75,0 +75,0 @@ "ajv": "^6.10.1", |
@@ -248,3 +248,2 @@ <h5 align="center"> | ||
<td align="center"><a href="https://github.com/JQrdan"><img src="https://avatars.githubusercontent.com/u/25624685?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jordan Tucker</b></sub></a><br /><a href="https://github.com/asyncapi/parser-js/commits?author=JQrdan" title="Tests">⚠️</a> <a href="https://github.com/asyncapi/parser-js/commits?author=JQrdan" title="Code">💻</a></td> | ||
<td align="center"><a href="https://github.com/vishesh13byte"><img src="https://avatars.githubusercontent.com/u/66796715?v=4?s=100" width="100px;" alt=""/><br /><sub><b>vishesh13byte</b></sub></a><br /><a href="https://github.com/asyncapi/parser-js/commits?author=vishesh13byte" title="Tests">⚠️</a></td> | ||
</tr> | ||
@@ -251,0 +250,0 @@ </table> |
@@ -855,3 +855,2 @@ /** | ||
examples(): any[]; | ||
isBooleanSchema(): boolean; | ||
isCircular(): boolean; | ||
@@ -1078,3 +1077,3 @@ hasCircularProps(): boolean; | ||
*/ | ||
function parse(asyncapiYAMLorJSON: string | any, options?: { | ||
function parse(asyncapiYAMLorJSON: string, options?: { | ||
path?: string; | ||
@@ -1081,0 +1080,0 @@ parse?: any; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
1151335
7116
2
257
+ Added@asyncapi/specs@2.8.0-2021-06-release.3(transitive)
- Removed@asyncapi/specs@2.14.0(transitive)