Skip to content

Commit 905f8ba

Browse files
committed
2 parents 57eb107 + dc58152 commit 905f8ba

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

annotations/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export type Annotator = (value: Json, options?: OutputFormat | ValidationOptions
1515
export const interpret: (compiledSchema: CompiledSchema, value: JsonNode, options?: OutputFormat | ValidationOptions) => JsonNode;
1616

1717
export class ValidationError extends Error {
18-
public output: Output;
18+
public output: Output & { valid: false };
1919

2020
public constructor(output: Output);
2121
}

lib/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const setShouldValidateSchema: (isEnabled: boolean) => void;
5656
export const getShouldValidateSchema: () => boolean;
5757

5858
export class InvalidSchemaError extends Error {
59-
public output: Output;
59+
public output: Output & { valid: false };
6060

6161
public constructor(output: Output);
6262
}

lib/schema.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { describe, it, expect, afterEach } from "vitest";
2+
import { Agent, setGlobalDispatcher } from "undici";
23
import { RetrievalError } from "@hyperjump/browser";
34
import { registerSchema, unregisterSchema } from "./index.js";
45
import { getSchema, hasDialect } from "./experimental.js";
@@ -9,6 +10,8 @@ import "../draft-07/index.js";
910
import "../draft-04/index.js";
1011

1112

13+
setGlobalDispatcher(new Agent({ connect: { timeout: 100 } }));
14+
1215
describe("Schema Parsing", () => {
1316
const testDomain = "https://test.hyperjump.io";
1417

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hyperjump/json-schema",
3-
"version": "1.16.3",
3+
"version": "1.16.4",
44
"description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects",
55
"type": "module",
66
"main": "./stable/index.js",

0 commit comments

Comments
 (0)