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

# mongoose breaking changes

Every breaking API change we have recorded in mongoose on npm: 6 breaking changes in 2 versions. Below are its newest 2 versions, removals and renames first, each with its source.

Newest change June 22, 2026

## 9.7.2

1 breaking change, first published June 22, 2026.

- **Behavior changed**  

Schema type lookups now ignore inherited properties, and setting schema paths under special property names is disallowed. Code that relied on either behavior should be checked. [github.com](https://github.com/Automattic/mongoose/releases/tag/9.7.2)

## 9.7.0

5 breaking changes, first published June 9, 2026.

- **Behavior changed**  

Assigning over an array that was selected with $slice now throws instead of proceeding silently. Code that overwrites such arrays must be changed. [github.com](https://github.com/Automattic/mongoose/releases/tag/9.7.0)
- **Behavior changed**  

Primitive values inside union types are now cast when documents are created, which can change stored values for existing code. [github.com](https://github.com/Automattic/mongoose/releases/tag/9.7.0)
- **Behavior changed** `validateSync`  

validateSync() no longer uses the union fallback, so union-typed fields may now fail validation where they previously passed. [github.com](https://github.com/Automattic/mongoose/releases/tag/9.7.0)
- **Signature changed** `'mongoose'.ApplyBasicCreateCasting`  

Was type ApplyBasicCreateCasting<T> = {\[K in keyof T\]: NonNullable<T\[K\]> extends Map<infer KeyType extends string, infer ValueType> ? (Record<KeyType, ValueType> | Array<\[KeyType, ValueType\]> | T\[K\]) : NonNullable<T\[K\]> extends... [npmjs.com](https://www.npmjs.com/package/mongoose/v/9.7.0)
- **Signature changed** `'mongoose'.Document.validateSync`  

Was validateSync(options: ValidateOptions & {\[k: string\]: any}): Error.ValidationError | null validateSync(pathsToValidate?: pathsToValidate, options?: Omit<ValidateOptions, 'pathsToSkip'> & AnyObject): Error.ValidationError | null... [npmjs.com](https://www.npmjs.com/package/mongoose/v/9.7.0)

## 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, not only the newest. On Team and up, a fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous management.

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

### See how out of date your code is.

[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`

---

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