Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion annotations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type Annotator = (value: Json, options?: OutputFormat | ValidationOptions
export const interpret: (compiledSchema: CompiledSchema, value: JsonNode, options?: OutputFormat | ValidationOptions) => JsonNode;

export class ValidationError extends Error {
public output: Output;
public output: Output & { valid: false };

public constructor(output: Output);
}
2 changes: 1 addition & 1 deletion lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const setShouldValidateSchema: (isEnabled: boolean) => void;
export const getShouldValidateSchema: () => boolean;

export class InvalidSchemaError extends Error {
public output: Output;
public output: Output & { valid: false };

public constructor(output: Output);
}
3 changes: 3 additions & 0 deletions lib/schema.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, it, expect, afterEach } from "vitest";
import { Agent, setGlobalDispatcher } from "undici";
import { RetrievalError } from "@hyperjump/browser";
import { registerSchema, unregisterSchema } from "./index.js";
import { getSchema, hasDialect } from "./experimental.js";
Expand All @@ -9,6 +10,8 @@ import "../draft-07/index.js";
import "../draft-04/index.js";


setGlobalDispatcher(new Agent({ connect: { timeout: 100 } }));

describe("Schema Parsing", () => {
const testDomain = "https://test.hyperjump.io";

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperjump/json-schema",
"version": "1.16.3",
"version": "1.16.4",
"description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects",
"type": "module",
"main": "./stable/index.js",
Expand Down
Loading