Skip to content
CAI
Software that uses CAICheck a score

Automattic/mongoose

55.5

Adequate · 13 November 2026

53.1k

lines of production code

JavaScript

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added TypeScript Mongoose benchmark

A new TypeScript benchmark has been added to the benchmarks/typescript/simple directory. It uses Mongoose to define a User schema and model, providing a baseline for performance testing TypeScript applications with MongoDB ODMs. The setup includes a basic tsconfig.json and an .npmrc file to disable package-lock generation.

benchmarks/typescript/simple · high confidence

Enhanced \`eachAsync\` cursor iteration with batching, parallelism, and error handling options

The \eachAsync\ helper for Mongoose cursors has been rewritten to support advanced iteration patterns. Users can now process documents in batches using the \batchSize\ option, run multiple document handlers in parallel via the \parallel\ option, and handle errors gracefully without stopping the entire stream using \continueOnError\. Additionally, the function now supports cancellation via an \AbortSignal\, allowing long-running cursor operations to be stopped early. These changes provide more control and performance flexibility when iterating over large result sets.

lib/helpers/cursor · high confidence

New BSON type exports and subdocument type refactoring

Mongoose now exports \mongoose.Types.Double\, \mongoose.Types.UUID\, and \mongoose.Types.Decimal128\ as direct wrappers around the MongoDB driver's BSON types, enabling native support for these data formats. The \lib/types\ module has been restructured to introduce \ArraySubdocument\ and \Subdocument\ classes, replacing the previous \EmbeddedDocument\ pattern to provide a clearer distinction between array elements and single nested subdocuments. Additionally, \ObjectId\ now includes a \valueOf()\ method to allow standard equality comparisons, and \MongooseBuffer\ has been updated to use the driver's \Binary\ and \UUID\ types directly.

lib/types · high confidence

New documentation and build scripts for the website

The repository now includes a suite of new scripts in the \scripts/\ directory to manage documentation generation and local development. \website.js\ and \static.js\ handle the rendering of documentation pages using Pug and Marked, serving them locally via Express on port 8089 with file watching support. \generateSearch.js\ creates searchable content for the documentation site, while \generateLLMsTXT.js\ produces an LLM-friendly index file. Additional scripts include \loadSponsorData.js\ for fetching sponsor information, \update-mongodb-links.js\ for maintaining dependency links, \tsc-diagnostics-check.js\ for TypeScript benchmarking, and \setup-encryption-tests.js\ for configuring encryption test environments.

scripts · high confidence

New helpers to apply defaults, timestamps, and virtuals to plain objects

Added \applyDefaults\, \applyTimestamps\, and \applyVirtuals\ helper functions in \lib/helpers/document\ that allow applying schema defaults, timestamps, and virtuals to plain JavaScript objects (POJOs) rather than requiring hydrated Mongoose documents. This enables users to generate fully populated plain objects with computed fields and timestamps without the overhead of document instantiation.

lib/helpers/document · high confidence

New model helper utilities for defaults, hooks, and bulk operations

This change introduces a suite of new helper functions in the \lib/helpers/model\ directory to support model-level operations. \applyDefaultsToPOJO\ allows applying schema defaults to plain JavaScript objects, while \applyHooks\, \applyMethods\, \applyStaticHooks\, and \applyStatics\ handle the registration and wrapping of middleware, custom methods, and statics on models. Additionally, \castBulkWrite\ and \decorateBulkWriteResult\ provide the casting, validation, and result decoration logic for \bulkWrite\ operations, and \discriminator\ manages the merging and validation of discriminator schemas.

lib/helpers/model · high confidence

New path helper utilities for parent paths and dotted path setting

Added two new helper modules in lib/helpers/path: parentPaths.js, which generates an array of all parent paths for a given dotted string (e.g., 'a.b.c' becomes \['a', 'a.b', 'a.b.c'\]), and setDottedPath.js, which safely sets a value at a nested dotted path in an object while skipping special properties to prevent prototype pollution and creating intermediate objects as needed.

lib/helpers/path · high confidence

New query helper utilities and sanitization logic

This change introduces a suite of new helper functions in the query module to improve query safety, casting, and configuration handling. It adds \sanitizeFilter\ and \sanitizeProjection\ to automatically sanitize untrusted query inputs, preventing potential injection issues by restricting dangerous operators like \$where\ and \$expr\ in filters and normalizing string-based projections. The update also includes \cast$expr\ for properly casting aggregation expressions, \handleImmutable\ to enforce schema immutability constraints during updates, and utility functions like \applyGlobalMaxTimeMS\ and \applyGlobalDiskUse\ to propagate global connection options to queries. Additionally, \selectPopulatedFields\ ensures that \refPath\ fields are automatically included in projections when populating, and \trusted\ provides a mechanism to mark objects as safe from sanitization.

lib/helpers/query · high confidence

New tools for launching MongoDB test environments

Added three new scripts in the tools directory to simplify setting up MongoDB instances for testing: \auth.js\ launches a standalone MongoDB server with a pre-configured user, \repl.js\ starts a local MongoDB replica set using \mongodb-memory-server\, and \sharded.js\ provisions a sharded cluster topology with shards, config servers, and mongos proxies.

tools · high confidence

New utility to combine path-specific error messages

Added a new helper function, combinePathErrors, in lib/helpers/error/combinePathErrors.js. This utility extracts error messages associated with specific paths from an error object and joins them into a single comma-separated string, simplifying the process of aggregating validation or path-based error details for users.

lib/helpers/error · high confidence

Security

Add sanitizeProjection option to opt in to automatically sanitizing untrusted query projections

Users can now opt in to automatically sanitizing untrusted query projections by setting the \sanitizeProjection\ option. This helps prevent potential security issues when handling user-supplied projection data in queries.

lib · high confidence

Architecture

Refactor DocumentArray methods into dedicated module

The implementation of MongooseDocumentArray methods (including \_cast, id, toObject, and toString) has been extracted into a new dedicated file at lib/types/documentArray/methods/index.js. This change improves code organization and readability by separating the logic for handling embedded documents, ID casting, and array serialization from the main array type definition, without altering the public API or user-facing behavior.

lib/types/documentArray/methods · high confidence

Refactored populate logic into modular helper functions

The internal implementation of the \populate()\ helper has been reorganized into a set of dedicated, single-responsibility modules (such as \assignRawDocsToIdStructure\, \createPopulateQueryFilter\, and \getModelsMapForPopulate\). This refactoring improves code maintainability and performance by separating concerns like query filter creation, model mapping, and value assignment, while preserving the existing populate behavior and options for users.

lib/helpers/populate · high confidence

Schema helper utilities refactored into dedicated modules

The internal schema processing logic has been reorganized into a set of dedicated helper modules within \lib/helpers/schema\. This change extracts specific responsibilities—such as applying built-in and global plugins (\applyBuiltinPlugins.js\, \applyPlugins.js\), managing \\_id\ and timestamp options (\handleIdOption.js\, \handleTimestampOption.js\), and gathering index definitions (\getIndexes.js\)—into their own files. It also introduces new utilities for path resolution (\getPath.js\), strict mode handling (\getSubdocumentStrictValue.js\), and schema merging (\merge.js\). For users, this represents a structural cleanup that improves code maintainability and modularity without altering the public API or schema behavior.

lib/helpers/schema · high confidence

TypeScript definitions restructured into modular files

The TypeScript declaration files in the \types\ directory have been reorganized from a single monolithic file into multiple modular files (e.g., \aggregate.d.ts\, \augmentations.d.ts\, \callback.d.ts\, \collection.d.ts\). This change improves maintainability and potentially TypeScript compilation performance by splitting the type definitions into logical components while preserving the exported API surface.

types · high confidence

Behavioural changes

Cursor implementation refactored with new tracing, error handling, and API updates

The cursor subsystem in lib/cursor has been significantly updated. AggregationCursor and QueryCursor now support a 'transform' option to map documents, and QueryCursor exposes a new getDriverCursor() method to access the underlying MongoDB driver cursor. Error handling has been improved: AggregationCursor.next() now throws if pre-aggregate middleware fails, and ChangeStream methods throw errors if the stream has already errored. The ChangeStream constructor now returns a Promise\<void\> for close(), and the 'ready' event is emitted on the next tick to ensure proper initialization. Callbacks have been removed from eachAsync methods in both AggregationCursor and QueryCursor. Additionally, a new 'mongoose:cursor:next' TracingChannel has been added for monitoring cursor iteration, and performance optimizations include clearing the stack during populate with batchSize to prevent stack overflows.

lib/cursor · high confidence

Document arrays now support virtuals and safer property checks

Document arrays now allow defining virtuals on the array itself, not just on individual elements, enabling new data transformation capabilities at the collection level. The implementation has been refactored to use \Object.hasOwn\ for safer and more readable property checks, replacing previous patterns that relied on \hasOwnProperty\. Additionally, the constructor logic ensures the parent document and schema are correctly set even when the array is instantiated with a schema from a different Mongoose instance, fixing potential cross-instance association issues.

lib/types/documentArray · high confidence

Immutable fields now throw errors in strict mode

The library now enforces immutability for schema fields by throwing a StrictModeError when an attempt is made to modify an immutable path on an existing document, provided strict mode is set to throw. This behavior applies to both top-level and single nested subdocuments, ensuring that immutable fields cannot be accidentally overwritten during updates, while still allowing initial creation and explicit overwrites via the \overwriteImmutable\ option.

lib/helpers/schematype · high confidence

Introduces structured option classes for schema types and operations

Mongoose now defines explicit classes for schema type options (such as SchemaStringOptions, SchemaNumberOptions, SchemaDateOptions, SchemaArrayOptions, SchemaMapOptions, SchemaUnionOptions, SchemaSubdocumentOptions, and SchemaDocumentArrayOptions) as well as operation options (PopulateOptions, SaveOptions, VirtualOptions). These classes formally document and expose specific properties for each type—for example, allowing inline discriminators on subdocuments and document arrays, supporting union types, enabling \allowNull\ to disallow null on non-required paths, and providing default populate options on scalar types—while also introducing validation logic like the mutual exclusivity of \limit\ and \perDocumentLimit\ in populate operations.

lib/options · high confidence

Migrate MongoDB driver integration to node-mongodb-native v5

The MongoDB driver layer has been rewritten to support the node-mongodb-native v5 driver. This update introduces a new \BulkWriteResult\ wrapper to ensure Mongoose returns the correct driver instance, implements \Connection.prototype.removeDb()\ for explicitly closing databases opened via \useDb()\, and adds \Connection.prototype.aggregate()\ for executing db-level aggregations. The connection logic now tracks the last heartbeat timestamp to prevent stale connection states, and collection operations are wrapped to respect per-connection debug settings and buffer timeouts.

lib/drivers/node-mongodb-native · high confidence

Mongoose error classes are refactored into ES6 classes with improved error messages and serialization

The error handling system in \lib/error\ has been refactored to use modern ES6 classes extending a base \MongooseError\. This change introduces several behavioral improvements: \ValidationError\ and \SetOptionError\ now include \toJSON\ methods to ensure \name\ and \message\ appear correctly when serialized; \CastError\ supports custom message formatting via functions and includes \valueType\ and \kind\ properties; \DocumentNotFoundError\ now exposes \numAffected\ and \result\ details; and \MongooseServerSelectionError\ provides more helpful messages for Atlas IP whitelisting and SSL issues. New error types like \MongooseBulkSaveIncompleteError\, \MongooseBulkWriteError\, \EachAsyncMultiError\, and \StrictPopulateError\ have been added to handle specific bulk operation and validation scenarios.

lib/error · high confidence

Refactored MongooseArray implementation with performance and safety improvements

The MongooseArray implementation has been refactored to improve performance and safety. The core array logic is now centralized in a new \lib/types/array/index.js\ file, which uses a Proxy to handle property access and mutations more efficiently, including optimized handling for small arrays and the use of \Object.hasOwn\ for safer property checks. Additionally, a new \lib/types/array/isMongooseArray.js\ helper was added to reliably identify Mongoose array instances. These changes aim to reduce overhead in array operations and prevent unintended side effects during array manipulation.

lib/types/array · high confidence

Refactored array methods into a dedicated module with atomic operation improvements

The array methods previously embedded in the main array type file have been extracted into a new \lib/types/array/methods/index.js\ module. This change introduces a public \getAtomics()\ method, allowing custom container types to access pending atomic operations, and adds a \clearAtomics()\ method to reset these operations after a save. The \$shift()\ method now correctly uses the MongoDB \$pop\ operator instead of overwriting the array, and internal performance optimizations were applied to array proxy operations and setter calls.

lib/types/array/methods · high confidence

Refactored index comparison and discriminator logic for more accurate sync behavior

The index management helpers have been refactored to improve the accuracy of \syncIndexes()\ and \diffIndexes()\. New utility functions now handle specific index types, such as \isTextIndex\ and \isTimeseriesIndex\, ensuring that text indexes are not unnecessarily dropped and that default timeseries collection indexes are preserved. Discriminator index handling has been updated to automatically apply \partialFilterExpression\ constraints, ensuring indexes only apply to the correct discriminator model. Additionally, index equality checks now correctly account for schema-level collations and handle cases where index key order differs, preventing false positives in index comparison.

lib/helpers/indexes · high confidence

Refactored internal helpers and updated BSON handling

The internal helper library has been reorganized and modernized to improve performance and compatibility with MongoDB driver 5. The \lib/helpers\ directory now contains a suite of standalone utility modules (such as \clone.js\, \common.js\, \parallelLimit.js\, and \pathTrie.js\) that replace previous inline implementations. A key behavioral change is the removal of the direct \bson\ dependency in favor of \mongodb/lib/bson\, which updates how BSON types like \ObjectId\, \Decimal128\, and \Binary\ are handled internally. Additionally, the middleware system now uses a new \buildMiddlewareFilter.js\ to manage built-in vs. user middleware, and the \clone\ logic has been enhanced to support new options like \flattenUUIDs\ and \flattenObjectIds\ for controlling serialization output.

lib/helpers · high confidence

Refactored projection logic into modular helper functions

The projection handling logic in \lib/helpers/projection\ has been restructured into a set of dedicated, reusable modules (such as \applyProjection\, \isExclusive\, \isInclusive\, and \parseProjection\). This change replaces the previous monolithic or scattered implementation with a cleaner architecture that explicitly distinguishes between inclusive and exclusive projection modes, correctly handles nested paths, and supports minus-path syntax (e.g., \-field\) for field deselection. Users benefit from more reliable projection application, particularly when dealing with complex nested documents or mixed inclusion/exclusion scenarios, as the new helpers ensure consistent path resolution and type checking.

lib/helpers/projection · high confidence

Refactored query operator casting into dedicated modules

The query casting logic for operators such as $exists, $type, $text, $near, $within, $geoIntersects, and bitwise operations has been extracted from the main SchemaType into separate, dedicated files within lib/schema/operators. This change improves code organization and ensures that specific casting rules (e.g., boolean casting for $exists, string/boolean casting for $text options, and number casting for geospatial distances) are handled consistently and correctly. Users benefit from more robust query validation and fewer edge-case errors when using these operators with arrays or embedded documents.

lib/schema/operators · high confidence

Refactored timestamp handling with immutable createdAt by default

The timestamp logic has been refactored into dedicated helper modules (\setDocumentTimestamps.js\ and \setupTimestamps.js\) to improve maintainability and consistency. By default, the \createdAt\ field is now immutable, preventing accidental updates after initial creation, though this behavior can be overridden via schema options. The update now correctly applies timestamps during \findOneAndReplace\, \replaceOne\, and \insertMany\ operations, and ensures subdocuments receive timestamps even when the parent document does not. Additionally, the system now respects a custom \currentTime\ function if provided in the timestamps configuration.

lib/helpers/timestamps · high confidence

Refactored type casting logic into dedicated modules

The casting logic for all schema types has been reorganized into individual, dedicated modules (bigint, boolean, date, decimal128, double, int32, number, objectid, string, and uuid). This change introduces specific validation rules, such as enforcing MongoDB-compatible bounds for BigInts, rejecting arrays when casting to Int32 or Double, and ensuring UUID schema types return BSON UUIDs. Users benefit from more precise error reporting and stricter type safety during data validation.

lib/cast · high confidence

Schema types refactored into individual modules with new BigInt and UUID support

The schema type definitions (Array, BigInt, Boolean, Buffer, Date, Decimal128, DocumentArray, DocumentArrayElement, Map, Mixed, Number, ObjectId, String, Subdocument, Union, UUID) have been reorganized into separate files under \lib/schema/\. This change introduces native support for \BigInt\ and \UUID\ schema types, allowing users to define these fields directly in their schemas. The \Boolean\ type now enforces stricter casting by default, requiring explicit configuration to accept non-boolean values. Additionally, the \castNonArrays\ option is now available on Array and DocumentArray types to control whether non-array values are automatically wrapped.

lib/schema · high confidence

Sharding and transaction tracking moved to dedicated plugins

The sharding logic and transaction tracking capabilities have been extracted from core model/document handling into dedicated, reusable plugins (\sharding\ and \trackTransaction\) located in \lib/plugins\. The \sharding\ plugin now automatically applies shard keys to \save\, \deleteOne\, and \updateOne\ operations via document hooks, while the \trackTransaction\ plugin manages document state (such as atomics and version keys) within MongoDB transactions. These are exposed alongside the existing \saveSubdocs\ plugin via the new \lib/plugins/index.js\ entry point, allowing users to explicitly register these behaviors on their schemas.

lib/plugins · high confidence

Standardized project configuration and linting setup

The project now uses dedicated configuration files for development workflows: \.gitignore\ and \.npmignore\ have been updated to exclude build artifacts, test files, and local configs from version control and publishing; \.markdownlint-cli2.cjs\ introduces a new markdown linting tool with specific rules for documentation consistency; and \.mocharc.yml\ centralizes Mocha test runner settings. These changes improve maintainability and ensure consistent formatting across the codebase and documentation.

(repo-wide) · high confidence

Fixes

Fixes for discriminator handling and $function operator serialization in aggregation pipelines

This update improves the reliability of aggregation queries involving discriminators and JavaScript functions. When using \Model.watch()\ or standard aggregation, the system now correctly respects discriminators by automatically injecting the necessary filter key into the first pipeline stage (such as \$match\, \$geoNear\, or \$search\) if it is not already present or correctly set, ensuring queries return the expected documents. Additionally, the \$function\ operator now automatically converts JavaScript function bodies to strings, preventing errors when passing functions directly into aggregation stages like \$group\ or \$bucket\. These changes ensure that complex aggregation pipelines with discriminators and custom functions execute without manual intervention or serialization errors.

lib/helpers/aggregate · high confidence

Fixes for embedded discriminator handling and schema merging

This update resolves several issues with embedded discriminators, including ensuring they are applied recursively to nested subdocuments, preventing duplication of indexes and call queues when using shared nested schemas, and allowing numbers and ObjectIds as discriminator values. It also corrects the merging of discriminator schemas to prevent parent schema path duplication, ensures base schema paths are processed before discriminator paths for setters and validators, and fixes the handling of default values for discriminator keys. Additionally, it improves the robustness of discriminator lookup by using a consolidated constructor function and proper BSON type checking.

lib/helpers/discriminator · high confidence

Improved topology detection and error handling for MongoDB Atlas and SSL connections

Added new helper functions to accurately detect MongoDB Atlas connections, identify SSL/TLS errors, and check if all servers are in an unknown state. These changes improve the robustness of connection diagnostics by properly handling topology descriptions with null prototypes and providing clearer error messages for common issues like IP whitelisting and SSL misconfigurations.

lib/helpers/topology · high confidence

Refactored update helpers for timestamps, array filters, and version keys

The update logic in \lib/helpers/update\ has been reorganized into dedicated helper modules to improve reliability and maintainability. Timestamps are now handled by \applyTimestampsToChildren.js\ and \applyTimestampsToUpdate.js\, ensuring \createdAt\ and \updatedAt\ are correctly applied to subdocuments, arrays, and aggregation pipelines, while respecting \timestamps: false\ and \overwriteImmutable\ options. Array filter casting is now managed by \castArrayFilters.js\, which properly handles \$and\/\$or\ conditions, embedded discriminators, and the \strictQuery\ setting. Additionally, \moveImmutableProperties.js\ ensures immutable properties are moved to \$setOnInsert\ during upserts, \decorateUpdateWithVersionKey.js\ handles version key injection, and \removeUnusedArrayFilters.js\ prevents MongoDB errors by stripping unused filters.

lib/helpers/update · high confidence

Test coverage

299 commits adding/updating tests in test/docs; Added TypeScript type-inference benchmarks for Mongoose schemas; Added and updated test coverage for various Mongoose features and bug fixes; Added integration tests for field-level encryption; Added new performance benchmarks for document creation, queries, and bulk operations; Added unit tests for internal helper functions; Migrate TypeScript type tests to TSTyche.

Dependencies

Upgrade mquery to 4.0.0

The mquery dependency has been upgraded to version 4.0.0. This update brings the underlying query builder to a newer major version, which may include internal improvements or breaking changes to the query interface.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 49 → 55 (+6.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 46 → 51 (+5.3)
  • Architecture 59 → 64 (+5.7)
  • Maturity 58 → 54 (-3.5)
  • Readiness 66 → 79 (+13.1)
  • Security 46 → 79 (+33.0)
  • Accessibility 49 → 53 (+3.7)
  • Performance 91 → 91 (+0.0)

Resolved (20)

  • $set (cognitive 274) (lib/document.js)
  • Documentation: no architecture or design documentation (README.md)
  • Documentation: no project overview (docs/defaults.md)
  • Documentation: no project overview (docs/enterprise.md)
  • Hotspot: lib/helpers/query/castUpdate.js (lib/helpers/query/castUpdate.js)
  • Hotspot: lib/query.js (lib/query.js)
  • Hotspot: lib/schemaType.js (lib/schemaType.js)
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion
  • Redundant validation methods with overlapping intent. Both methods appear to validate whether a value is a valid MongoDB ObjectId or a valid hex string representation of one. Having two distinct public methods for the same logical check creates confusion for consumers.
  • Scanner failed to run — not a clean result
  • Scanner failed to run — not a clean result
  • document.Document.$set (cyclomatic 177) (lib/document.js)
  • generateSearch.generateContents (cognitive 26) (scripts/generateSearch.js)
  • init (cognitive 93) (lib/document.js)
  • isExclusive (cognitive 19) (lib/helpers/projection/isExclusive.js)
  • query.Query._optionsForExec (cyclomatic 23) (lib/query.js)
  • website.mapURLs (cognitive 16) (scripts/website.js)
  • website.renderFile (cognitive 21) (scripts/website.js)
  • website.renderFile (cyclomatic 19) (scripts/website.js)

New (45)

  • $set (cognitive 241) (lib/document.js)
  • $set (cyclomatic 144) (lib/document.js)
  • Hotspot: lib/helpers/model/discriminator.js (lib/helpers/model/discriminator.js)
  • Hotspot: lib/helpers/updateValidators.js (lib/helpers/updateValidators.js)
  • Hotspot: lib/schema/number.js (lib/schema/number.js)
  • Off-boarding risk: anonymized user #1
  • Repeated repair: lib/cursor/aggregationCursor.js (lib/cursor/aggregationCursor.js)
  • Repeated repair: lib/schema/string.js (lib/schema/string.js)
  • Repeated repair: lib/types/array/methods/index.js (lib/types/array/methods/index.js)
  • doc comments repeat the names (lib/error/browserMissingSchema.js)
  • init (cognitive 94) (lib/document.js)
  • redundant comment (lib/helpers/populate/getModelsMapForPopulate.js)
  • redundant comment (lib/helpers/populate/getModelsMapForPopulate.js)
  • redundant comment (lib/helpers/populate/getModelsMapForPopulate.js)
  • redundant comment (lib/helpers/query/castUpdate.js)
  • redundant comment (lib/helpers/setDefaultsOnInsert.js)
  • redundant comment (lib/model.js)
  • redundant comment (lib/query.js)
  • redundant comment (test/connection_server.js)
  • redundant comment (test/docs/date.test.js)
  • …and 25 more

Changes since last survey

  • 113 commits — 82 feature/other, 31 fixes

By area

  • (repo) — 51 commits
  • (root) — 19 commits
  • lib/helpers — 10 commits
  • docs/production — 4 commits
  • lib/connection.js — 3 commits
  • lib/model.js — 3 commits
  • lib/query.js — 3 commits
  • lib/types — 3 commits
  • .github/workflows — 2 commits
  • lib/cursor — 2 commits
  • lib/schema — 2 commits
  • benchmarks/createSimpleMap.js — 1 commit
  • benchmarks/findOneAndUpdateSimple.js — 1 commit
  • docs/js — 1 commit
  • lib/document.js — 1 commit
  • lib/schema.js — 1 commit
  • scripts/loadSponsorData.js — 1 commit
  • test/cursor.destroy.initialization.test.js — 1 commit
  • test/docs — 1 commit
  • test/schema.validation.test.js — 1 commit

Notable commits

  • fix: Fix WriteError index assignment in error handling
  • fix: Merge branch 'master' into fix/gh-6960-pull-in-array-validator
  • fix: Merge pull request #16608 from Majny/fix/insertmany-preserve-writeerror
  • fix: Merge pull request #16615 from vaidehi-snk/fix/gh-8809-deep-subdoc-push-timestamps
  • fix: Merge pull request #16619 from maxymlyskov/fix/keep-earlier-pushed-values-on-push-each
  • fix: Merge pull request #16629 from OmBhandwaldar/fix/replaceone-cast-errors
  • fix: Merge pull request #16631 from Enesuygurs/fix/enum-false-clear-enum-values
  • fix: Merge pull request #16634 from NgoQuocViet2001/fix-map-has-objectid-key
  • fix: Merge pull request #16640 from IbrahimHafez1/fix/transaction-retry-reset-documents
  • fix: Merge pull request #16642 from ItsM0rty/code-fix/pipeline-timestamp-option
  • fix: Merge pull request #16651 from Oleksii-Pavliuk/fix/clone-keeps-timestamps
  • fix: Merge pull request #16653 from NotAFlightRisk/fix/model-validate-nested-paths-list
  • fix: Merge pull request #16666 from AnkitKumar61/fix/gh-6960-pull-in-array-validator
  • fix: Merge pull request #16693 from luantaraschi/fix/addtoset-bigint
  • fix: fix(array): avoid converting BigInts to numbers in addToSet()
  • fix: fix(connection): don't disable autoIndex/autoCreate for a primary ReadPreference instance
  • fix: fix(connection): reset document state before retrying after a transient commit error
  • fix: fix(cursor): avoid emitting error if no error listeners when calling destroy() for backwards compatibility
  • fix: fix(cursor): propagate error passed to destroy() without re-emitting if error already emitted
  • fix: fix(document): allow setting dotted paths 3+ levels deep underneath single nested subdocuments (#16691)
  • …and 93 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

Automattic/mongoose was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 384de7a1f57104c30076838d712d822dd8e11785 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.63+preprod-4a8cc97a9484.