---
title: "joi 18.3.0 Breaking Changes on npm | Since.dev"
description: "What each joi release removed, renamed or changed: 22 breaking changes in 4 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/joi
last_updated: 2026-12-04
---

# joi breaking changes

joi 18.3.0 (October 16, 2026) is its newest release with breaking changes. The first: Signature changed Extension.prepare. Every breaking API change we have recorded in joi on npm: 22 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `18.3.2`, released November 4, 2026. [Source repository](https://github.com/hapijs/joi)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [18.0.0](#v-18-0-0) to [18.3.0](#v-18-3-0): 10 breaking changes in 3 versions.

## joi 18.3.0 breaking changes

joi 18.3.0, released October 16, 2026: 1 breaking change.

- **Signature changed** `Extension.prepare`  

Was prepare?(value: any, helpers: CustomHelpers): any; now prepare?: PrepareFunction | PrepareObject. [npmjs.com](https://www.npmjs.com/package/joi/v/18.3.0)

## joi 18.1.0 breaking changes

joi 18.1.0, released March 23, 2026: 1 breaking change.

- **Signature changed** `AnySchema`  

Was interface AnySchema\<TSchema = any> extends SchemaInternals, StandardSchemaV1\<TSchema>; now interface AnySchema\<TSchema = any> extends SchemaInternals, StandardSchemaV1\<any, TSchema>, StandardJSONSchemaV1\<any, TSchema>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.1.0)

## joi 18.0.1 breaking changes

joi 18.0.1, released August 20, 2025: 8 breaking changes.

- **Signature changed** `AnySchema.default`  

Was default(value?: BasicType | Reference | ((parent: any, helpers: CustomHelpers) => BasicType | Reference)): this; now default(value?: | BasicType | Reference | ((parent: any, helpers: CustomHelpers) => BasicType | Reference)): this. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `ArraySchema.items`  

Was items\<TItems>(...types: SchemaLikeWithoutArray\<TItems>\[\]): this; now items\<TItems, TTItems extends SchemaLikeWithoutArray\<TItems>\[\] = SchemaLikeWithoutArray\<TItems>\[\]>(...types: NoNestedArrays\<TTItems>): ArraySchema<{\[I in keyof... [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `ErrorFormattingOptions.wrap`  

Was wrap?: {label?: string | false, array?: string | false string?: string | false}; now wrap?: {label?: string | false; array?: string | false; string?: string | false;}. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `GuidVersions`  

Was type GuidVersions = 'uuidv1' | 'uuidv2' | 'uuidv3' | 'uuidv4' | 'uuidv5' | 'uuidv6' | 'uuidv7' | 'uuidv8'; now type GuidVersions = | "uuidv1" | "uuidv2" | "uuidv3" | "uuidv4" | "uuidv5" | "uuidv6" | "uuidv7" | "uuidv8". [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `ObjectPropertiesSchema`  

Was type ObjectPropertiesSchema\<T = any> = true extends IsNonPrimitiveSubsetUnion\<Exclude\<T, undefined | null>> ? Joi.AlternativesSchema : T extends NullableType\<string> ? Joi.StringSchema : T extends NullableType\<number> ?... [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `SchemaLikeWithoutArray`  

Was type SchemaLikeWithoutArray\<TSchema = any> = Exclude<(Primitives | Schema\<TSchema> | SchemaMap\<TSchema>), any\[\]>; now type SchemaLikeWithoutArray\<TSchema = any> = Exclude\<Primitives | Schema\<TSchema> | SchemaMap\<TSchema>, any\[\]>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `SymbolSchema.map`  

Was map(iterable: Iterable<\[string | number | boolean | symbol, symbol\]> | {\[key: string\]: symbol}): this; now map(iterable: | Iterable<\[string | number | boolean | symbol, symbol\]> | {\[key: string\]: symbol}): this. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)
- **Signature changed** `ValidationResult`  

Was type ValidationResult\<TSchema = any> = {error: undefined; warning?: ValidationError; value: TSchema;} | {error: ValidationError; warning?: ValidationError; value: any;}; now type ValidationResult\<TSchema = any> = | {error: undefined... [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.1)

## joi 18.0.0 breaking changes

joi 18.0.0, released August 3, 2025: 12 breaking changes.

- **Signature changed** `AlternativesSchema.conditional`  

Was conditional(ref: Schema, options: WhenSchemaOptions): this conditional(ref: string | Reference, options: WhenOptions | WhenOptions\[\]): this; now conditional\<ThenSchema, OtherwiseSchema>(ref: Schema, options... [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `AnySchema`  

Was interface AnySchema\<TSchema = any> extends SchemaInternals; now interface AnySchema\<TSchema = any> extends SchemaInternals, StandardSchemaV1\<TSchema>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `ArraySchema.items`  

Was items(...types: SchemaLikeWithoutArray\[\]): this; now items\<A, B, C, D, E, F>(a: SchemaLikeWithoutArray\<A>, b: SchemaLikeWithoutArray\<B>, c: SchemaLikeWithoutArray\<C>, d: SchemaLikeWithoutArray\<D>, e: SchemaLikeWithoutArray\<E>, f... [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `Root.alternatives`  

Was alternatives\<TSchema = any>(...types: SchemaLike\[\]): AlternativesSchema\<TSchema> alternatives\<TSchema = any>(types: SchemaLike\[\]): AlternativesSchema\<TSchema>; now alternatives\<A, B, C, D, E>(a: SchemaLike\<A>, b: SchemaLike\<B>... [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `SchemaLike`  

Was type SchemaLike = SchemaLikeWithoutArray | object; now type SchemaLike\<TSchema = any> = SchemaLikeWithoutArray\<TSchema> | object. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `SchemaLikeWithoutArray`  

Was type SchemaLikeWithoutArray = string | number | boolean | null | Schema | SchemaMap; now type SchemaLikeWithoutArray\<TSchema = any> = Exclude<(Primitives | Schema\<TSchema> | SchemaMap\<TSchema>), any\[\]>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `WhenOptions`  

Was interface WhenOptions; now interface WhenOptions\<ThenSchema = any, OtherwiseSchema = any>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `WhenOptions.otherwise`  

Was otherwise?: SchemaLike; now otherwise?: SchemaLike\<OtherwiseSchema>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `WhenOptions.then`  

Was then?: SchemaLike; now then?: SchemaLike\<ThenSchema>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)
- **Signature changed** `WhenSchemaOptions`  

Was interface WhenSchemaOptions; now interface WhenSchemaOptions\<ThenSchema = any, OtherwiseSchema = any>. [npmjs.com](https://www.npmjs.com/package/joi/v/18.0.0)

And 2 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
