| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(cast): reject arrays when casting to Int32 or Double Number([5]) is 5 and Number([]) is 0, so a single-element or empty array reached the fallback Number() coercion in castInt32 and castDouble and silently produced a plausible-looking number instead of throwing a CastError -- unlike castNumber(), which already guards against this with an explicit Array.isArray() check, and unlike castBigInt()/castDecimal128(), whose exhaustive allow-lists never match an array in the first place. Multi-element arrays already threw correctly (Number([5,6]) is NaN), so only the single-element/empty cases were affected. | 1 个月前 | |
revert: restore master before middleware skip changes | 2 个月前 | |
feat: add timestamp option to debug | 5 个月前 | |
fix(document): throw error if overwriting array selected with $slice Fix #2432 | 3 个月前 | |
Merge pull request #16496 from rajanpanth/fix/cast-expr-nested-args fix(query): pass schema through when casting a nested $expr comparison | 4 天前 | |
feat(schematype): support `allowNull` option to disallow null values even if not `required` Fix #15905 | 4 个月前 | |
fix(connection): restore delete state across transaction retries | 1 个月前 | |
fix(schema): clone a document array element with its own constructor signature Fixes #16462 | 19 天前 | |
feat(model): add standard schema adapter for models Fix #16280 | 3 个月前 | |
fix(subdocument): don't minimize empty document array elements to null Re: #7322 #15336 Since 8.14.0 (#15336), an all-undefined subdocument inside a document array is minimized to undefined during serialization, which BSON stores as null - reintroducing the problem fixed in 5.4.6 (#7322). Restore the array-element exclusion the minimize logic had in clone() by checking $isDocumentArrayElement in Subdocument.prototype.$toObject(). | 1 个月前 | |
docs: expand sample() example to show sampling from a filtered subset | 2 个月前 | |
fix(cast): use current castForQuery() signature for object-shaped geo values The object branch of _cast() still passed the legacy single-object argument, so the value landed in the $conditional slot and threw "Can't use [object Object] with Number" instead of casting. Matches the sibling array branch. Fix #16376 | 1 个月前 | |
docs: use lowercase primitive types re #16018 | 6 个月前 | |
fix(connection): restore delete state across transaction retries | 1 个月前 | |
BREAKING CHANGE: rename top-level files to camel case | 2 年前 | |
fix(model): skip applying static hooks by default if static name conflicts with model,document middleware | 1 年前 | |
Remove unnecessary check for existing message format Causes a couple of test failures that I will fix in master | 11 天前 | |
fix: avoid adding every Mongoose instance to global driver | 4 年前 | |
fix(mongoose): handle initially null driver when instantiating Mongoose for rollup Fix #12335 | 2 年前 | |
perf(document): cache projection metadata and avoid scanning all projected paths for flat projections `isSelected()` recomputed everything from `$__.selected` on every call: it allocated a fresh `Object.keys()` array, re-derived whether the projection was inclusive or exclusive, and then scanned every projected key looking for a prefix relationship with the requested path. `toObject({ getters: true })` calls `isSelected()` once per schema path, so serializing a projected document cost O(schema paths x projected paths). Two changes: - `$__.selected` is assigned once in the Document constructor and never mutated, so the derived values are computed once per document and cached on `$__`. `isDirectSelected()` reuses the same cache. - When no projected key is nested, no key can start with `path + '.'`, so only the "is an ancestor of `path` projected?" check can match. Every matching ancestor yields the same answer, so walking the path's own ancestors is equivalent to scanning every projected key, and is O(depth of path) instead of O(number of projected paths). Projections containing a nested key still take the original scan. Re: #16373 | 1 个月前 | |
types(model): document SearchIndexInfo properties | 8 天前 | |
style: fix lint | 2 年前 | |
docs: update default pool sizes on createConnection() Looks like these references to the default minPoolSize and maxPoolSize were missed when the docs were updated for v6. | 3 个月前 | |
feat(document): add flattenUUIDs option to `toObject()` and `toJSON()` | 7 个月前 | |
docs+refactor(query): consistent jsdoc list of _mongooseOptions and consistent alphabetical ordering of assignments | 25 天前 | |
fix(query): generalize ancestor-exclusion check to all falsy values (gh-12798) hasExcludedAncestor() only checked `=== 0`/`=== false`, but any falsy defining value ('', NaN) is an equally valid exclusion per this same function's own `exclude = !field` logic a few lines up -- a fresh `.select({ subd: '' })` reaches the driver unmodified and would still collide with a schema-excluded descendant. Widen to a falsy check (guarding presence, since an absent key is not an exclusion) and add a test for the empty-string case alongside the existing boolean one. | 1 个月前 | |
Remove comments about mapPaths in schema.js Removed commented-out code explaining mapPaths handling. | 16 天前 | |
fix(schema): do not repeat null in a toJSONSchema enum that already lists null | 20 天前 | |
Merge branch 'master' into vkarpov15/insertmany-perf | 1 个月前 | |
Remove unused noop function Remove unused noop function from tracing.js | 3 个月前 | |
refactor: remove isBuiltInObject (no longer used) re: #16440 | 1 个月前 | |
feat(schema): add `strictRead` option to filter unknown fields on document hydration Adds a new `strictRead` schema option that controls how Mongoose handles fields not defined in the schema when hydrating documents from MongoDB (i.e. during the `init` path, not during construction of new documents). Possible values: - `false` (default): existing behavior — unknown fields are stored in `_doc` as before. - `true` / `'filter'`: unknown fields are silently skipped and never stored in `_doc` or exposed on the document instance. - `'throw'`: a `StrictModeError` is thrown when an unknown field is encountered during hydration. This is distinct from the existing `strict` option (which governs what happens when setting paths on a new document) and the `strictQuery` option (which governs query filter handling). Closes #4279 | 2 个月前 | |
address code review comments | 6 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 个月前 | ||
| 2 个月前 | ||
| 5 个月前 | ||
| 3 个月前 | ||
| 4 天前 | ||
| 4 个月前 | ||
| 1 个月前 | ||
| 19 天前 | ||
| 3 个月前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 1 个月前 | ||
| 6 个月前 | ||
| 1 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 11 天前 | ||
| 4 年前 | ||
| 2 年前 | ||
| 1 个月前 | ||
| 8 天前 | ||
| 2 年前 | ||
| 3 个月前 | ||
| 7 个月前 | ||
| 25 天前 | ||
| 1 个月前 | ||
| 16 天前 | ||
| 20 天前 | ||
| 1 个月前 | ||
| 3 个月前 | ||
| 1 个月前 | ||
| 2 个月前 | ||
| 6 个月前 |