Skip to content

Upgrading valibot 0.24 to 0.25

Review needed0.24.1 → 0.25.0New4Changed1

Review neededUpgrade verdict

1 behavior change.

  • Change PicklistOptions type and generics of picklist and picklistAsync schema.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Nothing in this upgrade needs a code or configuration change.

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • changed: function intersect<TOptions extends IntersectOptions>(options: TOptions, message?: ErrorMessage): IntersectSchema<TOptions> → function intersect<TOptions extends IntersectOptions>(options: TOptions, message?: ErrorMessage, pipe?: Pipe<IntersectInput<TOptions>>): IntersectSchema<TOptions>
  • changed: function picklist<TOption extends string, TOptions extends PicklistOptions<TOption>>(options: TOptions, message?: ErrorMessage): PicklistSchema<TOptions> → function picklist<const TOptions extends PicklistOptions>(options: TOptions, message?: ErrorMessage): PicklistSchema<TOptions>
  • changed: function picklistAsync<TOption extends string, TOptions extends PicklistOptions<TOption>>(options: TOptions, message?: ErrorMessage): PicklistSchemaAsync<TOptions> → function picklistAsync<const TOptions extends PicklistOptions>(options: TOptions, message?: ErrorMessage): PicklistSchemaAsync<TOptions>
  • changed: function schemaIssue(info: ParseInfo | undefined, reason: IssueReason, validation: string, message: ErrorMessage, input: unknown, issues?: Issues): UntypedSchemaResult → function schemaIssue(info: ParseInfo | undefined, reason: IssueReason, validation: string, message: ErrorMessage, input: unknown, path?: PathItem[], issues?: Issues): UntypedSchemaResult
  • changed: function union<TOptions extends UnionOptions>(options: TOptions, message?: ErrorMessage): UnionSchema<TOptions> → function union<TOptions extends UnionOptions>(options: TOptions, message?: ErrorMessage, pipe?: Pipe<Input<TOptions[number]>>): UnionSchema<TOptions>
  • changed: function unionAsync<TOptions extends UnionOptionsAsync>(options: TOptions, message?: ErrorMessage): UnionSchemaAsync<TOptions> → function unionAsync<TOptions extends UnionOptionsAsync>(options: TOptions, message?: ErrorMessage, pipe?: PipeAsync<Input<TOptions[number]>>): UnionSchemaAsync<TOptions>
  • changed: function variant<TKey extends string, TOptions extends VariantOptions<TKey>>(key: TKey, options: TOptions, message?: ErrorMessage): VariantSchema<TKey, TOptions> → function variant<TKey extends string, TOptions extends VariantOptions<TKey>>(key: TKey, options: TOptions, message?: ErrorMessage, pipe?: Pipe<Input<TOptions[number]>>): VariantSchema<TKey, TOptions>
  • changed: function variantAsync<TKey extends string, TOptions extends VariantOptionsAsync<TKey>>(key: TKey, options: TOptions, message?: ErrorMessage): VariantSchemaAsync<TKey, TOptions> → function variantAsync<TKey extends string, TOptions extends VariantOptionsAsync<TKey>>(key: TKey, options: TOptions, message?: ErrorMessage, pipe?: PipeAsync<Input<TOptions[number]>>): VariantSchemaAsync<TKey, TOptions>
  • changed: type ImeiValidation<TInput extends string> = BaseValidation<TInput> & { type: 'imei'; requirement: [RegExp, (input: string) => boolean] } → type ImeiValidation<TInput extends string> = BaseValidation<TInput> & { type: 'imei'; requirement: [RegExp, typeof isLuhnAlgo] }
  • changed: type IntersectSchema<TOptions extends IntersectOptions, TOutput = IntersectOutput<TOptions>> = BaseSchema<IntersectInput<TOptions>, TOutput> & { type: 'intersect'; options: TOptions; message: ErrorMessage } → type IntersectSchema<TOptions extends IntersectOptions, TOutput = IntersectOutput<TOptions>> = BaseSchema<IntersectInput<TOptions>, TOutput> & { type: 'intersect'; options: TOptions; message: ErrorMessage; pipe: Pipe<IntersectInput<TOptions>> | undefined…
  • changed: type IssueReason = 'any' | 'array' | 'bigint' | 'blob' | 'boolean' | 'date' | 'function' | 'instance' | 'map' | 'number' | 'object' | 'record' | 'set' | 'special' | 'string' | 's… → type IssueReason = 'any' | 'array' | 'bigint' | 'blob' | 'boolean' | 'date' | 'intersect' | 'function' | 'instance' | 'map' | 'number' | 'object' | 'record' | 'set' | 'special' |…
  • changed: type PicklistOptions<TOption extends string = string> = MaybeReadonly<TOption[]> → type PicklistOptions = MaybeReadonly<string[]>
  • changed: type UnionSchema<TOptions extends UnionOptions, TOutput = Output<TOptions[number]>> = BaseSchema<Input<TOptions[number]>, TOutput> & { type: 'union'; options: TOptions; message: ErrorMessage } → type UnionSchema<TOptions extends UnionOptions, TOutput = Output<TOptions[number]>> = BaseSchema<Input<TOptions[number]>, TOutput> & { type: 'union'; options: TOptions; message: ErrorMessage; pipe: Pipe<Input<TOptions[number]>> | undefined }
  • changed: type UnionSchemaAsync<TOptions extends UnionOptionsAsync, TOutput = Output<TOptions[number]>> = BaseSchemaAsync<Input<TOptions[number]>, TOutput> & { type: 'union'; options: TOptions; message: ErrorMessage } → type UnionSchemaAsync<TOptions extends UnionOptionsAsync, TOutput = Output<TOptions[number]>> = BaseSchemaAsync<Input<TOptions[number]>, TOutput> & { type: 'union'; options: TOptions; message: ErrorMessage; pipe: PipeAsync<Input<TOptions[number]>> | undef…
  • changed: type VariantSchema<TKey extends string, TOptions extends VariantOptions<TKey>, TOutput = Output<TOptions[number]>> = BaseSchema<Input<TOptions[number]>, TOutput> & { type: 'variant'; key: TKey; options: TOptions; message: ErrorMessage } → type VariantSchema<TKey extends string, TOptions extends VariantOptions<TKey>, TOutput = Output<TOptions[number]>> = BaseSchema<Input<TOptions[number]>, TOutput> & { type: 'variant'; key: TKey; options: TOptions; message: ErrorMessage; pipe: Pipe<Input<TOptions[number]>> | un…
  • changed: type VariantSchemaAsync<TKey extends string, TOptions extends VariantOptionsAsync<TKey>, TOutput = Output<TOptions[number]>> = BaseSchemaAsync<Input<TOptions[number]>, TOutput> & { type: 'variant'; key: TKey; options: TOptions; message: ErrorMessage } → type VariantSchemaAsync<TKey extends string, TOptions extends VariantOptionsAsync<TKey>, TOutput = Output<TOptions[number]>> = BaseSchemaAsync<Input<TOptions[number]>, TOutput> & { type: 'variant'; key: TKey; options: TOptions; message: ErrorMessage; pipe: PipeAsync<Input<TOptions[numb…
  • added: const DECIMAL_REGEX: RegExp
  • added: const HEXADECIMAL_REGEX: RegExp
  • added: const HEX_COLOR_REGEX: RegExp
  • added: const OCTAL_REGEX: RegExp
  • added: function creditCard<TInput extends string>(message?: ErrorMessage): CreditCardValidation<TInput>
  • added: function decimal<TInput extends string>(message?: ErrorMessage): DecimalValidation<TInput>
  • added: function hexColor<TInput extends string>(message?: ErrorMessage): HexColorValidation<TInput>
  • added: function hexadecimal<TInput extends string>(message?: ErrorMessage): HexadecimalValidation<TInput>
  • added: function intersect<TOptions extends IntersectOptions>(options: TOptions, pipe?: Pipe<IntersectInput<TOptions>>): IntersectSchema<TOptions>
  • added: function octal<TInput extends string>(message?: ErrorMessage): OctalValidation<TInput>
  • added: function union<TOptions extends UnionOptions>(options: TOptions, pipe?: Pipe<Input<TOptions[number]>>): UnionSchema<TOptions>
  • added: function unionAsync<TOptions extends UnionOptionsAsync>(options: TOptions, pipe?: PipeAsync<Input<TOptions[number]>>): UnionSchemaAsync<TOptions>
  • added: function variant<TKey extends string, TOptions extends VariantOptions<TKey>>(key: TKey, options: TOptions, pipe?: Pipe<Input<TOptions[number]>>): VariantSchema<TKey, TOptions>
  • added: function variantAsync<TKey extends string, TOptions extends VariantOptionsAsync<TKey>>(key: TKey, options: TOptions, pipe?: PipeAsync<Input<TOptions[number]>>): VariantSchemaAsync<TKey, TOptions>
  • added: type CreditCardValidation<TInput extends string> = BaseValidation<TInput> & { type: 'credit_card'; requirement: (input: string) => boolean }
  • added: type DecimalValidation<TInput extends string> = BaseValidation<TInput> & { type: 'decimal'; requirement: RegExp }
  • added: type HexColorValidation<TInput extends string> = BaseValidation<TInput> & { type: 'hex_color'; requirement: RegExp }
  • added: type HexadecimalValidation<TInput extends string> = BaseValidation<TInput> & { type: 'hexadecimal'; requirement: RegExp }
  • added: type OctalValidation<TInput extends string> = BaseValidation<TInput> & { type: 'octal'; requirement: RegExp }