Skip to content

Commit 0741366

Browse files
committed
Merge branch 'master' into vkarpov15/gh-13874
2 parents 75dc4a1 + d7c832e commit 0741366

File tree

6 files changed

+23
-12
lines changed

6 files changed

+23
-12
lines changed

.mocharc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ reporter: spec # better to identify failing / slow tests than "dot"
22
ui: bdd # explicitly setting, even though it is mocha default
33
require:
44
- test/mocha-fixtures.js
5+
extension:
6+
- test.js
7+
watch-files:
8+
- test/**/*.js

.npmignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,13 @@ webpack.base.config.js
4747
notes.md
4848
list.out
4949

50-
eslintrc.json
50+
# config files
51+
lgtm.yml
52+
.mocharc.yml
53+
.eslintrc.js
54+
.markdownlint-cli2.cjs
55+
tsconfig.json
56+
57+
# scripts
58+
scripts/
59+
tools/

lib/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ Query.prototype.setOptions = function(options, overwrite) {
16801680

16811681
const printRawResultDeprecationWarning = util.deprecate(
16821682
function printRawResultDeprecationWarning() {},
1683-
'The `rawResult` option for Mongoose queries is deprecated. Use `includeResultMetadata: false` as a replacement for `rawResult: true`.'
1683+
'The `rawResult` option for Mongoose queries is deprecated. Use `includeResultMetadata: true` as a replacement for `rawResult: true`.'
16841684
);
16851685

16861686
/*!

package.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
],
2020
"license": "MIT",
2121
"dependencies": {
22-
"bson": "^5.4.0",
22+
"bson": "^5.5.0",
2323
"kareem": "2.5.1",
2424
"mongodb": "5.9.0",
2525
"mpath": "0.9.0",
@@ -39,7 +39,6 @@
3939
"axios": "1.1.3",
4040
"babel-loader": "8.2.5",
4141
"benchmark": "2.1.4",
42-
"bluebird": "3.7.2",
4342
"broken-link-checker": "^0.7.8",
4443
"buffer": "^5.6.0",
4544
"cheerio": "1.0.0-rc.12",
@@ -130,14 +129,6 @@
130129
},
131130
"homepage": "https://mongoosejs.com",
132131
"browser": "./dist/browser.umd.js",
133-
"mocha": {
134-
"extension": [
135-
"test.js"
136-
],
137-
"watch-files": [
138-
"test/**/*.js"
139-
]
140-
},
141132
"config": {
142133
"mongodbMemoryServer": {
143134
"disablePostinstall": true

types/models.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ declare module 'mongoose' {
3232
PopulateOption,
3333
SessionOption {
3434
limit?: number;
35+
// @deprecated, use includeResultMetadata instead
3536
rawResult?: boolean;
37+
includeResultMetadata?: boolean;
3638
ordered?: boolean;
3739
lean?: boolean;
3840
throwOnValidationError?: boolean;

types/query.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,14 @@ declare module 'mongoose' {
124124
overwriteDiscriminatorKey?: boolean;
125125
projection?: ProjectionType<DocType>;
126126
/**
127+
* @deprecated use includeResultMetadata instead.
127128
* if true, returns the raw result from the MongoDB driver
128129
*/
129130
rawResult?: boolean;
131+
/**
132+
* if ture, includes meta data for the result from the MongoDB driver
133+
*/
134+
includeResultMetadata?: boolean;
130135
readPreference?: string | mongodb.ReadPreferenceMode;
131136
/**
132137
* An alias for the `new` option. `returnOriginal: false` is equivalent to `new: true`.

0 commit comments

Comments
 (0)