
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@warpkit/validation
Advanced tools
Schema-agnostic validation layer with Standard Schema support for WarpKit
StandardSchema validation utilities for WarpKit.
bun add @warpkit/validation
import { validate, validateAsync } from '@warpkit/validation';
import { Type } from '@sinclair/typebox';
const UserSchema = Type.Object({
name: Type.String({ minLength: 1 }),
email: Type.String({ format: 'email' })
});
// Synchronous validation
try {
const user = validate(UserSchema, data);
// user is typed as { name: string; email: string }
} catch (e) {
if (e instanceof ValidationError) {
console.error(e.issues);
}
}
// Asynchronous validation (for async schemas)
const user = await validateAsync(UserSchema, data);
Create named type definitions for registry patterns:
import { TypeDefinition, ValidatedType } from '@warpkit/validation';
// Simple type marker (no validation)
const UserType = TypeDefinition.create<User>('user');
// With schema validation
const UserType = ValidatedType.wrap('user', UserSchema);
Synchronously validate data against a StandardSchema. Throws ValidationError on failure.
Asynchronously validate data. Supports both sync and async schemas.
Error class containing validation issues:
class ValidationError extends Error {
issues: StandardIssue[];
}
Any schema implementing this interface works with WarpKit:
interface StandardSchema<T> {
'~standard': {
validate(data: unknown): StandardResult<T> | Promise<StandardResult<T>>;
};
}
TypeBox requires additional setup for certain validation features:
email, uri) requires registering format validators via TypeCompiler or ajvFor full format validation support, consider using Zod or Valibot which include built-in format validators.
FAQs
Schema-agnostic validation layer with Standard Schema support for WarpKit
We found that @warpkit/validation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.