fabian-hiller / valibot

The modular and type safe schema library for validating structural data 🤖
https://valibot.dev
MIT License
6.32k stars 204 forks source link

@valibot & @valibot/to-json-schema version mismatch on NPM #928

Closed hongkongkiwi closed 6 days ago

hongkongkiwi commented 6 days ago

I can't seem to install @valibot/to-json-schema , it seems like there's a version mismatch between valibot and @valibot/to-json-schema on NPM.

After installing valibot I get version 1.0.0-beta.3 which looks fine.

Then when installing to-json-schema (using Deno), I get this error:

deno add npm:@valibot/to-json-schema
Add npm:@valibot/to-json-schema@1.0.0-beta.2
error: Could not find npm package 'valibot' matching '^1.0.0'.
hongkongkiwi commented 6 days ago

For others using Deno, here's a workaround in your deno.json:

"imports": {
  "valibot": "npm:valibot@^1.0.0-beta.3",
  "@valibot/to-json-schema": "https://raw.githubusercontent.com/fabian-hiller/valibot/refs/heads/main/packages/to-json-schema/src/index.ts"
}
fabian-hiller commented 6 days ago

Does it work when installing the @beta version of Valibot?

fabian-hiller commented 6 days ago

This is fixed in v1.0.0-beta.3 of @valibot/to-json-schema