npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mimlet/valibot

v0.1.0-beta.8

Published

Native schema fixtures preserving input/output semantics and builder capabilities.

Downloads

2,174

Readme

Native Valibot generation

fromValibot(schema, options) adds automatic input generation to Valibot through the pinned @valibot/[email protected] converter. The original native parser retains its output transformations and is invoked once per validated build. Conversion failures are not suppressed or downgraded to warnings.

The peer range accepts Valibot >=1.5.0 <2, the same range the converter accepts; [email protected] is the tested version. A newer Valibot 1 release installs, and mimlet doctor reports it as PEER_VERSION_UNTESTED. Newer versions usually work; a schema action the pinned converter does not know throws its "cannot be converted" error instead of being dropped.

Install from npm's latest tag, which includes betas. Pin exact versions when you need to reproduce fixtures; see Getting started.

npm install --save-dev @mimlet/valibot [email protected]
import * as v from 'valibot';
import { fromValibot } from '@mimlet/valibot';
const age = v.pipe(v.string(), v.digits(), v.transform(Number));
const people = fromValibot(v.object({ age }));
const input = people.with({ age: '42' }).build();
const output = people.with({ age: '42' }).buildValidated();

valibotAdapter(schema, options) retains the original source and exposes a combined Standard Schema/Standard JSON Schema handle. Its generation() is the JSON Schema generator that session-less fromValibot builds use, with session() and identity for replay, so buildList(n) equals buildList(n, valibotAdapter(schema).generation().session()). Two builders over schemas with the same input JSON Schema return the same session-less values; pass a name option, as in fromValibot(schema, { name: 'lead' }), or one createTestSession() from @mimlet/core to every build in a test. Generation profiles, explicit references, budgets, and seeded sessions use the JSON Schema package contract. Native parsing may strip properties or normalize data as specified by the supplied schema; this adapter does not add repair behavior of its own.

Automatic conversion currently accepts synchronous Valibot schema definitions. Asynchronous schemas, Date/Map/Set, opaque refinements such as v.check(), and actions with no JSON Schema equivalent such as v.trim(), v.toLowerCase(), v.brand() and v.readonly() are fully usable with createSchemaBuilder(schema, factory) in the core, including async factories and validation, but do not acquire a JSON-generation capability merely by being valid Standard Schema implementations. For Date/Map/Set, refinements and those actions, fromValibot throws the converter's "cannot be converted" error instead of dropping the rule. No inverse transform or shrinker is invented.

valibotFields(schema) lists an object schema's top-level entries. Pass it to fluent() from @mimlet/core for a withX() setter per field, typed with the schema's input. It reads only schema.entries (a v.pipe() that starts with an object keeps them) and does not convert the schema, so it also works with createSchemaBuilder(valibotAdapter(schema).standard, factory) and in a generic helper such as <S extends v.ObjectSchema<v.ObjectEntries, undefined>>(schema: S) => fluent(fromValibot(schema), valibotFields(schema)). Non-object schemas throw a TypeError; looseObject() and objectWithRest() inputs get no typed setters. See named setters.

v.isoDateTime(), v.isoDateTimeSecond(), v.isoTime() and v.base64() convert to Valibot's own regular expression as a JSON Schema pattern, the way the converter already handles v.isoTimeSecond() and v.isoWeek(). On its own, the pinned converter maps v.isoDateTime() and v.isoTime() to the broader date-time and time formats, which require seconds and a time zone (2026-01-02T03:04 and 03:04 have neither), cannot convert v.isoDateTimeSecond(), and records v.base64() only as contentEncoding. Generated values follow the regular expression, so they pass buildValidated(); like Valibot's check, it allows any four-digit year and does not compare the day with the month. v.isoDate() and v.isoTimestamp() keep the date and date-time formats, whose generated values Valibot accepts.

As with the converter's other regex actions, one of these actions cannot share a pipe with another regex action such as v.regex() or v.startsWith(): that conversion throws. The handle's jsonSchema converters still honor the converter's errorMode and overrideAction when you pass them in libraryOptions. Builders for schemas that use these actions have a new generation fingerprint, so a session replay saved with an earlier version fails with INVALID_SESSION_REPLAY instead of producing different values.

Zod 4.4.3 and ArkType 2.2.5 also support fromStandardJsonSchema. Dedicated Zod and ArkType builders add native operation handles, typed factory helpers and an explicit Zod async validation path. The compatibility suite executes all three real libraries with built package artifacts rather than relying only on structural mock schemas.

Native peer declarations use Web platform types. Their compatibility consumers include DOM types (and Node types for ArkType); this does not add DOM dependencies to the schema-free core. The pinned Zod Standard Schema implementation probes async refinements synchronously before retrying them asynchronously. The generic standards path calls its validator entry once but does not override that native behavior. Use an explicit safeParseAsync validation wrapper for effectful Zod refinements that must not be probed twice.