Socket
Socket
Sign inDemoInstall

better-ajv-errors

Package Overview
Dependencies
23
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-next.0 to 1.0.0

CHANGELOG.md

4

lib/cjs/json/get-decorated-data-path.js

@@ -53,5 +53,3 @@ var __create = Object.create;

}
const type = obj.children.filter((child) => {
child && child.key && child.key.value === "type";
});
const type = obj.children.filter((child) => child && child.key && child.key.value === "type");
if (!type.length) {

@@ -58,0 +56,0 @@ return "";

@@ -27,5 +27,3 @@ import { getPointers } from "./utils";

}
const type = obj.children.filter((child) => {
child && child.key && child.key.value === "type";
});
const type = obj.children.filter((child) => child && child.key && child.key.value === "type");
if (!type.length) {

@@ -32,0 +30,0 @@ return "";

{
"name": "better-ajv-errors",
"version": "1.0.0-next.0",
"version": "1.0.0",
"description": "JSON Schema validation for Human",

@@ -42,4 +42,4 @@ "repository": "atlassian/better-ajv-errors",

"format": "prettier --write './src/**/*.js' './.changeset/*.json'",
"test": "jest",
"test-ci": "jest --coverage --colors",
"test": "jest && tsd",
"test-ci": "jest --coverage --colors && tsd",
"screenshot": "svg-term --command='node screenshot' --out=./media/screenshot.svg --padding=5 --width=80 --height=13 --at=1000 --no-cursor --term iterm2 --profile='deep' --window",

@@ -74,3 +74,4 @@ "prepare": "is-ci || husky install",

"prettier": "^2.4.1",
"svg-term-cli": "^2.1.1"
"svg-term-cli": "^2.1.1",
"tsd": "^0.18.0"
},

@@ -77,0 +78,0 @@ "peerDependencies": {

@@ -1,32 +0,24 @@

import { ErrorObject } from 'ajv';
import type { ErrorObject } from 'ajv';
declare var betterAjvErrors: betterAjvErrors.IBetterAjvErrors;
export interface IOutputError {
start: { line: number; column: number; offset: number };
// Optional for required
end?: { line: number; column: number; offset: number };
error: string;
suggestion?: string;
}
export = betterAjvErrors;
export as namespace betterAjvErrors;
export interface IInputOptions {
format?: 'cli' | 'js';
indent?: number | null;
declare namespace betterAjvErrors {
export interface IInputOptions {
format?: 'cli' | 'js';
indent?: number | null;
/** Raw JSON used when highlighting error location */
json?: string | null;
}
/** Raw JSON used when highlighting error location */
json?: string | null;
}
export interface IOutputError {
start: { line: number; column: number; offset: number };
end?: { line: number; column: number; offset: number };
error: string;
suggestion?: string;
}
export interface IBetterAjvErrors {
(
schema: any,
data: any,
errors?: ErrorObject[] | null,
options?: betterAjvErrors.IInputOptions
): betterAjvErrors.IOutputError[] | void;
}
}
export default function <S, T, Options extends IInputOptions>(
schema: S,
data: T,
errors: Array<ErrorObject>,
options?: Options
): Options extends { format: 'js' } ? Array<IOutputError> : void;

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc