New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@contember/schema-utils

Package Overview
Dependencies
Maintainers
5
Versions
267
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contember/schema-utils - npm Package Compare versions

Comparing version 1.1.0-alpha.3 to 1.1.0-alpha.4

15

dist/src/validation/SchemaValidator.js

@@ -6,3 +6,2 @@ "use strict";

const ModelValidator_1 = require("./ModelValidator");
const util_1 = require("util");
const ValidationValidator_1 = require("./ValidationValidator");

@@ -20,10 +19,12 @@ const utils_1 = require("../utils");

const errors = [...aclErrors, ...modelErrors, ...validationErrors];
if (errors.length === 0 && !(0, util_1.isDeepStrictEqual)(validSchema, schema)) {
if (errors.length === 0) {
const errors = (0, utils_1.deepCompare)(validSchema, schema, []);
let message = 'There is something wrong with a schema validator:';
for (const err of errors) {
message += '\n\t' + err.path.join('.') + ': ' + err.message;
if (errors.length) {
let message = 'There is something wrong with a schema validator:';
for (const err of errors) {
message += '\n\t' + err.path.join('.') + ': ' + err.message;
}
message += '\n\nPlease fill a bug report';
throw new Error(message);
}
message += '\n\nPlease fill a bug report';
throw new Error(message);
}

@@ -30,0 +31,0 @@ return errors;

{
"name": "@contember/schema-utils",
"version": "1.1.0-alpha.3",
"version": "1.1.0-alpha.4",
"license": "Apache-2.0",

@@ -11,3 +11,3 @@ "main": "dist/src/index.js",

"dependencies": {
"@contember/schema": "^1.1.0-alpha.3"
"@contember/schema": "^1.1.0-alpha.4"
},

@@ -14,0 +14,0 @@ "devDependencies": {

@@ -23,10 +23,12 @@ import { Schema } from '@contember/schema'

const errors = [...aclErrors, ...modelErrors, ...validationErrors]
if (errors.length === 0 && !isDeepStrictEqual(validSchema, schema)) {
if (errors.length === 0) {
const errors = deepCompare(validSchema, schema, [])
let message = 'There is something wrong with a schema validator:'
for (const err of errors) {
message += '\n\t' + err.path.join('.') + ': ' + err.message
if (errors.length) {
let message = 'There is something wrong with a schema validator:'
for (const err of errors) {
message += '\n\t' + err.path.join('.') + ': ' + err.message
}
message += '\n\nPlease fill a bug report'
throw new Error(message)
}
message += '\n\nPlease fill a bug report'
throw new Error(message)
}

@@ -33,0 +35,0 @@ return errors

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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