Skip to content

Commit

Permalink
Merge pull request #1 from LearnBoost/master
Browse files Browse the repository at this point in the history
Merging latest
  • Loading branch information
JedWatson committed Oct 20, 2013
2 parents 02bcc02 + 79dc6b2 commit 799560f
Show file tree
Hide file tree
Showing 78 changed files with 3,328 additions and 1,209 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ docs/*.json
docs/source/_docs
docs/*.html
tags
test/triage/*.js
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- 0.6
- 0.8
- 0.10
services:
Expand Down
136 changes: 136 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,89 @@

3.7.4 (unstable) / 2013-10-01
=============================

* updated; mquery to 0.3.2
* removed; mongoose.Error.DocumentError (never used)
* added; custom error msgs for built-in validators #747
* added; discriminator support #1647 #1003 [j](https://github.com/j)
* added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
* fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
* fixed; repopulating modified populated paths #1697
* fixed; doc.equals() when _id option is set to false #1687
* fixed; strict mode warnings #1686
* fixed; $near GeoJSON casting #1683
* fixed; nearSphere GeoJSON query builder
* fixed; population field selection w/ strings #1669
* docs; custom validator messages
* docs; 10gen -> MongoDB
* docs; add Date method caveats #1598
* docs; more validation details
* website; add "show code" for properties
* website; move "show code" links down
* tests; refactor 1703
* tests; add test generator
* tests; validate formatMessage() throws

3.7.3 (unstable) / 2013-08-22
=============================

* updated; warn when using an unstable version
* updated; mquery to 0.3.1
* updated; mocha to 1.12.0
* updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
* changed; no longer offically supporting node 0.6.x
* added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
* added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
* added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
* added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
* fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
* fixed; handle another versioning edge case #1520
* fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
* fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
* fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
* fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
* fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
* fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
* make; suppress warning msg in test
* docs; state which branch is stable/unstable
* docs; mention that middleware does not run on Models
* tests; add script for continuously running tests
* tests; fixed versioning tests
* benchmarks; updated for pull requests

3.7.2 (unstable) / 2013-08-15
==================

* fixed; model.remove() removes only what is necessary #1649
* fixed; update() now only runs with cb or explicit true #1644
* tests; race conditions in tests
* website; update guide

3.7.1 (unstable) / 2013-08-13
=============================

* updated; driver to 1.3.18 (fixes memory leak)
* added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
* added; promise support to model.mapReduce()
* added; promise support to model.ensureIndexes()
* added; promise support to model.populate()
* fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
* fixed; model.update "overwrite" option works as documented
* fixed; query#remove() works as documented
* fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
* fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
* fixed; benchmarks to actually output valid json
* tests; added for nested and/or queries
* tests; close some test connections
* tests; validate db contents
* tests; remove .only
* tests; close some test connections
* tests; validate db contents
* tests; remove .only
* tests; replace deprecated method names
* tests; convert id to string
* docs; promise.fulfill()

3.7.0 (unstable) / 2013-08-05
===================

Expand Down Expand Up @@ -41,6 +126,43 @@
* website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
* examples; improved and expanded [ebensing](https://github.com/ebensing)

3.6.20 (stable) / 2013-09-23
===================

* fixed; repopulating modified populated paths #1697
* fixed; doc.equals w/ _id false #1687
* fixed; strict mode warning #1686
* docs; near/nearSphere

3.6.19 (stable) / 2013-09-04
==================

* fixed; population field selection w/ strings #1669
* docs; Date method caveats #1598

3.6.18 (stable) / 2013-08-22
===================

* updated; warn when using an unstable version of mongoose
* updated; mocha to 1.12.0
* updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
* fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
* fixed; properly exclude subdocument fields #1280 [ebensing](https://github.com/ebensing)
* fixed; cast error in findAndModify #1643 [aheuermann](https://github.com/aheuermann)
* website; update guide
* website; added documentation for safe:false and versioning interaction
* docs; mention that middleware dont run on Models
* docs; fix indexes link
* make; suppress warning msg in test
* tests; moar

3.6.17 / 2013-08-13
===================

* updated; driver to 1.3.18 (fixes memory leak)
* fixed; casting ref docs on creation #1606
* docs; query options

3.6.16 / 2013-08-08
===================

Expand Down Expand Up @@ -365,6 +487,20 @@
* updated; mpath to 0.1.1
* updated; docs

3.5.16 / 2013-08-13
===================

* updated; driver to 1.3.18

3.5.15 / 2013-07-26
==================

* updated; sliced to 0.0.5
* updated; driver to 1.3.12
* fixed; regression in Query#count() due to driver change
* tests; fixed timeouts
* tests; handle differing test uris

3.5.14 / 2013-05-15
===================

Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ DOCFILE = docs/source/_docs
STABLE_BRANCH = 3.6.x

test:
@node test/dropdb.js
@./node_modules/.bin/mocha $(T) --async-only $(TESTS)
@node test/dropdb.js
@MONGOOSE_DISABLE_STABILITY_WARNING=1 node test/dropdb.js
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) --async-only $(TESTS)
@MONGOOSE_DISABLE_STABILITY_WARNING=1 node test/dropdb.js

test-short:
@node test/dropdb.js
@./node_modules/.bin/mocha $(T) -g LONG -i --async-only $(TESTS)
@node test/dropdb.js
@MONGOOSE_DISABLE_STABILITY_WARNING=1 node test/dropdb.js
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) -g LONG -i --async-only $(TESTS)
@MONGOOSE_DISABLE_STABILITY_WARNING=1 node test/dropdb.js

test-long:
@./node_modules/.bin/mocha $(T) -g LONG --async-only $(TESTS)
@MONGOOSE_DISABLE_STABILITY_WARNING=1 ./node_modules/.bin/mocha $(T) -g LONG --async-only $(TESTS)

docs: ghpages merge_stable docclean gendocs
docs_all: docs_unstable docs
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Mongoose is a [MongoDB](http://www.mongodb.org/) object modeling tool designed t
- [Stack Overflow](http://stackoverflow.com/questions/tagged/mongoose)
- [bug reports](https://github.com/learnboost/mongoose/issues/)
- [help forum](http://groups.google.com/group/mongoose-orm)
- [10gen support](http://www.mongodb.org/display/DOCS/Technical+Support)
- [MongoDB support](http://www.mongodb.org/display/DOCS/Technical+Support)
- (irc) #mongoosejs on freenode

## Plugins
Expand All @@ -32,6 +32,10 @@ View all 90+ [contributors](https://github.com/learnboost/mongoose/graphs/contri
First install [node.js](http://nodejs.org/) and [mongodb](http://www.mongodb.org/downloads). Then:

$ npm install mongoose

## Stablility

The current stable branch is [3.6.x](https://github.com/LearnBoost/mongoose/tree/3.6.x). New (unstable) development always occurs on the [master](https://github.com/LearnBoost/mongoose/tree/master) branch.

## Overview

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchjs/casting.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ suite.add('Casting - Embedded Docs - 0 Docs', {
}
})
.on('cycle', function (evt) {
if (process.env.MONGOOSE_DEV) {
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {
console.log(String(evt.target));
}
}).on('complete', function () {
if (!process.env.MONGOOSE_DEV) {
if (!process.env.MONGOOSE_DEV && !process.env.PULL_REQUEST) {
var outObj = {};
this.forEach(function (item) {
var out = {};
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/benchjs/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
}
})
.on('cycle', function (evt) {
if (process.env.MONGOOSE_DEV) {
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {
console.log(String(evt.target));
}
}).on('complete', function () {
closeDB();
if (!process.env.MONGOOSE_DEV) {
if (!process.env.MONGOOSE_DEV && !process.env.PULL_REQUEST) {
var outObj = {};
this.forEach(function (item) {
var out = {};
Expand Down
26 changes: 5 additions & 21 deletions benchmarks/benchjs/insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,9 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
var blogpost = db.collection('blogpost');

function closeDB() {
var dm = false;
var dd = false;
User.remove(function () {
dm && mongoose.disconnect();
dm = true;
});
user.remove({}, function (err) {
if (err) throw err;
dd && db.close();
dd = true;
});
BlogPost.remove(function () {
dm && mongoose.disconnect();
dm = true;
});
blogpost.remove({}, function (err) {
if (err) throw err;
dd && db.close();
dd = true;
mongoose.connection.db.dropDatabase(function () {
mongoose.disconnect();
process.exit();
});
}

Expand Down Expand Up @@ -154,12 +138,12 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
}
})
.on('cycle', function (evt) {
if (process.env.MONGOOSE_DEV) {
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {
console.log(String(evt.target));
}
}).on('complete', function () {
closeDB();
if (!process.env.MONGOOSE_DEV) {
if (!process.env.MONGOOSE_DEV && !process.env.PULL_REQUEST) {
var outObj = {};
this.forEach(function (item) {
var out = {};
Expand Down
30 changes: 7 additions & 23 deletions benchmarks/benchjs/multiop.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,25 +153,9 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
}

function closeDB() {
var dm = false;
var dd = false;
User.remove(function () {
dm && mongoose.disconnect();
dm = true;
});
user.remove({}, function (err) {
if (err) throw err;
dd && db.close();
dd = true;
});
BlogPost.remove(function () {
dm && mongoose.disconnect();
dm = true;
});
blogpost.remove({}, function (err) {
if (err) throw err;
dd && db.close();
dd = true;
mongoose.connection.db.dropDatabase(function () {
mongoose.disconnect();
process.exit();
});
}

Expand Down Expand Up @@ -324,7 +308,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
}
}
}
}).add('Multi-Op - Mongoose - Embedded Docs - Read/write/update', {
}).add('Multi-Op - Mongoose - Embedded Docs - Read-write-update', {
defer : true,
fn : function (deferred) {
var count = 150;
Expand Down Expand Up @@ -354,7 +338,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
}
}
}
}).add('Multi-Op - Driver - Embedded Docs - Read/write/update', {
}).add('Multi-Op - Driver - Embedded Docs - Read-write-update', {
defer : true,
fn : function (deferred) {
var count = 150;
Expand Down Expand Up @@ -386,12 +370,12 @@ mongoose.connect('mongodb://localhost/mongoose-bench', function (err) {
}
})
.on('cycle', function (evt) {
if (process.env.MONGOOSE_DEV) {
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {
console.log(String(evt.target));
}
}).on('complete', function () {
closeDB();
if (!process.env.MONGOOSE_DEV) {
if (!process.env.MONGOOSE_DEV && !process.env.PULL_REQUEST) {
var outObj = {};
this.forEach(function (item) {
var out = {};
Expand Down
5 changes: 3 additions & 2 deletions benchmarks/benchjs/population.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ mongoose.connect('mongodb://localhost/mongoose-bench-pop', function (err) {
// just a bit simpler...
mongoose.connection.db.dropDatabase(function () {
mongoose.disconnect();
process.exit();
});
}

Expand Down Expand Up @@ -336,12 +337,12 @@ mongoose.connect('mongodb://localhost/mongoose-bench-pop', function (err) {
})

.on('cycle', function (evt) {
if (process.env.MONGOOSE_DEV) {
if (process.env.MONGOOSE_DEV || process.env.PULL_REQUEST) {
console.log(String(evt.target));
}
}).on('complete', function () {
closeDB();
if (!process.env.MONGOOSE_DEV) {
if (!process.env.MONGOOSE_DEV && !process.env.PULL_REQUEST) {
var outObj = {};
this.forEach(function (item) {
var out = {};
Expand Down
Loading

0 comments on commit 799560f

Please sign in to comment.