Skip to content

Commit 945c80f

Browse files
committed
Stable Version 2.1.0.
Now requiring >= js-data 1.1.0 in order to use removeCircular.
1 parent a834640 commit 945c80f

File tree

7 files changed

+18
-8
lines changed

7 files changed

+18
-8
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##### 2.1.0 - 04 February 2015
2+
3+
Now requiring >= js-data 1.1.0 in order to use removeCircular to safely safe cyclic objects
4+
15
##### 2.0.0 - 03 February 2015
26

37
_Note:_ Please see the [js-data CHANGELOG](https://github.com/js-data/js-data/blob/master/CHANGELOG.md).

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"angular-mocks-1.3.2": "angular-mocks#1.3.2"
2929
},
3030
"dependencies": {
31-
"js-data": ">=1.0.0",
31+
"js-data": ">=1.1.0",
3232
"angular": ">=1.0.3"
3333
}
3434
}

dist/js-data-angular.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @author Jason Dobry <[email protected]>
33
* @file js-data-angular.js
4-
* @version 2.0.0 - Homepage <http://www.js-data.io/js-data-angular/>
4+
* @version 2.1.0 - Homepage <http://www.js-data.io/js-data-angular/>
55
* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/>
66
* @license MIT <https://github.com/js-data/js-data-angular/blob/master/LICENSE>
77
*
@@ -464,6 +464,9 @@
464464
config.url += '/';
465465
}
466466
config.method = config.method.toUpperCase();
467+
if (typeof config.data === 'object') {
468+
config.data = DSUtils.removeCircular(config.data);
469+
}
467470

468471
function logResponse(data) {
469472
var str = start.toUTCString() + ' - ' + data.config.method.toUpperCase() + ' ' + data.config.url + ' - ' + data.status + ' ' + (new Date().getTime() - start.getTime()) + 'ms';

dist/js-data-angular.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-angular",
33
"description": "Angular wrapper for js-data.",
4-
"version": "2.0.0",
4+
"version": "2.1.0",
55
"homepage": "http://www.js-data.io/docs/js-data-angular",
66
"repository": {
77
"type": "git",
@@ -46,6 +46,6 @@
4646
},
4747
"dependencies": {
4848
"mout": "0.11.0",
49-
"js-data": ">=1.0.0"
49+
"js-data": ">=1.1.0"
5050
}
5151
}

src/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@
454454
config.url += '/';
455455
}
456456
config.method = config.method.toUpperCase();
457+
if (typeof config.data === 'object') {
458+
config.data = DSUtils.removeCircular(config.data);
459+
}
457460

458461
function logResponse(data) {
459462
var str = start.toUTCString() + ' - ' + data.config.method.toUpperCase() + ' ' + data.config.url + ' - ' + data.status + ' ' + (new Date().getTime() - start.getTime()) + 'ms';

test/datastore/async_methods/save.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ describe('DS.save', function () {
118118
$rootScope.$apply();
119119

120120
DS.save('post', 5, { cacheResponse: false }).then(function (post) {
121-
assert.deepEqual(post, {
121+
assert.deepEqual(DS.utils.toJson(post), DS.utils.toJson({
122122
random: 'stuff'
123-
}, 'should have the right response');
123+
}), 'should have the right response');
124124
assert.equal(lifecycle.beforeUpdate.callCount, 1, 'beforeUpdate should have been called');
125125
assert.equal(lifecycle.afterUpdate.callCount, 1, 'afterUpdate should have been called');
126126
assert.equal(lifecycle.beforeInject.callCount, 1, 'beforeInject should have been called only once');

0 commit comments

Comments
 (0)