fabian-hiller / valibot

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

fix(to-json-schema): Error in JSR #854

Closed nakasyou closed 1 month ago

nakasyou commented 1 month ago

When I imported from @valibot/to-json-schema using JSR and Deno, I received an error.

スクリーンショット 2024-09-28 185110 Code:

import { toJsonSchema } from '@valibot/to-json-schema'
import { schema } from '../schema/schema.ts'

export const makeSchema = async () => {
  const jsonSchema = toJsonSchema(schema)

  await Deno.writeTextFile('schema.json', JSON.stringify(jsonSchema, null, 2))
}

if (import.meta.main) {
  await makeSchema()
}

The PR will fixes it.

fabian-hiller commented 1 month ago

Thank you!