Skip to content

Commit 17a5d5a

Browse files
committed
Merge branch 'master' of github.com:Automattic/mongoose
2 parents 041be89 + 57834e2 commit 17a5d5a

File tree

15 files changed

+35
-33
lines changed

15 files changed

+35
-33
lines changed

benchmarks/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function run(label, fn) {
7575
res.heapUsed = used.heapUsed - started.heapUsed;
7676
log('change: ', res);
7777
a = res = used = time = started = start = total = i = null;
78-
// console.error(((used.vsize - started.vsize) / 1048576)+' MB');
7978
}
8079

8180
run('string', function() {

benchmarks/validate.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// require('nodetime').profile();
2-
31
'use strict';
42

53
const mongoose = require('../../mongoose');
@@ -25,8 +23,7 @@ const breakfastSchema = new Schema({
2523
}
2624
});
2725
const Breakfast = mongoose.model('Breakfast', breakfastSchema);
28-
// const time1 = (new Date - start1);
29-
// console.error('reading from disk and parsing JSON took %d ms', time1);
26+
3027
const badBreakfast = new Breakfast({
3128
eggs: 2,
3229
bacon: 0,
@@ -38,23 +35,7 @@ const goodBreakfast = new Breakfast({
3835
bacon: 1,
3936
drink: 'Tea'
4037
})
41-
// const start = new Date;
42-
// const total = 10000000;
43-
// let i = total;
44-
// let len;
45-
46-
// for (i = 0, len = total; i < len; ++i) {
47-
48-
// const goodBreakfast = new Breakfast({
49-
// eggs: 6,
50-
// bacon: 1,
51-
// drink: 'Tea'
52-
// })
53-
// goodBreakfast.validateSync();
54-
// }
5538

56-
// const time = (new Date - start) / 1000;
57-
// console.error('took %d seconds for %d docs (%d dps)', time, total, total / time);
5839
const suite = new Benchmark.Suite()
5940
suite
6041
.add('invalid async', {

examples/statics/statics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async function run() {
2424
const result = await Person.findPersonByName('bill');
2525

2626
console.log(result);
27-
cleanup();
27+
await cleanup();
2828
}
2929

3030
async function cleanup() {

lib/browserDocument.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const isObject = require('./helpers/isObject');
1717
* Document constructor.
1818
*
1919
* @param {Object} obj the values to set
20+
* @param {Object} schema
2021
* @param {Object} [fields] optional object containing the fields which were selected in the query returning this document and any populated paths data
2122
* @param {Boolean} [skipId] bool, should we auto create an ObjectId _id
2223
* @inherits NodeJS EventEmitter https://nodejs.org/api/events.html#events_class_events_eventemitter

lib/cursor/AggregationCursor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const util = require('util');
2626
* Use [`Aggregate#cursor()`](/docs/api.html#aggregate_Aggregate-cursor) instead.
2727
*
2828
* @param {Aggregate} agg
29-
* @param {Object} options
3029
* @inherits Readable
3130
* @event `cursor`: Emitted when the cursor is created
3231
* @event `error`: Emitted when an error occurred

lib/helpers/query/castFilterPath.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ module.exports = function castFilterPath(query, schematype, val) {
4141
}
4242
continue;
4343
}
44-
// cast(schematype.caster ? schematype.caster.schema : schema, nested, options, context);
4544
} else {
4645
val[$cond] = schematype.castForQueryWrapper({
4746
$conditional: $cond,

lib/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,7 @@ Model.discriminators;
18851885
* ####Note:
18861886
* Only translate arguments of object type anything else is returned raw
18871887
*
1888-
* @param {Object} raw fields/conditions that may contain aliased keys
1888+
* @param {Object} fields fields/conditions that may contain aliased keys
18891889
* @return {Object} the translated 'pure' fields/conditions
18901890
*/
18911891
Model.translateAliases = function translateAliases(fields) {

lib/schema/SubdocumentPath.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = SubdocumentPath;
2626
* Single nested subdocument SchemaType constructor.
2727
*
2828
* @param {Schema} schema
29-
* @param {String} key
29+
* @param {String} path
3030
* @param {Object} options
3131
* @inherits SchemaType
3232
* @api public

lib/schema/array.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const emptyOpts = Object.freeze({});
3232
* @param {String} key
3333
* @param {SchemaType} cast
3434
* @param {Object} options
35+
* @param {Object} schemaOptions
3536
* @inherits SchemaType
3637
* @api public
3738
*/

lib/schema/documentarray.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ let Subdocument;
3030
* @param {String} key
3131
* @param {Schema} schema
3232
* @param {Object} options
33+
* @param {Object} schemaOptions
3334
* @inherits SchemaArray
3435
* @api public
3536
*/

0 commit comments

Comments
 (0)