Skip to content

Commit

Permalink
Merge branch 'master' into updateDox
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jul 8, 2022
2 parents 6a10d4f + 51ea808 commit 1cc2293
Show file tree
Hide file tree
Showing 19 changed files with 379 additions and 196 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -52,3 +52,5 @@ index.html

# yarn package-lock
yarn.lock

examples/ecommerce-netlify-functions/.netlify/state.json
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
6.4.3 / 2022-07-05
==================
* fix(document): handle validating deeply nested subdocuments underneath nested paths with required: false #12021
* fix(types): infer schematype type from schema paths when calling `SchemaType.path()` #11987
* fix(types): add $top and $topN aggregation operators #12053
* fix(types): clean up a couple of issues with $add and $ifNull #12017
* fix(types): allow $cond with $in #12028
* docs: add path level descending index example in docs #12023 [MitchellCash](https://github.com/MitchellCash)
* docs: add Buffer, Decimal128, Map to docs #11971

6.4.2 / 2022-07-01
==================
* fix: keep autoIndex & autoCreate as true by default if read preference is primaryPreferred #11976
Expand Down
26 changes: 13 additions & 13 deletions benchmarks/benchjs/casting.js
Expand Up @@ -24,7 +24,7 @@ Comments.add({
title: String,
date: Date,
body: String,
comments: [Comments]
comments: [Comments],
});

const BlogPost = new Schema({
Expand All @@ -34,7 +34,7 @@ const BlogPost = new Schema({
date: Date,
meta: {
date: Date,
visitors: Number
visitors: Number,
},
published: Boolean,
mixed: {},
Expand All @@ -44,15 +44,15 @@ const BlogPost = new Schema({
comments: [Comments],
def: {
type: String,
default: 'kandinsky'
}
default: 'kandinsky',
},
});

const commentData = {
title: 'test comment',
date: new Date(),
body: 'this be some crazzzyyyyy text that would go in a comment',
comments: [{ title: 'second level', date: new Date(), body: 'texttt' }]
comments: [{ title: 'second level', date: new Date(), body: 'texttt' }],
};

const blogData = {
Expand All @@ -62,16 +62,16 @@ const blogData = {
date: new Date(),
meta: {
date: new Date(),
visitors: 9001
visitors: 9001,
},
published: true,
mixed: {
thisIsRandom: true
thisIsRandom: true,
},
numbers: [1, 2, 7, 10, 23432],
tags: ['test', 'BENCH', 'things', 'more things'],
def: 'THANGS!!!',
comments: []
comments: [],
};

const blogData10 = utils.clone(blogData);
Expand Down Expand Up @@ -100,35 +100,35 @@ suite
const BlogPost = mongoose.model('BlogPost');
const bp = new BlogPost();
bp.init(blogData);
}
},
})
.add('Casting - Embedded Docs - 10 Docs', {
fn: function () {
const BlogPost = mongoose.model('BlogPost');
const bp = new BlogPost();
bp.init(blogData10);
}
},
})
.add('Casting - Embedded Docs - 100 Docs', {
fn: function () {
const BlogPost = mongoose.model('BlogPost');
const bp = new BlogPost();
bp.init(blogData100);
}
},
})
.add('Casting - Embedded Docs - 1000 Docs', {
fn: function () {
const BlogPost = mongoose.model('BlogPost');
const bp = new BlogPost();
bp.init(blogData1000);
}
},
})
.add('Casting - Embedded Docs - 10000 Docs', {
fn: function () {
const BlogPost = mongoose.model('BlogPost');
const bp = new BlogPost();
bp.init(blogData10000);
}
},
})
.on('cycle', function (evt) {
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchjs/delete.js
Expand Up @@ -64,7 +64,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
nData.likes = data.likes;
nData.address = data.address;
user.insertOne(nData, function (err, res) {
dIds.push(res.insertedIds);
dIds.push(res.insertedId);
--count || next();
});
}
Expand Down

0 comments on commit 1cc2293

Please sign in to comment.