New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

airtight

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtight - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

2

out/main/decoder.d.ts

@@ -8,3 +8,3 @@ import { Exception } from 'typesafe-exception';

status: number;
constructor(errors: DecodeError[]);
constructor(schema: Schema<unknown>, errors: DecodeError[]);
}

@@ -11,0 +11,0 @@ export interface DecodeError {

@@ -8,4 +8,5 @@ "use strict";

class ValidationError extends typesafe_exception_1.Exception {
constructor(errors) {
super('Validation failed', { errors });
constructor(schema, errors) {
var _a;
super(`Validation failed (${(_a = schema.id) !== null && _a !== void 0 ? _a : schema.type}}`, { errors });
this.status = 400;

@@ -12,0 +13,0 @@ }

@@ -18,3 +18,3 @@ "use strict";

if (this.options.throw && this.errors.length > 0) {
throw new decoder_1.ValidationError(this.errors);
throw new decoder_1.ValidationError(this.decoder.schema, this.errors);
}

@@ -21,0 +21,0 @@ return res;

@@ -14,2 +14,3 @@ export declare type Schema<T> = unknown extends T ? UnknownSchema : ((StrictTypeSchema<T> | AnySchema | RefSchema) & (undefined extends T ? {

nullable?: true;
id?: string;
};

@@ -16,0 +17,0 @@ export declare type BaseSchema<T> = {

{
"name": "airtight",
"version": "0.7.3",
"version": "0.7.4",
"description": "Tight subset of JSON schema",

@@ -5,0 +5,0 @@ "main": "out/main/index.js",

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