Socket
Socket
Sign inDemoInstall

@cfworker/json-schema

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfworker/json-schema - npm Package Compare versions

Comparing version 1.12.8 to 2.0.0

4

dist/types.d.ts

@@ -1,2 +0,2 @@

export declare type SchemaDraft = '4' | '7' | '2019-09' | '2020-12';
export type SchemaDraft = '4' | '7' | '2019-09' | '2020-12';
export declare const enum OutputFormat {

@@ -7,3 +7,3 @@ Flag = 1,

}
export declare type InstanceType = 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
export type InstanceType = 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
export interface Schema {

@@ -10,0 +10,0 @@ $id?: string;

import { Schema, SchemaDraft, ValidationResult } from './types.js';
export declare type Evaluated = Record<string | number, boolean>;
export type Evaluated = Record<string | number, boolean>;
export declare function validate(instance: any, schema: Schema | boolean, draft?: SchemaDraft, lookup?: Record<string, boolean | Schema>, shortCircuit?: boolean, recursiveAnchor?: Schema | null, instanceLocation?: string, schemaLocation?: string, evaluated?: Evaluated): ValidationResult;
import { dereference } from './dereference.js';
import { validate } from './validate.js';
export class Validator {
schema;
draft;
shortCircuit;
lookup;
constructor(schema, draft = '2019-09', shortCircuit = true) {

@@ -5,0 +9,0 @@ this.schema = schema;

{
"name": "@cfworker/json-schema",
"type": "module",
"version": "1.12.8",
"version": "2.0.0",
"description": "A JSON schema validator that will run on Cloudflare workers. Supports drafts 4, 7, 2019-09, and 2020-12.",

@@ -37,14 +37,15 @@ "keywords": [

"clean": "tsc --build --clean",
"pretest": "node --experimental-import-meta-resolve suite-gen.js",
"test": "cfworker test test/**/*.spec.ts --nocheck"
"pretest": "node --experimental-import-meta-resolve suite-gen.js && esbuild test/test.ts --target=esnext --bundle --format=esm --conditions=worker,browser --outdir=dist-test --ignore-annotations",
"test": "node ../../test.mjs"
},
"devDependencies": {
"@cfworker/dev": "^1.14.2",
"@types/chai": "^4.3.3",
"@types/mocha": "^10.0.0",
"chai": "^4.3.6",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.7",
"chai": "^5.1.1",
"json-schema-test-suite": "git+https://github.com/json-schema-org/JSON-Schema-Test-Suite#76b529f",
"mocha": "^10.0.0",
"typescript": "^4.8.4"
"esbuild": "^0.23.1",
"mocha": "^10.7.3",
"typescript": "^5.5.4",
"wrangler": "^3.72.0"
}
}
{
"extends": "../../tsconfig-base",
"compilerOptions": {
"target": "ES2021",
"target": "ESNext",
"lib": ["ESNext", "WebWorker", "Webworker.Iterable"],
"types": [
"chai",
"mocha",
"@cfworker/worker-types",
"@cloudflare/workers-types"
],
"outDir": "dist",

@@ -13,0 +7,0 @@ "rootDir": "./src"

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