z-schema 6.0.0 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "z-schema",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "engines": {
5
- "node": ">=8.0.0"
5
+ "node": ">=16.0.0"
6
6
  },
7
7
  "description": "JSON schema validator",
8
8
  "homepage": "https://github.com/zaggino/z-schema",
@@ -71,7 +71,7 @@
71
71
  "validator": "^13.7.0"
72
72
  },
73
73
  "optionalDependencies": {
74
- "commander": "^10.0.0"
74
+ "commander": "^11.0.0"
75
75
  },
76
76
  "devDependencies": {
77
77
  "browserify": "^17.0.0",
@@ -403,6 +403,9 @@ var JsonValidators = {
403
403
  if (shouldSkipValidate(this.validateOptions, ["INVALID_FORMAT"])) {
404
404
  return;
405
405
  }
406
+ if (report.hasError("INVALID_TYPE", [schema.type, Utils.whatIs(json)])) {
407
+ return;
408
+ }
406
409
  if (formatValidatorFn.length === 2) {
407
410
  // async - need to clone the path here, because it will change by the time async function reports back
408
411
  var pathBeforeAsync = Utils.clone(report.path);