Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hyperjump/json-schema

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperjump/json-schema - npm Package Compare versions

Comparing version 1.7.3 to 1.8.0

1

lib/experimental.d.ts

@@ -66,2 +66,3 @@ import type { Browser, Document } from "@hyperjump/browser";

export const loadDialect: (dialectId: string, dialect: { [vocabularyId: string]: boolean }, allowUnknownKeywords?: boolean) => void;
export const unloadDialect: (dialectId: string) => void;
export const hasDialect: (dialectId: string) => boolean;

@@ -68,0 +69,0 @@

export { compile, interpret, BASIC, DETAILED, VERBOSE } from "./core.js";
export { getKeyword, getKeywordByName, addKeyword, defineVocabulary, getKeywordName, getKeywordId, loadDialect, hasDialect } from "./keywords.js";
export {
addKeyword, getKeyword, getKeywordByName, getKeywordName, getKeywordId,
defineVocabulary,
loadDialect, unloadDialect, hasDialect
} from "./keywords.js";
export { getSchema, toSchema, canonicalUri, buildSchemaDocument } from "./schema.js";
export { default as Validation } from "./keywords/validation.js";

@@ -84,1 +84,6 @@ import { toAbsoluteUri } from "./common.js";

};
export const unloadDialect = (dialectId) => {
delete _allowUnknownKeywords[dialectId];
delete _dialects[dialectId];
};

6

lib/schema.js

@@ -6,3 +6,3 @@ import contentTypeParser from "content-type";

import { resolveIri, toAbsoluteIri, normalizeIri } from "@hyperjump/uri";
import { getKeywordName, loadDialect } from "./keywords.js";
import { getKeywordName, loadDialect, unloadDialect } from "./keywords.js";
import { uriFragment, jsonStringify, jsonTypeOf, toRelativeIri } from "./common.js";

@@ -56,3 +56,5 @@

export const unregisterSchema = (uri) => {
delete schemaRegistry[toAbsoluteIri(uri)];
const normalizedUri = toAbsoluteIri(uri);
unloadDialect(normalizedUri);
delete schemaRegistry[normalizedUri];
};

@@ -59,0 +61,0 @@

{
"name": "@hyperjump/json-schema",
"version": "1.7.3",
"version": "1.8.0",
"description": "A JSON Schema validator with support for custom keywords, vocabularies, and dialects",

@@ -5,0 +5,0 @@ "type": "module",

@@ -569,2 +569,6 @@ # Hyperjump - JSON Schema

Schema rather than creating a dialect of an existing version of JSON Schema.
* **unloadDialect**: (dialectId: string) => void
Remove a dialect. You shouldn't need to use this function. It's called for
you when you call `unregisterSchema`.
* **Validation**: Keyword

@@ -571,0 +575,0 @@

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