Skip to content

Commit 1cc2293

Browse files
authored
Merge branch 'master' into updateDox
2 parents 6a10d4f + 51ea808 commit 1cc2293

File tree

19 files changed

+379
-196
lines changed

19 files changed

+379
-196
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,5 @@ index.html
5252

5353
# yarn package-lock
5454
yarn.lock
55+
56+
examples/ecommerce-netlify-functions/.netlify/state.json

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
6.4.3 / 2022-07-05
2+
==================
3+
* fix(document): handle validating deeply nested subdocuments underneath nested paths with required: false #12021
4+
* fix(types): infer schematype type from schema paths when calling `SchemaType.path()` #11987
5+
* fix(types): add $top and $topN aggregation operators #12053
6+
* fix(types): clean up a couple of issues with $add and $ifNull #12017
7+
* fix(types): allow $cond with $in #12028
8+
* docs: add path level descending index example in docs #12023 [MitchellCash](https://github.com/MitchellCash)
9+
* docs: add Buffer, Decimal128, Map to docs #11971
10+
111
6.4.2 / 2022-07-01
212
==================
313
* fix: keep autoIndex & autoCreate as true by default if read preference is primaryPreferred #11976

benchmarks/benchjs/casting.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Comments.add({
2424
title: String,
2525
date: Date,
2626
body: String,
27-
comments: [Comments]
27+
comments: [Comments],
2828
});
2929

3030
const BlogPost = new Schema({
@@ -34,7 +34,7 @@ const BlogPost = new Schema({
3434
date: Date,
3535
meta: {
3636
date: Date,
37-
visitors: Number
37+
visitors: Number,
3838
},
3939
published: Boolean,
4040
mixed: {},
@@ -44,15 +44,15 @@ const BlogPost = new Schema({
4444
comments: [Comments],
4545
def: {
4646
type: String,
47-
default: 'kandinsky'
48-
}
47+
default: 'kandinsky',
48+
},
4949
});
5050

5151
const commentData = {
5252
title: 'test comment',
5353
date: new Date(),
5454
body: 'this be some crazzzyyyyy text that would go in a comment',
55-
comments: [{ title: 'second level', date: new Date(), body: 'texttt' }]
55+
comments: [{ title: 'second level', date: new Date(), body: 'texttt' }],
5656
};
5757

5858
const blogData = {
@@ -62,16 +62,16 @@ const blogData = {
6262
date: new Date(),
6363
meta: {
6464
date: new Date(),
65-
visitors: 9001
65+
visitors: 9001,
6666
},
6767
published: true,
6868
mixed: {
69-
thisIsRandom: true
69+
thisIsRandom: true,
7070
},
7171
numbers: [1, 2, 7, 10, 23432],
7272
tags: ['test', 'BENCH', 'things', 'more things'],
7373
def: 'THANGS!!!',
74-
comments: []
74+
comments: [],
7575
};
7676

7777
const blogData10 = utils.clone(blogData);
@@ -100,35 +100,35 @@ suite
100100
const BlogPost = mongoose.model('BlogPost');
101101
const bp = new BlogPost();
102102
bp.init(blogData);
103-
}
103+
},
104104
})
105105
.add('Casting - Embedded Docs - 10 Docs', {
106106
fn: function () {
107107
const BlogPost = mongoose.model('BlogPost');
108108
const bp = new BlogPost();
109109
bp.init(blogData10);
110-
}
110+
},
111111
})
112112
.add('Casting - Embedded Docs - 100 Docs', {
113113
fn: function () {
114114
const BlogPost = mongoose.model('BlogPost');
115115
const bp = new BlogPost();
116116
bp.init(blogData100);
117-
}
117+
},
118118
})
119119
.add('Casting - Embedded Docs - 1000 Docs', {
120120
fn: function () {
121121
const BlogPost = mongoose.model('BlogPost');
122122
const bp = new BlogPost();
123123
bp.init(blogData1000);
124-
}
124+
},
125125
})
126126
.add('Casting - Embedded Docs - 10000 Docs', {
127127
fn: function () {
128128
const BlogPost = mongoose.model('BlogPost');
129129
const bp = new BlogPost();
130130
bp.init(blogData10000);
131-
}
131+
},
132132
})
133133
.on('cycle', function (evt) {
134134
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {

benchmarks/benchjs/delete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
6464
nData.likes = data.likes;
6565
nData.address = data.address;
6666
user.insertOne(nData, function (err, res) {
67-
dIds.push(res.insertedIds);
67+
dIds.push(res.insertedId);
6868
--count || next();
6969
});
7070
}

0 commit comments

Comments
 (0)