Skip to content

Commit ea0c5af

Browse files
committed
Stable Version 0.5.0.
Closes #4. Closes #5.
1 parent aeeba88 commit ea0c5af

File tree

8 files changed

+606
-72
lines changed

8 files changed

+606
-72
lines changed

Diff for: CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
##### 0.5.0 - 10 July 2015
2+
3+
Upgraded dependencies
4+
5+
###### Backwards compatible API changes
6+
- #4 - Add support for loading relations in find()
7+
- #5 - Add support for loading relations in findAll()
8+
19
##### 0.4.0 - 02 July 2015
210

311
Stable Version 0.4.0

Diff for: Gruntfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ module.exports = function (grunt) {
4949
},
5050
externals: [
5151
'mout/string/underscore',
52+
'mout/array/unique',
5253
'mout/array/map',
5354
'js-data',
5455
'mongodb',

Diff for: dist/js-data-mongodb.js

+228-40
Large diffs are not rendered by default.

Diff for: mocha.start.js

+17-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33

44
var assert = require('chai').assert;
55
var mocha = require('mocha');
6-
var sinon = require('sinon');
76
var JSData = require('js-data');
87
JSData.DSUtils.Promise = require('bluebird');
98
var DSMongoDBAdapter = require('./');
109

11-
var adapter, store, DSUtils, DSErrors, User, Post, Comment;
10+
var adapter, store, DSUtils, DSErrors, Profile, User, Post, Comment;
1211

1312
var globals = module.exports = {
1413
fail: function (msg) {
@@ -34,7 +33,6 @@ var globals = module.exports = {
3433
}],
3534
TYPES_EXCEPT_FUNCTION: ['string', 123, 123.123, null, undefined, {}, [], true, false],
3635
assert: assert,
37-
sinon: sinon,
3836
adapter: undefined
3937
};
4038

@@ -57,6 +55,9 @@ beforeEach(function () {
5755
store.registerAdapter('mongo', adapter, { 'default': true });
5856
DSUtils = JSData.DSUtils;
5957
DSErrors = JSData.DSErrors;
58+
globals.Profile = global.Profile = Profile = store.defineResource({
59+
name: 'profile'
60+
});
6061
globals.User = global.User = User = store.defineResource({
6162
name: 'user',
6263
relations: {
@@ -65,6 +66,12 @@ beforeEach(function () {
6566
localField: 'posts',
6667
foreignKey: 'post'
6768
}
69+
},
70+
hasOne: {
71+
profile: {
72+
localField: 'profile',
73+
localKey: 'profileId'
74+
}
6875
}
6976
}
7077
});
@@ -115,7 +122,13 @@ afterEach(function (done) {
115122
globals.adapter = null;
116123
global.adapter = null;
117124

118-
adapter.destroyAll(User, {}).then(function () {
125+
adapter.destroyAll(Comment).then(function () {
126+
return adapter.destroyAll(Post);
127+
}).then(function () {
128+
return adapter.destroyAll(User);
129+
}).then(function () {
130+
return adapter.destroyAll(Profile);
131+
}).then(function () {
119132
done();
120133
}, done);
121134
});

Diff for: package.json

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-mongodb",
33
"description": "MongoDB adapter for js-data.",
4-
"version": "0.4.0",
4+
"version": "0.5.0",
55
"homepage": "http://www.js-data.io/docs/dsmongodbadapter",
66
"repository": {
77
"type": "git",
@@ -27,9 +27,9 @@
2727
"mongodb"
2828
],
2929
"devDependencies": {
30-
"babel-core": "5.6.15",
31-
"babel-loader": "5.2.2",
32-
"bluebird": "^2.9.30",
30+
"babel-core": "5.6.17",
31+
"babel-loader": "5.3.1",
32+
"bluebird": "2.9.33",
3333
"chai": "3.0.0",
3434
"grunt": "0.4.5",
3535
"grunt-contrib-watch": "0.6.1",
@@ -39,7 +39,6 @@
3939
"jit-grunt": "0.9.1",
4040
"jshint": "2.8.0",
4141
"jshint-loader": "0.8.3",
42-
"sinon": "1.14.1",
4342
"time-grunt": "1.2.1",
4443
"webpack-dev-server": "1.10.1"
4544
},

0 commit comments

Comments
 (0)