Skip to content

Commit 3a29c63

Browse files
committed
Merge pull request #124 from aisk/deprecated-warning
add deprecated warnings.
2 parents b62c6dc + 1f9f3bc commit 3a29c63

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

lib/bigquery.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@ module.exports = function(AV) {
99
* 部分函数仅在云引擎运行环境下有效。
1010
* </em></strong></p>
1111
*/
12-
AV.BigQuery = AV.Insight;
12+
Object.defineProperty(AV, "BigQuery", {
13+
get: function() {
14+
console.warn("AV.BigQuery is deprecated, please use AV.Insight instead.");
15+
return AV.Insight;
16+
},
17+
});
1318
};

lib/collection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ module.exports = function(AV) {
2727
* documentation</a>.</p>
2828
*/
2929
AV.Collection = function(models, options) {
30+
console.warn("AV.Collection is deprecated, please don't use it anymore.");
3031
options = options || {};
3132
if (options.comparator) {
3233
this.comparator = options.comparator;

lib/facebook.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ module.exports = function(AV) {
8080
* explicitly if this behavior is required by your application.
8181
*/
8282
init: function(options) {
83+
console.warn("AV.FacebookUtils is deprecated, please don't use it anymore.");
8384
if (typeof(FB) === 'undefined') {
8485
throw "The Facebook JavaScript SDK must be loaded before calling init.";
8586
}

lib/history.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ module.exports = function(AV) {
2121
* <p><strong><em>Available in the client SDK only.</em></strong></p>
2222
*/
2323
AV.History = function() {
24+
console.warn("AV.History is deprecated, please don't use it anymore.");
2425
this.handlers = [];
2526
_.bindAll(this, 'checkUrl');
2627
};

lib/router.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module.exports = function(AV) {
1616
* <p><strong><em>Available in the client SDK only.</em></strong></p>
1717
*/
1818
AV.Router = function(options) {
19+
console.warn("AV.Router is deprecated, please don't use it anymore.");
1920
options = options || {};
2021
if (options.routes) {
2122
this.routes = options.routes;

lib/view.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ module.exports = function(AV) {
1717
* <p><strong><em>Available in the client SDK only.</em></strong></p>
1818
*/
1919
AV.View = function(options) {
20+
console.warn("AV.View is deprecated, please don't use it anymore.");
2021
this.cid = _.uniqueId('view');
2122
this._configure(options || {});
2223
this._ensureElement();

0 commit comments

Comments
 (0)