Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Commit

Permalink
package.json modifications, bumping to 0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewimm committed May 1, 2015
1 parent 96bf10e commit 078592d
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 116 deletions.
93 changes: 37 additions & 56 deletions dist/parse-react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Parse + React
* v0.2.3
* v0.2.4
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ParseReact = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/*
Expand Down Expand Up @@ -142,6 +142,8 @@ var Delta = (function () {
function Delta(id, data, options) {
_classCallCheck(this, Delta);

this.__initializeProperties();

if (!(id instanceof Id)) {
throw new TypeError('Cannot create a Delta with an invalid target Id');
}
Expand All @@ -160,18 +162,6 @@ var Delta = (function () {
}

_createClass(Delta, [{
key: 'id',
value: undefined,
enumerable: true
}, {
key: 'map',
value: undefined,
enumerable: true
}, {
key: 'destroy',
value: undefined,
enumerable: true
}, {
key: 'merge',

/**
Expand All @@ -197,6 +187,13 @@ var Delta = (function () {

return this;
}
}, {
key: '__initializeProperties',
value: function __initializeProperties() {
this.id = undefined;
this.map = undefined;
this.destroy = undefined;
}
}]);

return Delta;
Expand Down Expand Up @@ -244,23 +241,23 @@ var Id = (function () {
function Id(className, objectId) {
_classCallCheck(this, Id);

this.__initializeProperties();

this.className = className;
this.objectId = objectId;
}

_createClass(Id, [{
key: 'className',
value: undefined,
enumerable: true
}, {
key: 'objectId',
value: undefined,
enumerable: true
}, {
key: 'toString',
value: function toString() {
return this.className + ':' + this.objectId;
}
}, {
key: '__initializeProperties',
value: function __initializeProperties() {
this.className = undefined;
this.objectId = undefined;
}
}], [{
key: 'fromString',
value: function fromString(str) {
Expand Down Expand Up @@ -629,24 +626,14 @@ var Mutation = (function () {
function Mutation(action, target, data) {
_classCallCheck(this, Mutation);

this.__initializeProperties();

this.action = action;
this.target = target;
this.data = data;
}

_createClass(Mutation, [{
key: 'action',
value: undefined,
enumerable: true
}, {
key: 'target',
value: undefined,
enumerable: true
}, {
key: 'data',
value: undefined,
enumerable: true
}, {
key: 'dispatch',
value: function dispatch(options) {
if (this.action === 'NOOP') {
Expand Down Expand Up @@ -741,6 +728,13 @@ var Mutation = (function () {
}
return new Delta(id, changes);
}
}, {
key: '__initializeProperties',
value: function __initializeProperties() {
this.action = undefined;
this.target = undefined;
this.data = undefined;
}
}]);

return Mutation;
Expand Down Expand Up @@ -1425,7 +1419,7 @@ function deepFetch(id, seen) {
var obj = {};
for (var attr in source) {
var sourceVal = source[attr];
if (sourceVal.__type === 'Pointer') {
if (typeof sourceVal === 'object' && sourceVal.__type === 'Pointer') {
var childId = new Id(sourceVal.className, sourceVal.objectId);
if (seen.indexOf(childId.toString()) < 0 && store[childId]) {
seen = seen.concat([childId.toString()]);
Expand Down Expand Up @@ -1620,6 +1614,7 @@ module.exports = ParsePatches;
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @flow
*/

'use strict';
Expand Down Expand Up @@ -1657,7 +1652,7 @@ function stringify(object) {
if (typeof object === 'string') {
return '"' + object.replace(/\|/g, '%|') + '"';
}
return object;
return object + '';
}
if (Array.isArray(object)) {
var copy = object.map(stringify);
Expand All @@ -1682,7 +1677,7 @@ function queryHash(query) {
throw new TypeError('Only a Parse Query can be hashed');
}
var where = flattenOrQueries(query._where || {});
var columns;
var columns = [];
var values = [];
var i;
if (Array.isArray(where)) {
Expand Down Expand Up @@ -2023,6 +2018,12 @@ var Subscription = (function () {
function Subscription(query) {
_classCallCheck(this, Subscription);

this.originalQuery = undefined;
this.pending = undefined;
this.subscribers = undefined;
this.resultSet = undefined;
this.observationCount = undefined;

// The query used to fetch results for this Subscription
this.originalQuery = query;
// Whether there is an outstanding AJAX request for results
Expand All @@ -2038,26 +2039,6 @@ var Subscription = (function () {
}

_createClass(Subscription, [{
key: 'originalQuery',
value: undefined,
enumerable: true
}, {
key: 'pending',
value: undefined,
enumerable: true
}, {
key: 'subscribers',
value: undefined,
enumerable: true
}, {
key: 'resultSet',
value: undefined,
enumerable: true
}, {
key: 'observationCount',
value: undefined,
enumerable: true
}, {
key: 'addSubscriber',

/**
Expand Down
4 changes: 2 additions & 2 deletions dist/parse-react.min.js

Large diffs are not rendered by default.

21 changes: 9 additions & 12 deletions lib/Delta.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ var Delta = (function () {
function Delta(id, data, options) {
_classCallCheck(this, Delta);

this.__initializeProperties();

if (!(id instanceof Id)) {
throw new TypeError('Cannot create a Delta with an invalid target Id');
}
Expand All @@ -59,18 +61,6 @@ var Delta = (function () {
}

_createClass(Delta, [{
key: 'id',
value: undefined,
enumerable: true
}, {
key: 'map',
value: undefined,
enumerable: true
}, {
key: 'destroy',
value: undefined,
enumerable: true
}, {
key: 'merge',

/**
Expand All @@ -96,6 +86,13 @@ var Delta = (function () {

return this;
}
}, {
key: '__initializeProperties',
value: function __initializeProperties() {
this.id = undefined;
this.map = undefined;
this.destroy = undefined;
}
}]);

return Delta;
Expand Down
16 changes: 8 additions & 8 deletions lib/Id.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ var Id = (function () {
function Id(className, objectId) {
_classCallCheck(this, Id);

this.__initializeProperties();

this.className = className;
this.objectId = objectId;
}

_createClass(Id, [{
key: 'className',
value: undefined,
enumerable: true
}, {
key: 'objectId',
value: undefined,
enumerable: true
}, {
key: 'toString',
value: function toString() {
return this.className + ':' + this.objectId;
}
}, {
key: '__initializeProperties',
value: function __initializeProperties() {
this.className = undefined;
this.objectId = undefined;
}
}], [{
key: 'fromString',
value: function fromString(str) {
Expand Down
21 changes: 9 additions & 12 deletions lib/Mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,14 @@ var Mutation = (function () {
function Mutation(action, target, data) {
_classCallCheck(this, Mutation);

this.__initializeProperties();

this.action = action;
this.target = target;
this.data = data;
}

_createClass(Mutation, [{
key: 'action',
value: undefined,
enumerable: true
}, {
key: 'target',
value: undefined,
enumerable: true
}, {
key: 'data',
value: undefined,
enumerable: true
}, {
key: 'dispatch',
value: function dispatch(options) {
if (this.action === 'NOOP') {
Expand Down Expand Up @@ -197,6 +187,13 @@ var Mutation = (function () {
}
return new Delta(id, changes);
}
}, {
key: '__initializeProperties',
value: function __initializeProperties() {
this.action = undefined;
this.target = undefined;
this.data = undefined;
}
}]);

return Mutation;
Expand Down
2 changes: 1 addition & 1 deletion lib/ObjectStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function deepFetch(id, seen) {
var obj = {};
for (var attr in source) {
var sourceVal = source[attr];
if (sourceVal.__type === 'Pointer') {
if (typeof sourceVal === 'object' && sourceVal.__type === 'Pointer') {
var childId = new Id(sourceVal.className, sourceVal.objectId);
if (seen.indexOf(childId.toString()) < 0 && store[childId]) {
seen = seen.concat([childId.toString()]);
Expand Down
5 changes: 3 additions & 2 deletions lib/QueryTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @flow
*/

'use strict';
Expand Down Expand Up @@ -55,7 +56,7 @@ function stringify(object) {
if (typeof object === 'string') {
return '"' + object.replace(/\|/g, '%|') + '"';
}
return object;
return object + '';
}
if (Array.isArray(object)) {
var copy = object.map(stringify);
Expand All @@ -80,7 +81,7 @@ function queryHash(query) {
throw new TypeError('Only a Parse Query can be hashed');
}
var where = flattenOrQueries(query._where || {});
var columns;
var columns = [];
var values = [];
var i;
if (Array.isArray(where)) {
Expand Down
26 changes: 6 additions & 20 deletions lib/Subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ var Subscription = (function () {
function Subscription(query) {
_classCallCheck(this, Subscription);

this.originalQuery = undefined;
this.pending = undefined;
this.subscribers = undefined;
this.resultSet = undefined;
this.observationCount = undefined;

// The query used to fetch results for this Subscription
this.originalQuery = query;
// Whether there is an outstanding AJAX request for results
Expand All @@ -91,26 +97,6 @@ var Subscription = (function () {
}

_createClass(Subscription, [{
key: 'originalQuery',
value: undefined,
enumerable: true
}, {
key: 'pending',
value: undefined,
enumerable: true
}, {
key: 'subscribers',
value: undefined,
enumerable: true
}, {
key: 'resultSet',
value: undefined,
enumerable: true
}, {
key: 'observationCount',
value: undefined,
enumerable: true
}, {
key: 'addSubscriber',

/**
Expand Down
Loading

0 comments on commit 078592d

Please sign in to comment.