Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 59c7d78

Browse files
author
Steffan
committed
Merge branch 'release/1.3.6' into develop
2 parents aadc9ad + ea80f37 commit 59c7d78

File tree

7 files changed

+144
-150
lines changed

7 files changed

+144
-150
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ $ npm install vue-resource
1818
```
1919

2020
### CDN
21-
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/vue-resource@1.3.5), [unpkg](https://unpkg.com/vue-resource@1.3.5) or [cdnjs](https://cdnjs.com/libraries/vue-resource).
21+
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/vue-resource@1.3.6), [unpkg](https://unpkg.com/vue-resource@1.3.6) or [cdnjs](https://cdnjs.com/libraries/vue-resource).
2222
```html
23-
<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.3.5"></script>
23+
<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.3.6"></script>
2424
```
2525

2626
## Example

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-resource",
33
"main": "dist/vue-resource.js",
4-
"version": "1.3.5",
4+
"version": "1.3.6",
55
"description": "The HTTP client for Vue.js",
66
"homepage": "https://github.com/pagekit/vue-resource",
77
"license": "MIT",

dist/vue-resource.common.js

Lines changed: 46 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-resource v1.3.5
2+
* vue-resource v1.3.6
33
* https://github.com/pagekit/vue-resource
44
* Released under the MIT License.
55
*/
@@ -12,7 +12,7 @@
1212

1313
var RESOLVED = 0;
1414
var REJECTED = 1;
15-
var PENDING = 2;
15+
var PENDING = 2;
1616

1717
function Promise$1(executor) {
1818

@@ -78,9 +78,9 @@ Promise$1.race = function race(iterable) {
7878
});
7979
};
8080

81-
var p$1 = Promise$1.prototype;
81+
var p = Promise$1.prototype;
8282

83-
p$1.resolve = function resolve(x) {
83+
p.resolve = function resolve(x) {
8484
var promise = this;
8585

8686
if (promise.state === PENDING) {
@@ -121,7 +121,7 @@ p$1.resolve = function resolve(x) {
121121
}
122122
};
123123

124-
p$1.reject = function reject(reason) {
124+
p.reject = function reject(reason) {
125125
var promise = this;
126126

127127
if (promise.state === PENDING) {
@@ -135,7 +135,7 @@ p$1.reject = function reject(reason) {
135135
}
136136
};
137137

138-
p$1.notify = function notify() {
138+
p.notify = function notify() {
139139
var promise = this;
140140

141141
nextTick(function () {
@@ -169,7 +169,7 @@ p$1.notify = function notify() {
169169
});
170170
};
171171

172-
p$1.then = function then(onResolved, onRejected) {
172+
p.then = function then(onResolved, onRejected) {
173173
var promise = this;
174174

175175
return new Promise$1(function (resolve, reject) {
@@ -178,7 +178,7 @@ p$1.then = function then(onResolved, onRejected) {
178178
});
179179
};
180180

181-
p$1.catch = function (onRejected) {
181+
p.catch = function (onRejected) {
182182
return this.then(undefined, onRejected);
183183
};
184184

@@ -217,14 +217,14 @@ PromiseObj.race = function (iterable, context) {
217217
return new PromiseObj(Promise.race(iterable), context);
218218
};
219219

220-
var p = PromiseObj.prototype;
220+
var p$1 = PromiseObj.prototype;
221221

222-
p.bind = function (context) {
222+
p$1.bind = function (context) {
223223
this.context = context;
224224
return this;
225225
};
226226

227-
p.then = function (fulfilled, rejected) {
227+
p$1.then = function (fulfilled, rejected) {
228228

229229
if (fulfilled && fulfilled.bind && this.context) {
230230
fulfilled = fulfilled.bind(this.context);
@@ -237,7 +237,7 @@ p.then = function (fulfilled, rejected) {
237237
return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);
238238
};
239239

240-
p.catch = function (rejected) {
240+
p$1.catch = function (rejected) {
241241

242242
if (rejected && rejected.bind && this.context) {
243243
rejected = rejected.bind(this.context);
@@ -246,15 +246,15 @@ p.catch = function (rejected) {
246246
return new PromiseObj(this.promise.catch(rejected), this.context);
247247
};
248248

249-
p.finally = function (callback) {
249+
p$1.finally = function (callback) {
250250

251251
return this.then(function (value) {
252-
callback.call(this);
253-
return value;
254-
}, function (reason) {
255-
callback.call(this);
256-
return Promise.reject(reason);
257-
}
252+
callback.call(this);
253+
return value;
254+
}, function (reason) {
255+
callback.call(this);
256+
return Promise.reject(reason);
257+
}
258258
);
259259
};
260260

@@ -507,7 +507,7 @@ function parse(template) {
507507
return {
508508
vars: variables,
509509
expand: function expand(context) {
510-
return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
510+
return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) {
511511
if (expression) {
512512

513513
var operator = null, values = [];
@@ -518,7 +518,7 @@ function parse(template) {
518518
}
519519

520520
expression.split(/,/g).forEach(function (variable) {
521-
var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
521+
var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable);
522522
values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
523523
variables.push(tmp[1]);
524524
});
@@ -790,19 +790,19 @@ function xdrClient (request) {
790790
return new PromiseObj(function (resolve) {
791791

792792
var xdr = new XDomainRequest(), handler = function (ref) {
793-
var type = ref.type;
793+
var type = ref.type;
794794

795795

796-
var status = 0;
796+
var status = 0;
797797

798-
if (type === 'load') {
799-
status = 200;
800-
} else if (type === 'error') {
801-
status = 500;
802-
}
798+
if (type === 'load') {
799+
status = 200;
800+
} else if (type === 'error') {
801+
status = 500;
802+
}
803803

804-
resolve(request.respondWith(xdr.responseText, {status: status}));
805-
};
804+
resolve(request.respondWith(xdr.responseText, {status: status}));
805+
};
806806

807807
request.abort = function () { return xdr.abort(); };
808808

@@ -1035,19 +1035,18 @@ function xhrClient (request) {
10351035

10361036
var xhr = new XMLHttpRequest(), handler = function (event) {
10371037

1038-
var response = request.respondWith(
1038+
var response = request.respondWith(
10391039
'response' in xhr ? xhr.response : xhr.responseText, {
10401040
status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug
10411041
statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)
1042-
}
1043-
);
1042+
});
10441043

1045-
each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
1046-
response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
1047-
});
1044+
each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) {
1045+
response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));
1046+
});
10481047

1049-
resolve(response);
1050-
};
1048+
resolve(response);
1049+
};
10511050

10521051
request.abort = function () { return xhr.abort(); };
10531052

@@ -1111,10 +1110,9 @@ function nodeClient (request) {
11111110
client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {
11121111

11131112
var response = request.respondWith(resp.body, {
1114-
status: resp.statusCode,
1115-
statusText: trim(resp.statusMessage)
1116-
}
1117-
);
1113+
status: resp.statusCode,
1114+
statusText: trim(resp.statusMessage)
1115+
});
11181116

11191117
each(resp.headers, function (value, name) {
11201118
response.headers.set(name, value);
@@ -1226,7 +1224,7 @@ Headers.prototype.set = function set (name, value) {
12261224
this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];
12271225
};
12281226

1229-
Headers.prototype.append = function append (name, value){
1227+
Headers.prototype.append = function append (name, value) {
12301228

12311229
var list = this.map[getName(this.map, name)];
12321230

@@ -1237,11 +1235,11 @@ Headers.prototype.append = function append (name, value){
12371235
}
12381236
};
12391237

1240-
Headers.prototype.delete = function delete$1 (name){
1238+
Headers.prototype.delete = function delete$1 (name) {
12411239
delete this.map[getName(this.map, name)];
12421240
};
12431241

1244-
Headers.prototype.deleteAll = function deleteAll (){
1242+
Headers.prototype.deleteAll = function deleteAll () {
12451243
this.map = {};
12461244
};
12471245

@@ -1261,7 +1259,7 @@ function getName(map, name) {
12611259

12621260
function normalizeName(name) {
12631261

1264-
if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
1262+
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
12651263
throw new TypeError('Invalid character in header field name');
12661264
}
12671265

@@ -1359,11 +1357,11 @@ var Request = function Request(options$$1) {
13591357
}
13601358
};
13611359

1362-
Request.prototype.getUrl = function getUrl (){
1360+
Request.prototype.getUrl = function getUrl () {
13631361
return Url(this);
13641362
};
13651363

1366-
Request.prototype.getBody = function getBody (){
1364+
Request.prototype.getBody = function getBody () {
13671365
return this.body;
13681366
};
13691367

0 commit comments

Comments
 (0)