Skip to content

feat(schemas): add @mionjs/run-types - #416

Merged
EskiMojo14 merged 5 commits into
open-circle:mainfrom
M-jerez:feat/mionjs-run-types
Nov 11, 2026
Merged

EskiMojo14 merged 5 commits into
open-circle:mainfrom
M-jerez:feat/mionjs-run-types

Conversation

@M-jerez

@M-jerez M-jerez commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Description

Adds @mionjs/run-types
Validators compiled from plain TypeScript types at build time, like typia. The @mionjs/devtools bundler plugin is wired into the same three places as typia's ttsc plugin, filtered to libraries/@mionjs/:

  • schemas/tsdown.config.ts
  • schemas/vite.config.ts
  • bench/src/scripts/download.ts

Benchmarks joined

  • Download
  • Initialization: createValidateFn, createGetValidationErrorsFn
  • Validation
  • Parsing, all errors
  • Standard Schema, all errors
  • All 9 string formats
  • Codec, bigint <-> string, through createPrepareForJsonFn / createRestoreFromJsonFn
  • JSON Schema export: draft-2020-12, input side only
  • TypeScript cost

Not joined

  • Stack trace: run-types never throws on bad data (no assert function).
  • Parsing, abort early: no first-error mode.
  • JSON Schema -> validator, and compliance: no runtime builder from JSON Schema.

Notes

  • Install exceptions. pnpm added minimumReleaseAgeExclude entries for the 0.14.0 packages, which are newer than the release-age window. Same as the pi-schema precedent.
  • Generated folder. schemas/.mion/ is the plugin's generated output, now gitignored.

Checked locally

  • vpr schemas:build
  • schemas tests: 7,446 passed
  • bench, utils and json-schema-tests tests
  • website tests: 100 passed
  • e2e on Desktop Chrome: 59 passed
  • vp check: clean

I regenerated accepted-json-schemas.ts and library-versions.gen.ts with their scripts. No result JSON is committed; the bench workflow writes those.

@netlify

netlify Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for schemabenchmarks ready!

Name Link
🔨 Latest commit f36be04
🔍 Latest deploy log https://app.netlify.com/projects/schemabenchmarks/deploys/6af45856376079d3b44d13d4
😎 Deploy Preview https://deploy-preview-416--schemabenchmarks.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The aliases reuse handwritten types rather than infer from schemas, causing probeTypes to publish and rank misleading inference benchmark results.

1 open issue
1 file not reviewed
  • pnpm-lock.yaml: Generated file
What changed in this PR

Adds @mionjs/run-types to the validation-library benchmark suite, with build-time compilation of validators from TypeScript types.

Changes:

  • Adds the product schema and adapters for validation, parsing, Standard Schema, string formats, codecs, JSON Schema export, and type benchmarks.
  • Integrates the compiler into schema builds, tests, and download measurements.
  • Updates dependencies, generated expectations, and ignore rules.
File Description
website/​e2e/​utils/​library-versions.gen.ts Records the new library version.
schemas/​vite.config.ts Enables compilation during schema tests.
schemas/​tsdown.config.ts Enables compilation during schema builds.
schemas/​test/​accepted-json-schemas.ts Adds the expected JSON Schema export.
schemas/​package.json Adds runtime and compiler dependencies.
schemas/​libraries/​@mionjs/​run-types/​types/​index.ts Defines the type benchmark entry.
schemas/​libraries/​@mionjs/​run-types/​types/​fromType.ts Adds type-to-validator capability reporting.
schemas/​libraries/​@mionjs/​run-types/​tsconfig.json Configures validator generation.
schemas/​libraries/​@mionjs/​run-types/​index.ts Defines the constrained product type.
schemas/​libraries/​@mionjs/​run-types/​download/​index.ts Adds the download-size benchmark entry.
schemas/​libraries/​@mionjs/​run-types/​benchmarks.ts Registers supported benchmark adapters.
schemas/​.gitignore Ignores generated compiler output.
pnpm-workspace.yaml Adds compiler catalog entries and skill configuration; removes the release-age exception.
pnpm-lock.yaml Locks the new dependencies.
bench/​src/​scripts/​download.ts Compiles run-types download entries.
bench/​package.json Adds compiler dependencies for download measurements.
.agents/​skills/​.gitignore Ignores package-managed skill directories.

Review effort: Balanced

@EskiMojo14
EskiMojo14 force-pushed the feat/mionjs-run-types branch from a1b866b to f0f45ef Compare November 10, 2026 17:11
M-jerez and others added 4 commits November 11, 2026 11:28
Covers download, initialization, validation, parsing (all errors), standard
schema, string formats, codec, JSON Schema export (draft-2020-12 input) and
TypeScript cost. Built with the @mionjs/devtools plugin in functions mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019XsAKq6LG6Cy4uXBrHMyvh
Own tsconfig with a `mion` plugin entry (typia's ttsc rejects it in the shared
one): functions emit, inlined nested checks, typeof number checks like typia.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_019XsAKq6LG6Cy4uXBrHMyvh
@EskiMojo14
EskiMojo14 force-pushed the feat/mionjs-run-types branch 2 times, most recently from 1f9d4a8 to 61b1265 Compare November 11, 2026 11:29
@EskiMojo14
EskiMojo14 merged commit fff4294 into open-circle:main Nov 11, 2026
3 of 4 checks passed
@EskiMojo14

Copy link
Copy Markdown
Member

thanks! sorry for the delay :)

@M-jerez

M-jerez commented Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

thanks! sorry for the delay :)

Np, Thanks to you for the amendments and get this merged. and congrats for the website!
The ecosystem really needed something like this! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants