Commit Graph

82 Commits

Author SHA1 Message Date
Hasan Tayyar BEŞİK
44bfd4f283 add test for Connection.openUri 2018-05-11 10:59:17 +02:00
Hasan Tayyar BEŞİK
b629667f8e types/mongoose version bump to 5.0.15 2018-05-11 10:59:00 +02:00
Hasan Tayyar BEŞİK
1762c042d8 open() is deprecated in mongoose >= 4.11.0
Breaking change in @Automattic/mongoose
 
dda165eebd (diff-259dec4414a400a6e895f16ff1d0ca3b)
2018-05-11 10:12:12 +02:00
Steffen K
74d3e6b86d [mongoose] Fix: The mongoose.pluralize(..) function now gets/sets the function to pluralize collection names (#25458)
* Update: function signature mongoose.pluralize(..)

* Update: mongoose version number to 5.0.14
2018-05-07 10:58:35 -07:00
Philip Andersson
ebf9f31259 Mongoose model init (#25530)
* Adding init method declaration on Model interface

* Test init method on Model
2018-05-04 13:49:48 -07:00
Leivince John
ef752bb731 Added dbName to connect to Mongodb Atlas Cluster (#25220) 2018-04-27 23:31:31 -07:00
Jarom Loveridge
05650a7853 Add models hash object. (#25078) 2018-04-18 11:26:14 -07:00
Jarom Loveridge
b244b1661a Add additional SSL configuration options. (#25079)
http://mongodb.github.io/node-mongodb-native/3.0/api/Server.html
2018-04-18 11:25:46 -07:00
Paul van Brenk
43dbe3703b Merge pull request #24737 from osenvosem/master
[Mongoose] Update pre hooks type definitions
2018-04-06 12:45:14 -07:00
Shenghan Gao
0104de2334 fix a typo 2018-04-05 10:23:58 -07:00
Sergei Samsonov
23361b3499 Update pre hooks type definitions 2018-04-05 16:28:11 +03:00
Shenghan Gao
919977b304 update Model.insertMany function signature according to doc
reference: http://mongoosejs.com/docs/api.html#insertmany_insertMany
2018-04-04 15:35:15 -07:00
Ethan Resnick
dac33e93f3 mongoose: remove unneeded union constituent from any | ... 2018-03-06 18:29:40 -05:00
Ethan Resnick
dc4147a0b6 mongoose: remove null from result type when doc must exist 2018-03-05 23:25:39 -05:00
Armando Aguirre
c92a51511b Merge pull request #24061 from simonxca/master
Mongoose: Remove simonxca from list of maintainers
2018-03-05 15:16:07 -08:00
Armando Aguirre
af7e8bdb8f Merge pull request #23777 from vologab/master
fix Model.remove, deleteOne and deleteMany definitions
2018-03-05 14:55:57 -08:00
Simon Xiong
51ce93f07c Remove simonxca from list of maintainers
Unfortunately don't have time to maintain these definitions.
2018-03-03 10:19:02 -08:00
Vladimir Bloshchitsyn
c73250cb66 fix Model.remove, deleteOne and deleteMany definitions 2018-03-03 20:41:56 +03:00
Benjamin Lichtman
876b210e03 Merge pull request #23643 from brendtumi/master
version: 5.0.3 usage: Model.aggregate().match()
2018-03-02 16:37:22 -08:00
Daniel Rosenwasser
da682e7777 Remove optionality in parameter.
349b267629/lib/model.js (L2803-L2805)
2018-03-02 00:23:27 -08:00
Benjamin Lichtman
79984e5750 Merge pull request #23682 from Alorel/patch-1
Update Query.lean()
2018-02-28 11:34:07 -08:00
Benjamin Lichtman
70dee7ef5a Merge pull request #23628 from ethanresnick/mongoose-patch
Mongoose: fix model.baseModelName
2018-02-26 09:37:56 -08:00
Tümay Çeber
fc80a44bfe requested changes 2018-02-16 13:34:40 +03:00
Art
6cd2cfa3ff Update index.d.ts
Make .lean() return Query<any> so we can properly cast it to whatever we need
2018-02-15 22:34:11 +00:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Tümay Çeber
ecfbd369d7 usage: Model.aggregate().match(), error: Expected 1-2 arguments, but got 0. 2018-02-14 16:19:04 +03:00
Ethan
4d5c4c7a97 mongoose: fix Model.baseModelName 2018-02-13 21:57:15 -05:00
Jendrik
d39db26c26 add 'throw' to the strict option for schemas 2018-02-12 15:14:46 +01:00
Andy
bef4d2b27d Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Mykola
cd92f62f15 Fix typo (#23277) 2018-01-31 12:20:20 -08:00
Art
ccdc539cc4 Add: Mongoose 5 types (#23070)
* move v4 types

* add newline-per-chained-call tslint rule to avoi having to refactor the entire test file

* mongoose 5 types

* update SchemaToObjectOptions

* reuse toObject definition, add it to schema options, remove retainKeyOrder

* add paths to mongoose-deep-populate

* rm a no longer supported createConnection signature

* Object -> any @ mongoose 4

* object ->any @ mongoose 5

* rm todo comment

* rm Mongoose thenable type

* Add changes between 4.7 and 5.0

* Add path to mongoose/v4 to all dependent projects

* fix dropDatabase() brainfart.

* Add more missing methods

* rm newline-chained-call rule from tslint

* Revert "Add path to mongoose/v4 to all dependent projects"

This reverts commit 162b8ad
2018-01-26 13:32:00 -08:00
Andrew Stiegmann
d512b1f5d1 Add usePushEach flag to Mongoose Schema Options (#23042)
In order for devs to be able to work around the issues described in
https://github.com/Automattic/mongoose/issues/5574 we need to be able
to supply the `usePushEach` flag to the Mongoose SchemaOptions. This
options functionality is described in
https://github.com/Automattic/mongoose/issues/4455 and is required for
anyone who modifies arrays inline who is using Mongoose 4 and MongoDB
3.6+

Testing:
  Copied changes to local project and verified compilation worked.
2018-01-19 10:15:29 -08:00
Andy
01d4dcdcd2 Fix 'no-dynamic-delete' lint failures (#22822) 2018-01-10 15:01:26 -08:00
Stefan
f40ab95d05 Updated Model types (#22532)
Updated the Mongoose Model type to include the new (updateOne)[http://mongoosejs.com/docs/api.html#model_Model.updateOne], (updateMany)[http://mongoosejs.com/docs/api.html#model_Model.updateMany], (deleteOne)[http://mongoosejs.com/docs/api.html#model_Model.deleteOne], (deleteMany)[http://mongoosejs.com/docs/api.html#model_Model.deleteMany] methods.
2018-01-02 12:27:49 -08:00
Paul van Brenk
bdd1f8a127 Merge pull request #22333 from kolya182/mongoose-readme-static-typo
mongoose: Fix typo for static methods
2017-12-28 11:55:04 -08:00
Paul van Brenk
2bb699e64b Merge pull request #22250 from simonxca/pre-mongoose
Mongoose: Use v3 function signature for schema pre method
2017-12-27 15:53:29 -08:00
Mykola Radchenko
1ff7302d0f mongoose: Fix typo for static methods 2017-12-19 20:43:41 -08:00
Arthur Ozga
161184f128 Merge pull request #21856 from simonxca/fix-mongoose
Set mongoose document id property to any
2017-12-19 16:10:13 -08:00
simonxca
5a4fc269cc Update comment on id property 2017-12-17 23:55:30 -08:00
simonxca
a9479a5c50 Use v3 function signature for pre method
Fixes #21938
The new signatures were confusing and caused some backwards breaking changes.
2017-12-16 19:08:26 -08:00
Gregor Yushinov
24ea09d1a5 Fixed connection options 2017-11-30 10:34:56 +01:00
simonxca
bf99493e11 Allow overriding id attribute 2017-11-29 22:13:11 -08:00
simonxca
7c0a078ce9 Remove type parameter and use object type 2017-11-22 19:41:51 -08:00
simonxca
13d444d6d1 Add generic type for lean method
Fixes #20874
2017-11-16 11:22:14 -08:00
simonxca
2a5a4ff2fd Add tests for mongoose child schema
Fixes #20331
2017-11-13 21:06:55 -08:00
Nathan Shively-Sanders
ff929fcd51 Merge pull request #21314 from Joge97/master
[mongoose] Fix types for SchemaDefinition
2017-11-13 15:33:07 -08:00
Joge
18ad4aba5a fix(Tests): fix implicit any error 2017-11-07 15:04:43 +01:00
Joge
d8914103a3 fix(SchemaDefinition): add missing Schema and SchemaType declarations 2017-11-07 13:46:50 +01:00
Gregor Yushinov
01be23749e One can set connection options on the object's root level now
All options which usually have been passed in the db/auth/server/replset object can now be set directly in the connection options. If you don't do so you get hints in the debug console. For reference see: https://github.com/Automattic/mongoose/blob/master/lib/drivers/node-mongodb-native/connection.js#L272
2017-11-05 02:49:22 +01:00
Daniel Hritzkiv
4e278d0f6d SchemaOptions.safe can also be an object
See: [safe docs](http://mongoosejs.com/docs/guide.html#safe)
2017-11-01 11:44:25 -04:00