chore(deps): update all non-major dependencies (v3) (#2754)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
renovate[bot]
2024-12-02 11:03:49 +01:00
committed by GitHub
parent f04c2082ad
commit d65c7376d9
10 changed files with 495 additions and 311 deletions

View File

@@ -1,4 +1,4 @@
import type { v1 } from '@standard-schema/spec'
import type { StandardSchemaV1 } from '@standard-schema/spec'
import type { ZodSchema } from 'zod'
import type { ValidationError as JoiError, Schema as JoiSchema } from 'joi'
import type { ObjectSchema as YupObjectSchema, ValidationError as YupError } from 'yup'
@@ -39,13 +39,13 @@ export function isValibotSchema(schema: any): schema is ValibotSchema | ValibotS
return '_run' in schema || (typeof schema === 'function' && 'schema' in schema)
}
export function isStandardSchema(schema: any): schema is v1.StandardSchema {
export function isStandardSchema(schema: any): schema is StandardSchemaV1 {
return '~standard' in schema
}
export async function validateStandarSchema(
state: any,
schema: v1.StandardSchema
schema: StandardSchemaV1
): Promise<ValidateReturnSchema<typeof state>> {
const result = await schema['~standard'].validate({
value: state