Skip to content

Commit 96d28ff

Browse files
committed
Release v0.5.2 and updated dist.
1 parent f8df3ca commit 96d28ff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6372
-6308
lines changed

dist/av-core-mini.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/av-core.js

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(root) {
22
root.AV = root.AV || {};
3-
root.AV.VERSION = "js0.5.1";
3+
root.AV.VERSION = "js0.5.2";
44
}(this));
55

66
// Underscore.js 1.4.4
@@ -1257,9 +1257,9 @@
12571257
} else if (typeof(require) === 'function' && typeof(require.ensure) === 'undefined') {
12581258
try{
12591259
AV.localStorage = require('localStorage');
1260-
}catch(error){
1261-
AV.localStorage = require('./localStorage.js').localStorage;
1262-
}
1260+
}catch(error){
1261+
AV.localStorage = require('./localStorage.js').localStorage;
1262+
}
12631263
}
12641264

12651265
// Import AV's local copy of underscore.
@@ -3917,14 +3917,12 @@
39173917
func.call();
39183918
};
39193919
if (AV.Promise._isPromisesAPlusCompliant) {
3920-
if (typeof(window) !== 'undefined' && window.setTimeout) {
3921-
runLater = function(func) {
3922-
window.setTimeout(func, 0);
3923-
};
3924-
} else if (typeof(process) !== 'undefined' && process.nextTick) {
3920+
if (typeof(setImmediate) !== 'undefined' && _.isFunction(setImmediate)) {
3921+
runLater = setImmediate;
3922+
} else if (typeof(setTimeout) !== 'undefined' && _.isFunction(setTimeout)) {
39253923
runLater = function(func) {
3926-
process.nextTick(func);
3927-
};
3924+
setTimeout(func, 0);
3925+
}
39283926
}
39293927
}
39303928

@@ -5438,12 +5436,26 @@
54385436
* Fetch the model from the server. If the server's representation of the
54395437
* model differs from its current attributes, they will be overriden,
54405438
* triggering a <code>"change"</code> event.
5439+
* @param {Object} fetchOptions Optional options to set 'keys' and
5440+
* 'include' option.
5441+
* @param {Object} options Optional Backbone-like options object to be
5442+
* passed in to set.
54415443
* @return {AV.Promise} A promise that is fulfilled when the fetch
54425444
* completes.
54435445
*/
5444-
fetch: function(options) {
5446+
fetch: function() {
5447+
var options = null;
5448+
var fetchOptions = {};
5449+
if(arguments.length === 1) {
5450+
options = arguments[0];
5451+
} else if(arguments.length === 2) {
5452+
fetchOptions = arguments[0];
5453+
options = arguments[1];
5454+
}
5455+
54455456
var self = this;
5446-
var request = AV._request("classes", this.className, this.id, 'GET');
5457+
var request = AV._request("classes", this.className, this.id, 'GET',
5458+
fetchOptions);
54475459
return request.then(function(response, status, xhr) {
54485460
self._finishFetch(self.parse(response, status, xhr), true);
54495461
return self;
@@ -7692,6 +7704,17 @@
76927704
return this;
76937705
},
76947706

7707+
/**
7708+
* Add a constraint to the query that requires a particular
7709+
* <strong>array</strong> key's length to be equal to the provided value.
7710+
* @param {String} key The array key to check.
7711+
* @param value The length value.
7712+
* @return {AV.Query} Returns the query, so you can chain this call.
7713+
*/
7714+
sizeEqualTo: function(key, value) {
7715+
this._addCondition(key, "$size", value);
7716+
},
7717+
76957718
/**
76967719
* Add a constraint to the query that requires a particular key's value to
76977720
* be not equal to the provided value.
@@ -8022,7 +8045,7 @@
80228045
if(this._order)
80238046
this._order += ',-' + key;
80248047
else
8025-
this._order = key;
8048+
this._order = '-' + key;
80268049
return key;
80278050
},
80288051

dist/av-mini.js

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/av.js

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(root) {
22
root.AV = root.AV || {};
3-
root.AV.VERSION = "js0.5.1";
3+
root.AV.VERSION = "js0.5.2";
44
}(this));
55

66
// Underscore.js 1.4.4
@@ -1257,9 +1257,9 @@
12571257
} else if (typeof(require) === 'function' && typeof(require.ensure) === 'undefined') {
12581258
try{
12591259
AV.localStorage = require('localStorage');
1260-
}catch(error){
1261-
AV.localStorage = require('./localStorage.js').localStorage;
1262-
}
1260+
}catch(error){
1261+
AV.localStorage = require('./localStorage.js').localStorage;
1262+
}
12631263
}
12641264

12651265
// Import AV's local copy of underscore.
@@ -3917,14 +3917,12 @@
39173917
func.call();
39183918
};
39193919
if (AV.Promise._isPromisesAPlusCompliant) {
3920-
if (typeof(window) !== 'undefined' && window.setTimeout) {
3921-
runLater = function(func) {
3922-
window.setTimeout(func, 0);
3923-
};
3924-
} else if (typeof(process) !== 'undefined' && process.nextTick) {
3920+
if (typeof(setImmediate) !== 'undefined' && _.isFunction(setImmediate)) {
3921+
runLater = setImmediate;
3922+
} else if (typeof(setTimeout) !== 'undefined' && _.isFunction(setTimeout)) {
39253923
runLater = function(func) {
3926-
process.nextTick(func);
3927-
};
3924+
setTimeout(func, 0);
3925+
}
39283926
}
39293927
}
39303928

@@ -5438,12 +5436,26 @@
54385436
* Fetch the model from the server. If the server's representation of the
54395437
* model differs from its current attributes, they will be overriden,
54405438
* triggering a <code>"change"</code> event.
5439+
* @param {Object} fetchOptions Optional options to set 'keys' and
5440+
* 'include' option.
5441+
* @param {Object} options Optional Backbone-like options object to be
5442+
* passed in to set.
54415443
* @return {AV.Promise} A promise that is fulfilled when the fetch
54425444
* completes.
54435445
*/
5444-
fetch: function(options) {
5446+
fetch: function() {
5447+
var options = null;
5448+
var fetchOptions = {};
5449+
if(arguments.length === 1) {
5450+
options = arguments[0];
5451+
} else if(arguments.length === 2) {
5452+
fetchOptions = arguments[0];
5453+
options = arguments[1];
5454+
}
5455+
54455456
var self = this;
5446-
var request = AV._request("classes", this.className, this.id, 'GET');
5457+
var request = AV._request("classes", this.className, this.id, 'GET',
5458+
fetchOptions);
54475459
return request.then(function(response, status, xhr) {
54485460
self._finishFetch(self.parse(response, status, xhr), true);
54495461
return self;
@@ -7692,6 +7704,17 @@
76927704
return this;
76937705
},
76947706

7707+
/**
7708+
* Add a constraint to the query that requires a particular
7709+
* <strong>array</strong> key's length to be equal to the provided value.
7710+
* @param {String} key The array key to check.
7711+
* @param value The length value.
7712+
* @return {AV.Query} Returns the query, so you can chain this call.
7713+
*/
7714+
sizeEqualTo: function(key, value) {
7715+
this._addCondition(key, "$size", value);
7716+
},
7717+
76957718
/**
76967719
* Add a constraint to the query that requires a particular key's value to
76977720
* be not equal to the provided value.
@@ -8022,7 +8045,7 @@
80228045
if(this._order)
80238046
this._order += ',-' + key;
80248047
else
8025-
this._order = key;
8048+
this._order = '-' + key;
80268049
return key;
80278050
},
80288051

-185 KB
Binary file not shown.
185 KB
Binary file not shown.

dist/js-sdk-api-docs-0.5.1.tar.gz

-215 KB
Binary file not shown.

dist/js-sdk-api-docs-0.5.2.tar.gz

216 KB
Binary file not shown.

dist/js-sdk-api-docs/files.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ <h2><a href="symbols/src/lib_cloud.js.html">lib/cloud.js</a></h2>
304304
</div>
305305
<div class="fineprint" style="clear:both">
306306

307-
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Fri Apr 24 2015 18:57:59 GMT+0800 (CST)
307+
Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> 2.4.0 on Tue May 12 2015 17:56:58 GMT+0800 (CST)
308308
</div>
309309
</body>
310310
</html>

dist/js-sdk-api-docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ <h2><a href="symbols/avosExpressHttpsRedirect.html">avosExpressHttpsRedirect</a>
553553

554554
</div>
555555
<div class="fineprint" style="clear:both">
556-
Documentation generated by <a href="https://leancloud.cn" target="_blankt">LeanCloud.cn</a> 2.4.0 on Fri Apr 24 2015 18:57:59 GMT+0800 (CST)
556+
Documentation generated by <a href="https://leancloud.cn" target="_blankt">LeanCloud.cn</a> 2.4.0 on Tue May 12 2015 17:56:58 GMT+0800 (CST)
557557
</div>
558558
</body>
559559
</html>

0 commit comments

Comments
 (0)