sort by:
Revision Author Date Message Commit Date
5ea18b7 Merge pull request #11005 from Automattic/ownerDoc Owner doc 03 December 2021, 02:18:22 UTC
f7e5cea fix: quick fix for tests Re: #11005 03 December 2021, 02:10:35 UTC
704d935 Merge branch 'ownerDoc' of github.com:Automattic/mongoose into ownerDoc 03 December 2021, 01:53:18 UTC
98484f1 Merge branch '6.1' into ownerDoc 03 December 2021, 01:52:57 UTC
2e05f61 Merge pull request #11008 from Automattic/vkarpov15/10856 feat(populate): support `ref` on subdocuments 03 December 2021, 01:42:30 UTC
783422f fix(populate): make #11008 work with arrays containing subdocuments Fix #10856 03 December 2021, 01:37:38 UTC
a9476aa Merge branch '6.1' into vkarpov15/10856 03 December 2021, 00:25:05 UTC
e07c934 added extra conditional 02 December 2021, 23:00:17 UTC
068babc fixed 2 tests 02 December 2021, 22:52:59 UTC
dfaf1a2 Merge branch 'ownerDoc' of github.com:Automattic/mongoose into ownerDoc 02 December 2021, 17:31:04 UTC
8d1da80 fix: clean up a couple more cases where `ownerDocument` was used to check for subdocs 02 December 2021, 17:30:45 UTC
ed1ba9e Merge branch 'master' into ownerDoc 02 December 2021, 17:18:03 UTC
253ce97 Merge pull request #11006 from Automattic/strictPopulate-global Strict populate global 02 December 2021, 17:17:12 UTC
499c8ee chore: update opencollective sponsors 01 December 2021, 16:12:14 UTC
a21fc07 Merge branch '6.1' into vkarpov15/10856 30 November 2021, 17:09:09 UTC
10d6a15 test: fix tests re: #10611 30 November 2021, 17:03:18 UTC
a06fd17 feat(schema+model): allow specifying `timeseries` option in schema options Fix #10611 30 November 2021, 16:53:28 UTC
1960b4e Merge branch '6.1' of github.com:Automattic/mongoose into 6.1 30 November 2021, 15:46:52 UTC
dea1833 Merge branch 'master' into 6.1 30 November 2021, 15:44:48 UTC
1605ebb chore: release 6.0.14 29 November 2021, 22:10:28 UTC
d459fbe Merge pull request #11020 from ItWorksOnMyMachine/master Remove duplicate "path" in comment. 29 November 2021, 21:48:56 UTC
707e2bd fix(populate): set empty array `[]` on virtual populate with no result Fix #10992 29 November 2021, 21:31:22 UTC
2a81016 test(populate): repro #10992 29 November 2021, 21:30:42 UTC
30574ae docs(migrating_to_6): add a note about `minimize` and `toObject()` behavior change in v5.10.5 Fix #10827 29 November 2021, 20:39:53 UTC
903b8b4 fix(populate): use `Model` by default when using `Model.populate()` on a POJO Fix #10978 29 November 2021, 20:28:46 UTC
9481419 test(populate): repro #10978 29 November 2021, 20:28:40 UTC
635a0d7 made requested changes 29 November 2021, 16:47:22 UTC
075b675 updated tests 29 November 2021, 16:41:50 UTC
c401b2b Merge pull request #11015 from gavi-shandler/patch-1 Fix typo in populate docs 27 November 2021, 20:11:24 UTC
5965ec0 Merge pull request #10997 from Automattic/static-sync-indexes Static sync indexes 27 November 2021, 20:10:52 UTC
ffbc99a Remove duplicare "path" in comment. 27 November 2021, 14:18:26 UTC
0204de2 Fix typo in populate docs Docs mistakenly reference foreign field "band" but the foreign field in the example is "author" 24 November 2021, 18:05:00 UTC
3f19f8e linter fix 24 November 2021, 16:57:23 UTC
cd7db73 made requested changes 23 November 2021, 21:57:46 UTC
b29cb62 shallow clone options and modify it and then pass to getModelsMapForPopulate 23 November 2021, 21:51:21 UTC
4067f92 feat(populate): support `ref` on subdocuments Re: #10856 23 November 2021, 19:07:44 UTC
e3fa648 linter fixes 23 November 2021, 18:42:22 UTC
696ee05 made requested changes 23 November 2021, 18:40:10 UTC
ee96086 linter fixes 23 November 2021, 18:12:35 UTC
60fea31 removed auto import 23 November 2021, 18:10:49 UTC
50a5aad implemented global strictPopulate option 23 November 2021, 18:09:06 UTC
447afbc Update document.js 23 November 2021, 17:52:51 UTC
7c7b807 Update document.js 23 November 2021, 17:52:26 UTC
f20623d rough draft 22 November 2021, 22:04:54 UTC
8529c05 add 22 November 2021, 19:22:38 UTC
83a89f9 Merge pull request #10996 from jonchurch/patch-1 docs: fix default value of strictQuery 22 November 2021, 18:37:55 UTC
af228eb Merge pull request #10990 from orgads/mongo-4.2 chore: upgrade to mongodb driver 4.2.0 22 November 2021, 18:32:56 UTC
8920bf2 Merge branch 'master' into 6.1 20 November 2021, 20:07:34 UTC
f829022 test: fix test name re: #10974 20 November 2021, 20:07:11 UTC
79f70c6 Merge pull request #10989 from mohd-akram/fix-populate-type fix(index.d.ts): make populate type param optional 19 November 2021, 23:01:26 UTC
9dfa3fc fix(document): throw VersionError if saving a document with version bump and document isn't found Fix #10974 19 November 2021, 22:46:53 UTC
2fc6413 linter fixes 19 November 2021, 22:29:05 UTC
c0ff527 Update index.test.js 19 November 2021, 22:25:22 UTC
bfe2671 created shorthand with barebones test 19 November 2021, 22:12:22 UTC
c499025 parent will now return document if there is no parent 19 November 2021, 20:34:05 UTC
ed3271b Merge pull request #10988 from steve1337/patch-1 fix(index.d.ts): Allow model creation with instance methods 19 November 2021, 20:24:46 UTC
a024e52 Merge pull request #10982 from eltociear/patch-1 chore: fix typo in model.js 19 November 2021, 20:16:15 UTC
45a06e1 fix(document): catch errors in `required` functions Fix #10968 19 November 2021, 19:59:40 UTC
42ff338 test(document): repro #10968 19 November 2021, 19:59:28 UTC
79c8a35 static sync indexes 19 November 2021, 19:00:42 UTC
6a1f56b docs: fix default value of strictQuery 19 November 2021, 15:17:54 UTC
f024075 chore: update sponsors 18 November 2021, 22:48:58 UTC
23af51c chore: update sponsors 18 November 2021, 22:47:25 UTC
3dc15b3 docs: update helloclub logo 18 November 2021, 22:44:19 UTC
77f8487 working test + connection.syncIndexes implementation 18 November 2021, 22:38:51 UTC
b579739 chore: upgrade to mongodb driver 4.2.0 18 November 2021, 10:54:38 UTC
52bdad7 fix(index.d.ts): make populate type param optional 18 November 2021, 09:50:04 UTC
3bab780 fix(index.d.ts): Allow model creation with instance methods When using mongoose w/ typescript this comment explains how to create Schema and Model with instance methods: https://github.com/Automattic/mongoose/issues/10358#issuecomment-861779692 ``` import { Schema, Model, createConnection } from 'mongoose' interface ITestModel { name: string } interface InstanceMethods { iMethod1: (param1: string) => string iMethod2: (param1: string) => string } interface TestModel extends Model<ITestModel, {}, InstanceMethods> { sMethod1: (param1: string) => string sMethod2: (param1: string) => string } const ModelSchema = new Schema<ITestModel, TestModel, undefined, InstanceMethods>({ // <-- add `InstanceMethods` here name: String }) ModelSchema.statics.sMethod1 = function() { this.sMethod2('test') } ModelSchema.statics.sMethod2 = function() {} ModelSchema.methods.iMethod1 = function() { this.iMethod2("test") } ModelSchema.methods.iMethod2 = function() { } // create lazy connection object to connect later const connection = createConnection() export const TestModelCompiled = connection.model<ITestModel, TestModel>("testModel", ModelSchema) const modelInstance = new TestModelCompiled() modelInstance.iMethod1('test') TestModelCompiled.sMethod1('test') ``` However due to the change made in this commit: https://github.com/Automattic/mongoose/commit/fefebb35065f7d85850b77656484d538aa4d612d The above mentioned code won't compile. The error occurs on this line: `export const TestModelCompiled = connection.model<ITestModel, TestModel>("testModel", ModelSchema)` Output in VSCode (v1.62.2): ``` No overload matches this call. Overload 1 of 3, '(name: string, schema?: Schema<ITestModel, TestModel, {}, {}>, collection?: string, skipInit?: boolean): TestModel', gave the following error. Argument of type 'Schema<ITestModel, TestModel, undefined, InstanceMethods>' is not assignable to parameter of type 'Schema<ITestModel, TestModel, {}, {}>'. Type '{}' is missing the following properties from type 'InstanceMethods': iMethod1, iMethod2 Overload 2 of 3, '(name: string, schema?: Schema<any, Model<any, any, any>, undefined, {}>, collection?: string, skipInit?: boolean): TestModel', gave the following error. Argument of type 'Schema<ITestModel, TestModel, undefined, InstanceMethods>' is not assignable to parameter of type 'Schema<any, Model<any, any, any>, undefined, {}>'. Type '{}' is not assignable to type 'InstanceMethods'.ts(2769) const ModelSchema: Schema<ITestModel, TestModel, undefined, InstanceMethods> ``` 18 November 2021, 06:27:07 UTC
f37577d fix(connection): clone schema when passing a schema from a different copy of Mongoose to `Connection#model()` Fix #10904 17 November 2021, 22:38:08 UTC
cc0c929 chore: fix typo in model.js recieve -> receive 17 November 2021, 14:11:26 UTC
97434b8 fix(query): handle `orFail()` with `replaceOne()` Fix #10963 15 November 2021, 19:39:23 UTC
f8e2463 chore: release 6.0.13 15 November 2021, 18:59:03 UTC
be82e50 Merge pull request #10972 from Automattic/chore-bump-deps Bump dev dependencies that Tidelift says aren't approved 15 November 2021, 18:25:33 UTC
eb35df5 docs(typescript): add quick guide to virtuals in TypeScript Fix #10754 15 November 2021, 18:24:43 UTC
9e499f7 chore: update mocha, typescript 12 November 2021, 22:00:05 UTC
056dfc5 chore: update pug and marked, looks like no issues in docs 12 November 2021, 21:54:54 UTC
055b154 chore: update chalk, cheerio, eslint 12 November 2021, 21:44:23 UTC
8120c8f fix(index.d.ts): rename `EnforceDocument` -> `HydratedDocument`, export HydratedDocument for easier typing for users Fix #10843 12 November 2021, 21:40:03 UTC
577b604 docs(aggregate): remove `exec()` from AggregationCursor example, no longer correct for Mongoose 6 Fix #10862 12 November 2021, 21:06:41 UTC
cd277a7 fix(path): add check to avoid flattening dotted paths on Mongoose docs, improve error when flattening dotted paths causes conflicts Fix #10825 12 November 2021, 17:00:24 UTC
81b851b chore: update sponsors 10 November 2021, 03:26:37 UTC
317b35b fix(index.d.ts): handle maps in TypeScript schema definitions Fix #10838 10 November 2021, 03:22:51 UTC
b019a56 style: fix lint 06 November 2021, 18:46:33 UTC
779f5bb Merge pull request #10630 from canac/reduce-projection Support removing fields from projections 06 November 2021, 18:45:59 UTC
fc18d83 Merge pull request #10961 from saeidasadi/aggregate-unionWith add unionWith method to aggregate 06 November 2021, 18:45:07 UTC
85a56ea Merge pull request #10951 from StefanoA1/patch-2 Fix Schema's clone function typing 06 November 2021, 18:41:29 UTC
d2b4791 Merge pull request #10958 from PuneetGopinath/patch-1 docs(document.js): fix link leading to old github pages site 06 November 2021, 18:39:40 UTC
20d1485 fix: correct CR comments 06 November 2021, 18:36:53 UTC
da678cb Merge pull request #10955 from mohd-akram/mongodb-4.1.4 chore: upgrade to mongodb driver 4.1.4 06 November 2021, 18:35:02 UTC
2b267cb fix(schema): handle functions with accidental `type` properties in schema definitions Fix #10807 06 November 2021, 18:30:03 UTC
b21a3d2 test(schema): repro #10807 06 November 2021, 18:29:49 UTC
2b94bac add unionWith method to aggregate 06 November 2021, 13:23:40 UTC
dbf9b52 apply review 05 November 2021, 13:18:19 UTC
5bc7c02 docs(document.js): fix link leading to old github pages site 05 November 2021, 01:09:47 UTC
10a4c6c fix(index.d.ts): add `strictQuery` global option Fix #10933 04 November 2021, 21:57:07 UTC
c4a8b4c chore: add tidelift alignment workflow 04 November 2021, 21:43:52 UTC
3f56534 chore: upgrade to mongodb driver 4.1.4 04 November 2021, 16:28:31 UTC
5107f2b fix(document): allows validating doc again if pre validate errors out Fix #10830 03 November 2021, 22:37:23 UTC
d2a0648 Merge branch 'master' of github.com:Automattic/mongoose 03 November 2021, 20:55:54 UTC
e91153c style: fix lint 03 November 2021, 20:55:46 UTC
back to top