From 1906d84a7ceb284af6e13132f82d933ebc2a42f7 Mon Sep 17 00:00:00 2001 From: jacobawenger Date: Wed, 5 Nov 2014 15:44:24 -0800 Subject: [PATCH] Bumped Firebase dependency to 2.0.0 --- bower.json | 4 ++-- changelog.txt | 2 ++ examples/commentsBox/bower.json | 2 +- examples/todoApp/bower.json | 2 +- examples/todoApp/index.html | 2 +- examples/todoApp/js/todoAppFirebaseExplicit.js | 4 ++-- examples/todoApp/js/todoAppFirebaseImplicit.js | 4 ++-- package.json | 5 ++--- tests/specs/reactfire.spec.js | 10 +++++----- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/bower.json b/bower.json index 26f96d78..e7940415 100644 --- a/bower.json +++ b/bower.json @@ -32,8 +32,8 @@ "changelog.txt" ], "dependencies": { - "react": "^0.11.1", - "firebase": "1.1.x" + "react": "0.12.x", + "firebase": "2.0.x" }, "devDependencies": { "jasmine": "~2.0.0" diff --git a/changelog.txt b/changelog.txt index e69de29b..3124476d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -0,0 +1,2 @@ +feature - Added optional cancel callback to `bindAsObject()` and `bindAsArray()` to handle cases where reading from Firebase fails. +feature - Upgraded Firebase dependency to 2.0.x. diff --git a/examples/commentsBox/bower.json b/examples/commentsBox/bower.json index 087b334e..0df3bb21 100644 --- a/examples/commentsBox/bower.json +++ b/examples/commentsBox/bower.json @@ -1,7 +1,7 @@ { "name": "commentsBox", "description": "react.js comment tutorial updated for ReactFire mixin", - "version": "0.1.6", + "version": "0.4.0", "homepage": "https://github.com/llad/ReactFire", "authors": [ "Mark Woodall " diff --git a/examples/todoApp/bower.json b/examples/todoApp/bower.json index a63c4e31..539745c0 100644 --- a/examples/todoApp/bower.json +++ b/examples/todoApp/bower.json @@ -1,7 +1,7 @@ { "name": "todoApp", "description": "ReactFireMixin Todo app demo", - "version": "0.1.6", + "version": "0.4.0", "main": "index.html", "license": "MIT", "authors": [ diff --git a/examples/todoApp/index.html b/examples/todoApp/index.html index 389ef7ea..ace1be88 100644 --- a/examples/todoApp/index.html +++ b/examples/todoApp/index.html @@ -51,4 +51,4 @@

React + ReactFire

- \ No newline at end of file + diff --git a/examples/todoApp/js/todoAppFirebaseExplicit.js b/examples/todoApp/js/todoAppFirebaseExplicit.js index 12e94c35..1d217560 100644 --- a/examples/todoApp/js/todoAppFirebaseExplicit.js +++ b/examples/todoApp/js/todoAppFirebaseExplicit.js @@ -16,7 +16,7 @@ var TodoApp2 = React.createClass({ componentWillMount: function() { this.firebaseRef = new Firebase("https://ReactFireTodoApp.firebaseio.com/items/"); - this.firebaseRef.limit(25).on("child_added", function(dataSnapshot) { + this.firebaseRef.limitToLast(25).on("child_added", function(dataSnapshot) { // Only keep track of 25 items at a time if (this.items.length === 25) { this.items.splice(0, 1); @@ -60,4 +60,4 @@ var TodoApp2 = React.createClass({ } }); -React.renderComponent(, document.getElementById("todoApp2")); \ No newline at end of file +React.renderComponent(, document.getElementById("todoApp2")); diff --git a/examples/todoApp/js/todoAppFirebaseImplicit.js b/examples/todoApp/js/todoAppFirebaseImplicit.js index 204d99cb..38a95f9e 100644 --- a/examples/todoApp/js/todoAppFirebaseImplicit.js +++ b/examples/todoApp/js/todoAppFirebaseImplicit.js @@ -17,7 +17,7 @@ var TodoApp3 = React.createClass({ componentWillMount: function() { var firebaseRef = new Firebase("https://ReactFireTodoApp.firebaseio.com/items/"); - this.bindAsArray(firebaseRef.limit(25), "items"); + this.bindAsArray(firebaseRef.limitToLast(25), "items"); }, onChange: function(e) { @@ -47,4 +47,4 @@ var TodoApp3 = React.createClass({ } }); -React.renderComponent(, document.getElementById("todoApp3")); \ No newline at end of file +React.renderComponent(, document.getElementById("todoApp3")); diff --git a/package.json b/package.json index 015cfa77..778f01f5 100644 --- a/package.json +++ b/package.json @@ -32,9 +32,8 @@ "package.json" ], "dependencies": { - "envify": "^2.0.0", - "firebase": "1.1.x", - "react": "^0.11.1" + "firebase": "2.0.x", + "react": "0.12.x" }, "devDependencies": { "coveralls": "^2.11.1", diff --git a/tests/specs/reactfire.spec.js b/tests/specs/reactfire.spec.js index a9d6ce2c..8f6541b2 100644 --- a/tests/specs/reactfire.spec.js +++ b/tests/specs/reactfire.spec.js @@ -85,7 +85,7 @@ describe("ReactFireMixin Tests:", function() { componentWillMount: function() { var _this = this; - expect(function() { _this.bindAsArray(firebaseRef.limit(10), "items"); }).not.toThrow(); + expect(function() { _this.bindAsArray(firebaseRef.limitToLast(10), "items"); }).not.toThrow(); }, render: function() { @@ -126,7 +126,7 @@ describe("ReactFireMixin Tests:", function() { mixins: [ReactFireMixin], componentWillMount: function() { - this.bindAsArray(firebaseRef.limit(2), "items"); + this.bindAsArray(firebaseRef.limitToLast(2), "items"); }, componentDidMount: function() { @@ -225,7 +225,7 @@ describe("ReactFireMixin Tests:", function() { componentWillMount: function() { var _this = this; - expect(function() { _this.bindAsObject(firebaseRef.limit(10), "items"); }).not.toThrow(); + expect(function() { _this.bindAsObject(firebaseRef.limitToLast(10), "items"); }).not.toThrow(); }, render: function() { @@ -266,7 +266,7 @@ describe("ReactFireMixin Tests:", function() { mixins: [ReactFireMixin], componentWillMount: function() { - this.bindAsObject(firebaseRef.limit(2), "items"); + this.bindAsObject(firebaseRef.limitToLast(2), "items"); }, componentDidMount: function() { @@ -367,7 +367,7 @@ describe("ReactFireMixin Tests:", function() { var _this = this; validBindVars.forEach(function(validBindVar) { - _this.bindAsArray(firebaseRef.limit(10), validBindVar); + _this.bindAsArray(firebaseRef.limitToLast(10), validBindVar); expect(function() { _this.unbind(validBindVar); }).not.toThrow(); }); },