Upgrading valibot 0.17 to 0.18
Unknown0.17.1 → 0.18.0
Fetching 1 release from GitHub…0 / 1
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
- This page updates as the notes come in.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- changed:
function flatten(error: ValiError): FlatErrors → function flatten<TSchema extends BaseSchema | BaseSchemaAsync = any>(error: ValiError): FlatErrors<TSchema> - changed:
function flatten(issues: Issues): FlatErrors → function flatten<TSchema extends BaseSchema | BaseSchemaAsync = any>(issues: Issues): FlatErrors<TSchema> - changed:
function record<TRecordKey extends RecordKey, TRecordValue extends BaseSchema>(key: TRecordKey, value: TRecordValue, error?: ErrorMessage, pipe?: Pipe<RecordOutput<TRecordKey, TRecordValue>>): RecordSchema<TRecordValue, TRecordKey> → function record<TRecordKey extends RecordKey, TRecordValue extends BaseSchema>(key: TRecordKey, value: TRecordValue, error?: ErrorMessage, pipe?: Pipe<RecordOutput<TRecordKey, TRecordValue>>): RecordSchema<TRecordKey, TRecordValue> - changed:
function record<TRecordKey extends RecordKey, TRecordValue extends BaseSchema>(key: TRecordKey, value: TRecordValue, pipe?: Pipe<RecordOutput<TRecordKey, TRecordValue>>): RecordSchema<TRecordValue, TRecordKey> → function record<TRecordKey extends RecordKey, TRecordValue extends BaseSchema>(key: TRecordKey, value: TRecordValue, pipe?: Pipe<RecordOutput<TRecordKey, TRecordValue>>): RecordSchema<TRecordKey, TRecordValue> - changed:
function record<TRecordValue extends BaseSchema>(value: TRecordValue, error?: ErrorMessage, pipe?: Pipe<RecordOutput<StringSchema, TRecordValue>>): RecordSchema<TRecordValue> → function record<TRecordValue extends BaseSchema>(value: TRecordValue, error?: ErrorMessage, pipe?: Pipe<RecordOutput<StringSchema, TRecordValue>>): RecordSchema<StringSchema, TRecordValue> - changed:
function record<TRecordValue extends BaseSchema>(value: TRecordValue, pipe?: Pipe<RecordOutput<StringSchema, TRecordValue>>): RecordSchema<TRecordValue> → function record<TRecordValue extends BaseSchema>(value: TRecordValue, pipe?: Pipe<RecordOutput<StringSchema, TRecordValue>>): RecordSchema<StringSchema, TRecordValue> - changed:
function recordAsync<TRecordKey extends RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync>(key: TRecordKey, value: TRecordValue, error?: ErrorMessage, pipe?: PipeAsync<RecordOutput<TRecordKey, TRecordValue>>): RecordSchemaAsync<TRecordValue, TRecordKey> → function recordAsync<TRecordKey extends RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync>(key: TRecordKey, value: TRecordValue, error?: ErrorMessage, pipe?: PipeAsync<RecordOutput<TRecordKey, TRecordValue>>): RecordSchemaAsync<TRecordKey, TRecordValue> - changed:
function recordAsync<TRecordKey extends RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync>(key: TRecordKey, value: TRecordValue, pipe?: PipeAsync<RecordOutput<TRecordKey, TRecordValue>>): RecordSchemaAsync<TRecordValue, TRecordKey> → function recordAsync<TRecordKey extends RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync>(key: TRecordKey, value: TRecordValue, pipe?: PipeAsync<RecordOutput<TRecordKey, TRecordValue>>): RecordSchemaAsync<TRecordKey, TRecordValue> - changed:
function recordAsync<TRecordValue extends BaseSchema | BaseSchemaAsync>(value: TRecordValue, error?: ErrorMessage, pipe?: PipeAsync<RecordOutput<StringSchema, TRecordValue>>): RecordSchemaAsync<TRecordValue> → function recordAsync<TRecordValue extends BaseSchema | BaseSchemaAsync>(value: TRecordValue, error?: ErrorMessage, pipe?: PipeAsync<RecordOutput<StringSchema, TRecordValue>>): RecordSchemaAsync<StringSchema, TRecordValue> - changed:
function recordAsync<TRecordValue extends BaseSchema | BaseSchemaAsync>(value: TRecordValue, pipe?: PipeAsync<RecordOutput<StringSchema, TRecordValue>>): RecordSchemaAsync<TRecordValue> → function recordAsync<TRecordValue extends BaseSchema | BaseSchemaAsync>(value: TRecordValue, pipe?: PipeAsync<RecordOutput<StringSchema, TRecordValue>>): RecordSchemaAsync<StringSchema, TRecordValue> - changed:
type FlatErrors = { root?: [string, ...string[]]; nested: Partial<Record<string, [string, ...string[]]>> } → type FlatErrors<TSchema extends BaseSchema | BaseSchemaAsync = any> = { root?: [string, ...string[]]; nested: Partial<Record<NestedPath<TSchema>, [string, ...string[]]>> } - changed:
type RecordInput<TRecordKey extends RecordKey | RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync> = ResolveObject<Record<Input<TRecordKey>, Input<TRecordValue>>> → type RecordInput<TRecordKey extends RecordKey | RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync> = ResolveObject<TRecordKey extends AnyEnumSchema ? Partial<Record<Input<TRecordKey>, Input<TRecordValue>>> : Record<Input<TRecordKey>, Input<TRecordValue>>> - changed:
type RecordOutput<TRecordKey extends RecordKey | RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync> = ResolveObject<Record<Output<TRecordKey>, Output<TRecordValue>>> → type RecordOutput<TRecordKey extends RecordKey | RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync> = ResolveObject<TRecordKey extends AnyEnumSchema ? Partial<Record<Output<TRecordKey>, Output<TRecordValue>>> : Record<Output<TRecordKey>, Output<TRecordValue>>> - changed:
type RecordSchema<TRecordValue extends BaseSchema, TRecordKey extends RecordKey = StringSchema, TOutput = RecordOutput<TRecordKey, TRecordValue>> = BaseSchema<RecordInput<TRecordKey, TRecordValue>, TOutput> & { schema: 'record'; record: { key: TRecordKey; value: TRecordValue } } → type RecordSchema<TRecordKey extends RecordKey, TRecordValue extends BaseSchema, TOutput = RecordOutput<TRecordKey, TRecordValue>> = BaseSchema<RecordInput<TRecordKey, TRecordValue>, TOutput> & { schema: 'record'; record: { key: TRecordKey; value: TRecordValue } } - changed:
type RecordSchemaAsync<TRecordValue extends BaseSchema | BaseSchemaAsync, TRecordKey extends RecordKeyAsync = StringSchema, TOutput = RecordOutput<TRecordKey, TRecordValue>> = BaseSchemaAsync<RecordInput<TRecordKey, TRecordValue>, TOutput> & { schema: 'record'; record: { key: TRecordKey; value: TRecordValue } } → type RecordSchemaAsync<TRecordKey extends RecordKeyAsync, TRecordValue extends BaseSchema | BaseSchemaAsync, TOutput = RecordOutput<TRecordKey, TRecordValue>> = BaseSchemaAsync<RecordInput<TRecordKey, TRecordValue>, TOutput> & { schema: 'record'; record: { key: TRecordKey; value: TRecordValue } } - added:
function brand<TSchema extends IntersectionSchema<any>, TBrandName extends BrandName>(schema: TSchema, name: TBrandName): IntersectionSchema<TSchema['intersection'], Output<TSchema> & Brand<TBrandName>> - added:
function brand<TSchema extends IntersectionSchemaAsync<any>, TBrandName extends BrandName>(schema: TSchema, name: TBrandName): IntersectionSchemaAsync<TSchema['intersection'], Output<TSchema> & Brand<TBrandName>> - added:
function intersection<TIntersectionOptions extends IntersectionOptions>(intersection: TIntersectionOptions, error?: string): IntersectionSchema<TIntersectionOptions> - added:
function intersectionAsync<TIntersectionOptions extends IntersectionOptionsAsync>(intersection: TIntersectionOptions, error?: string): IntersectionSchemaAsync<TIntersectionOptions> - added:
function transform<TSchema extends IntersectionSchema<any>, TOutput>(schema: TSchema, action: (value: Output<TSchema>) => TOutput): IntersectionSchema<TSchema['intersection'], TOutput> - added:
function transformAsync<TSchema extends IntersectionSchema<any> | IntersectionSchemaAsync<any>, TOutput>(schema: TSchema, action: (value: Output<TSchema>) => TOutput | Promise<TOutput>): IntersectionSchemaAsync<TSchema['intersection'], TOutput> - added:
type IntersectionOptions = [BaseSchema<any>, BaseSchema<any>, ...BaseSchema<any>[]] - added:
type IntersectionOptionsAsync = [BaseSchema | BaseSchemaAsync, BaseSchema | BaseSchemaAsync, ...(BaseSchema[] | BaseSchemaAsync[])] - added:
type IntersectionSchema<TIntersectionOptions extends IntersectionOptions, TOutput = IntersectionOutput<TIntersectionOptions>> = BaseSchema<IntersectionInput<TIntersectionOptions>, TOutput> & { schema: 'intersection'; intersection: TIntersectionOptions } - added:
type IntersectionSchemaAsync<TIntersectionOptions extends IntersectionOptionsAsync, TOutput = IntersectionOutput<TIntersectionOptions>> = BaseSchemaAsync<IntersectionInput<TIntersectionOptions>, TOutput> & { schema: 'intersection'; intersection: TIntersectionOptions }