Skip to content

Commit 1bfbb4e

Browse files
committed
Updated dependencies and minor fixes.
Stable Version 1.0.0-alpha.5.
1 parent b1fb4da commit 1bfbb4e

6 files changed

+18
-6
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##### 1.0.0-alpha.5 - 05 December 2014
2+
3+
Updated dependencies. Now safely making copies of the `options` passed into methods
4+
15
##### 1.0.0-alpha.4 - 01 December 2014
26

37
###### Backwards compatible API changes

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-http",
33
"description": "http adapter for js-data.",
4-
"version": "1.0.0-alpha.4",
4+
"version": "1.0.0-alpha.5",
55
"homepage": "http://www.js-data.io/docs/dshttpadapter",
66
"repository": {
77
"type": "git",

dist/js-data-http.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @author Jason Dobry <[email protected]>
33
* @file js-data-http.js
4-
* @version 1.0.0-alpha.4 - Homepage <http://www.js-data.io/docs/dshttpadapter>
4+
* @version 1.0.0-alpha.5 - Homepage <http://www.js-data.io/docs/dshttpadapter>
55
* @copyright (c) 2014 Jason Dobry
66
* @license MIT <https://github.com/js-data/js-data-http/blob/master/LICENSE>
77
*
@@ -1459,6 +1459,7 @@ dsHttpAdapterPrototype.getPath = function (method, resourceConfig, id, options)
14591459
dsHttpAdapterPrototype.HTTP = function (config) {
14601460
var _this = this;
14611461
var start = new Date();
1462+
config = DSUtils.copy(config);
14621463
config = deepMixIn(config, _this.defaults.httpConfig);
14631464
if (_this.defaults.forceTrailingSlash && config.url[config.url.length - 1] !== '/') {
14641465
config.url += '/';
@@ -1539,6 +1540,7 @@ dsHttpAdapterPrototype.findAll = function (resourceConfig, params, options) {
15391540
var _this = this;
15401541
options = options || {};
15411542
options.params = options.params || {};
1543+
options.params = DSUtils.copy(options.params);
15421544
if (params) {
15431545
params = _this.defaults.queryTransform(resourceConfig, params);
15441546
deepMixIn(options.params, params);
@@ -1579,6 +1581,7 @@ dsHttpAdapterPrototype.updateAll = function (resourceConfig, attrs, params, opti
15791581
var _this = this;
15801582
options = options || {};
15811583
options.params = options.params || {};
1584+
options.params = DSUtils.copy(options.params);
15821585
if (params) {
15831586
params = _this.defaults.queryTransform(resourceConfig, params);
15841587
deepMixIn(options.params, params);
@@ -1607,6 +1610,7 @@ dsHttpAdapterPrototype.destroyAll = function (resourceConfig, params, options) {
16071610
var _this = this;
16081611
options = options || {};
16091612
options.params = options.params || {};
1613+
options.params = DSUtils.copy(options.params);
16101614
if (params) {
16111615
params = _this.defaults.queryTransform(resourceConfig, params);
16121616
deepMixIn(options.params, params);

dist/js-data-http.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-http",
33
"description": "http adapter for js-data.",
4-
"version": "1.0.0-alpha.4",
4+
"version": "1.0.0-alpha.5",
55
"homepage": "http://www.js-data.io/docs/dshttpadapter",
66
"repository": {
77
"type": "git",
@@ -46,6 +46,6 @@
4646
"dependencies": {
4747
"axios": "0.4.x",
4848
"mout": "0.11.0",
49-
"js-data": "^1.0.0-alpha.5-1"
49+
"js-data": "^1.0.0-alpha.5-7"
5050
}
5151
}

src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ dsHttpAdapterPrototype.getPath = function (method, resourceConfig, id, options)
7777
dsHttpAdapterPrototype.HTTP = function (config) {
7878
var _this = this;
7979
var start = new Date();
80+
config = DSUtils.copy(config);
8081
config = deepMixIn(config, _this.defaults.httpConfig);
8182
if (_this.defaults.forceTrailingSlash && config.url[config.url.length - 1] !== '/') {
8283
config.url += '/';
@@ -157,6 +158,7 @@ dsHttpAdapterPrototype.findAll = function (resourceConfig, params, options) {
157158
var _this = this;
158159
options = options || {};
159160
options.params = options.params || {};
161+
options.params = DSUtils.copy(options.params);
160162
if (params) {
161163
params = _this.defaults.queryTransform(resourceConfig, params);
162164
deepMixIn(options.params, params);
@@ -197,6 +199,7 @@ dsHttpAdapterPrototype.updateAll = function (resourceConfig, attrs, params, opti
197199
var _this = this;
198200
options = options || {};
199201
options.params = options.params || {};
202+
options.params = DSUtils.copy(options.params);
200203
if (params) {
201204
params = _this.defaults.queryTransform(resourceConfig, params);
202205
deepMixIn(options.params, params);
@@ -225,6 +228,7 @@ dsHttpAdapterPrototype.destroyAll = function (resourceConfig, params, options) {
225228
var _this = this;
226229
options = options || {};
227230
options.params = options.params || {};
231+
options.params = DSUtils.copy(options.params);
228232
if (params) {
229233
params = _this.defaults.queryTransform(resourceConfig, params);
230234
deepMixIn(options.params, params);

0 commit comments

Comments
 (0)