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/arktype

v0.1.0-beta.8

Published

Native ArkType fixture builders with typed factories and input/output semantics.

Readme

Mimlet's ArkType adapter

Introduced in the coordinated toolkit 0.1.0-alpha.1 train.

Native builders for ArkType 2. The peer range accepts ArkType >=2.2.5 <3; each release from 2.2.5 through 2.2.7 is tested against the packed adapter (alpha.3 and earlier pin 2.2.5). mimlet doctor reports a newer, untested ArkType 2 release as PEER_VERSION_UNTESTED. fromArkType(schema, options) generates encoded input through ArkType's Standard JSON Schema projection and validates through the original Type. Input/output inference, morphs, brands, defaults, scoped recursion and native error paths are retained.

See the executable Zod and ArkType guide for tested recipes and the compatibility matrix for version bounds.

Install

Releases, including betas, are published on npm's latest tag. Pin exact versions when you need to reproduce fixtures; see Getting started.

npm install --save-dev @mimlet/arktype [email protected]

Builders and factories

.build() creates input; .buildValidated() returns native transformed output. Use complete .replace() values to switch object-union variants. The ordinary Mimlet configuration, clone policy, list budgets and fluent operations apply.

fromArkTypeFactory(schema, factory, options) bypasses JSON conversion and retains the factory's argument tuple. Known async factories expose async build methods. Native Date/bigint values and opaque predicates can therefore use explicit factories while keeping ArkType validation. This does not add asynchronous morph semantics or a reverse encoder to ArkType.

arkTypeFields(schema) lists an object type's top-level input props from the native schema.in.props, so a morph lists the keys of the input it receives. Pass it to fluent() from @mimlet/core for a withX() setter per field: fluent(fromArkType(Form), arkTypeFields(Form)). In a generic helper, type the parameter as S extends Type<object>. Unions and non-object types throw a TypeError; symbol keys get no setter. See named setters.

Native operations and generation

arkTypeAdapter(schema, options) exposes the original source and standard handle. checkInput(value) delegates to native allows() without applying morphs or output predicates. decode(input) delegates to assert(). Validated builder failures retain native issues inside BuilderValidationError; thrown callback errors propagate without retries. Native undeclared-key and cloning policies stay under the schema's control.

generation() prepares and caches the input JSON Schema generator on demand, and create(session?) generates input. Profiles, offline references, budgets and versioned custom providers use the shared JSON Schema contract. Automatic builders prepare generation immediately. Unsupported conversion or exhausted sampling raises an error; a factory supplies data for constraints that cannot be synthesized.

Use generation().session(seed) for generator-owned replay identity and keep application schema/morph versions in the identity when output depends on opaque functions. A session-less fromArkType() build starts from that seed-1 session, so two builders over Types with the same input JSON Schema return the same values. Give them a name, as in fromArkType(Lead, { name: 'Lead' }), or pass one createTestSession() from @mimlet/core to every build in a test. Patch factories and transforms always receive a session, and fromArkTypeFactory takes a typed defaultSession option. The core remains free of vendor dependencies. Native declarations need DOM and Node types; the schema-free core does not inherit those requirements.