Socket
Socket
Sign inDemoInstall

parse

Package Overview
Dependencies
Maintainers
7
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

lib/browser/ParsePolygon.js

2

lib/browser/CoreManager.js

@@ -20,3 +20,3 @@ 'use strict';

LIVEQUERY_SERVER_URL: null,
VERSION: 'js' + '1.10.0',
VERSION: 'js' + '1.10.1',
APPLICATION_ID: null,

@@ -23,0 +23,0 @@ JAVASCRIPT_KEY: null,

@@ -25,2 +25,6 @@ 'use strict';

var _ParsePolygon = require('./ParsePolygon');
var _ParsePolygon2 = _interopRequireDefault(_ParsePolygon);
var _ParseObject = require('./ParseObject');

@@ -40,13 +44,2 @@

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function decode(value) {

@@ -90,2 +83,5 @@ if (value === null || (typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== 'object') {

}
if (value.__type === 'Polygon') {
return new _ParsePolygon2.default(value.coordinates);
}
var copy = {};

@@ -96,2 +92,11 @@ for (var k in value) {

return copy;
}
} /**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/

@@ -31,2 +31,6 @@ 'use strict';

var _ParsePolygon = require('./ParsePolygon');
var _ParsePolygon2 = _interopRequireDefault(_ParsePolygon);
var _ParseObject = require('./ParseObject');

@@ -46,15 +50,13 @@

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
var toString = Object.prototype.toString; /**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
var toString = Object.prototype.toString;
function encode(value, disallowObjects, forcePointers, seen) {

@@ -72,3 +74,3 @@ if (value instanceof _ParseObject2.default) {

}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2.default || value instanceof _ParseGeoPoint2.default || value instanceof _ParseRelation2.default) {
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2.default || value instanceof _ParseGeoPoint2.default || value instanceof _ParsePolygon2.default || value instanceof _ParseRelation2.default) {
return value.toJSON();

@@ -75,0 +77,0 @@ }

@@ -133,2 +133,3 @@ 'use strict';

Parse.GeoPoint = require('./ParseGeoPoint').default;
Parse.Polygon = require('./ParsePolygon').default;
Parse.Installation = require('./ParseInstallation').default;

@@ -135,0 +136,0 @@ Parse.Object = require('./ParseObject').default;

@@ -39,2 +39,6 @@ 'use strict';

var _ParsePolygon = require('./ParsePolygon');
var _ParsePolygon2 = _interopRequireDefault(_ParsePolygon);
var _ParseObject = require('./ParseObject');

@@ -57,3 +61,12 @@

*/
function quote(s) {
return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
}
/**
* Handles pre-populating the result data of a query with select fields,
* making sure that the data object contains keys for all objects that have
* been requested with a select, so that our cached state updates correctly.
*/
/**
* Copyright (c) 2015-present, Parse, LLC.

@@ -69,11 +82,2 @@ * All rights reserved.

function quote(s) {
return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
}
/**
* Handles pre-populating the result data of a query with select fields,
* making sure that the data object contains keys for all objects that have
* been requested with a select, so that our cached state updates correctly.
*/
function handleSelectResult(data, select) {

@@ -96,6 +100,8 @@ var serverDataMask = {};

// add keys if the expected data is missing
if (!obj[component]) {
obj[component] = index == arr.length - 1 ? undefined : {};
if (obj && !obj.hasOwnProperty(component)) {
obj[component] = undefined;
}
obj = obj[component];
if (obj !== undefined) {
obj = obj[component];
}

@@ -107,2 +113,3 @@ //add this path component to the server mask so we can fill it in later if needed

}
serverMask = serverMask[component];
}

@@ -124,4 +131,6 @@ });

for (var key in mask) {
//traverse into objects as needed
copyMissingDataWithMask(src[key], dest[key], mask[key], true);
if (dest[key] !== undefined && dest[key] !== null && src !== undefined && src !== null) {
//traverse into objects as needed
copyMissingDataWithMask(src[key], dest[key], mask[key], true);
}
}

@@ -1124,2 +1133,18 @@ };

/**
* Add a constraint to the query that requires a particular key's
* coordinates that contains a ParseGeoPoint
*
* @method polygonContains
* @param {String} key The key to be constrained.
* @param {Parse.GeoPoint} GeoPoint
* @return {Parse.Query} Returns the query, so you can chain this call.
*/
}, {
key: 'polygonContains',
value: function (key, point) {
return this._addCondition(key, '$geoIntersects', { '$point': point });
}
/** Query Orderings **/

@@ -1126,0 +1151,0 @@

@@ -7,4 +7,2 @@ 'use strict';

var _reactNativeImplementation = require('react-native/Libraries/react-native/react-native-implementation');
function _interopRequireDefault(obj) {

@@ -14,13 +12,21 @@ return obj && obj.__esModule ? obj : { default: obj };

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
// RN packager nonsense
var AsyncStorage = void 0; /**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
try {
// for React Native 0.43+
AsyncStorage = require('react-native/Libraries/react-native/react-native-implementation').AsyncStorage;
} catch (error) {
AsyncStorage = require('react-native/Libraries/react-native/react-native.js').AsyncStorage;
}
var StorageController = {

@@ -31,3 +37,3 @@ async: 1,

var p = new _ParsePromise2.default();
_reactNativeImplementation.AsyncStorage.getItem(path, function (err, value) {
AsyncStorage.getItem(path, function (err, value) {
if (err) {

@@ -43,3 +49,3 @@ p.reject(err);

var p = new _ParsePromise2.default();
_reactNativeImplementation.AsyncStorage.setItem(path, value, function (err) {
AsyncStorage.setItem(path, value, function (err) {
if (err) {

@@ -55,3 +61,3 @@ p.reject(err);

var p = new _ParsePromise2.default();
_reactNativeImplementation.AsyncStorage.removeItem(path, function (err) {
AsyncStorage.removeItem(path, function (err) {
if (err) {

@@ -66,8 +72,6 @@ p.reject(err);

clear: function () {
_reactNativeImplementation.AsyncStorage.clear();
AsyncStorage.clear();
}
};
// RN packager nonsense
module.exports = StorageController;

@@ -20,3 +20,3 @@ 'use strict';

LIVEQUERY_SERVER_URL: null,
VERSION: 'js' + '1.10.0',
VERSION: 'js' + '1.10.1',
APPLICATION_ID: null,

@@ -23,0 +23,0 @@ JAVASCRIPT_KEY: null,

@@ -25,2 +25,6 @@ 'use strict';

var _ParsePolygon = require('./ParsePolygon');
var _ParsePolygon2 = _interopRequireDefault(_ParsePolygon);
var _ParseObject = require('./ParseObject');

@@ -40,13 +44,2 @@

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
function decode(value) {

@@ -90,2 +83,5 @@ if (value === null || (typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== 'object') {

}
if (value.__type === 'Polygon') {
return new _ParsePolygon2.default(value.coordinates);
}
var copy = {};

@@ -96,2 +92,11 @@ for (var k in value) {

return copy;
}
} /**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/

@@ -31,2 +31,6 @@ 'use strict';

var _ParsePolygon = require('./ParsePolygon');
var _ParsePolygon2 = _interopRequireDefault(_ParsePolygon);
var _ParseObject = require('./ParseObject');

@@ -46,15 +50,13 @@

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
var toString = Object.prototype.toString; /**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
var toString = Object.prototype.toString;
function encode(value, disallowObjects, forcePointers, seen) {

@@ -72,3 +74,3 @@ if (value instanceof _ParseObject2.default) {

}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2.default || value instanceof _ParseGeoPoint2.default || value instanceof _ParseRelation2.default) {
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2.default || value instanceof _ParseGeoPoint2.default || value instanceof _ParsePolygon2.default || value instanceof _ParseRelation2.default) {
return value.toJSON();

@@ -75,0 +77,0 @@ }

@@ -130,2 +130,3 @@ 'use strict';

Parse.GeoPoint = require('./ParseGeoPoint').default;
Parse.Polygon = require('./ParsePolygon').default;
Parse.Installation = require('./ParseInstallation').default;

@@ -132,0 +133,0 @@ Parse.Object = require('./ParseObject').default;

@@ -39,2 +39,6 @@ 'use strict';

var _ParsePolygon = require('./ParsePolygon');
var _ParsePolygon2 = _interopRequireDefault(_ParsePolygon);
var _ParseObject = require('./ParseObject');

@@ -57,3 +61,12 @@

*/
function quote(s) {
return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
}
/**
* Handles pre-populating the result data of a query with select fields,
* making sure that the data object contains keys for all objects that have
* been requested with a select, so that our cached state updates correctly.
*/
/**
* Copyright (c) 2015-present, Parse, LLC.

@@ -69,11 +82,2 @@ * All rights reserved.

function quote(s) {
return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
}
/**
* Handles pre-populating the result data of a query with select fields,
* making sure that the data object contains keys for all objects that have
* been requested with a select, so that our cached state updates correctly.
*/
function handleSelectResult(data, select) {

@@ -96,6 +100,8 @@ var serverDataMask = {};

// add keys if the expected data is missing
if (!obj[component]) {
obj[component] = index == arr.length - 1 ? undefined : {};
if (obj && !obj.hasOwnProperty(component)) {
obj[component] = undefined;
}
obj = obj[component];
if (obj !== undefined) {
obj = obj[component];
}

@@ -107,2 +113,3 @@ //add this path component to the server mask so we can fill it in later if needed

}
serverMask = serverMask[component];
}

@@ -124,4 +131,6 @@ });

for (var key in mask) {
//traverse into objects as needed
copyMissingDataWithMask(src[key], dest[key], mask[key], true);
if (dest[key] !== undefined && dest[key] !== null && src !== undefined && src !== null) {
//traverse into objects as needed
copyMissingDataWithMask(src[key], dest[key], mask[key], true);
}
}

@@ -1124,2 +1133,18 @@ };

/**
* Add a constraint to the query that requires a particular key's
* coordinates that contains a ParseGeoPoint
*
* @method polygonContains
* @param {String} key The key to be constrained.
* @param {Parse.GeoPoint} GeoPoint
* @return {Parse.Query} Returns the query, so you can chain this call.
*/
}, {
key: 'polygonContains',
value: function (key, point) {
return this._addCondition(key, '$geoIntersects', { '$point': point });
}
/** Query Orderings **/

@@ -1126,0 +1151,0 @@

@@ -7,4 +7,2 @@ 'use strict';

var _reactNativeImplementation = require('react-native/Libraries/react-native/react-native-implementation');
function _interopRequireDefault(obj) {

@@ -14,13 +12,21 @@ return obj && obj.__esModule ? obj : { default: obj };

/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
// RN packager nonsense
var AsyncStorage = void 0; /**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
try {
// for React Native 0.43+
AsyncStorage = require('react-native/Libraries/react-native/react-native-implementation').AsyncStorage;
} catch (error) {
AsyncStorage = require('react-native/Libraries/react-native/react-native.js').AsyncStorage;
}
var StorageController = {

@@ -31,3 +37,3 @@ async: 1,

var p = new _ParsePromise2.default();
_reactNativeImplementation.AsyncStorage.getItem(path, function (err, value) {
AsyncStorage.getItem(path, function (err, value) {
if (err) {

@@ -43,3 +49,3 @@ p.reject(err);

var p = new _ParsePromise2.default();
_reactNativeImplementation.AsyncStorage.setItem(path, value, function (err) {
AsyncStorage.setItem(path, value, function (err) {
if (err) {

@@ -55,3 +61,3 @@ p.reject(err);

var p = new _ParsePromise2.default();
_reactNativeImplementation.AsyncStorage.removeItem(path, function (err) {
AsyncStorage.removeItem(path, function (err) {
if (err) {

@@ -66,8 +72,6 @@ p.reject(err);

clear: function () {
_reactNativeImplementation.AsyncStorage.clear();
AsyncStorage.clear();
}
};
// RN packager nonsense
module.exports = StorageController;

@@ -18,3 +18,3 @@ /**

LIVEQUERY_SERVER_URL: null,
VERSION: 'js' + '1.10.0',
VERSION: 'js' + '1.10.1',
APPLICATION_ID: null,

@@ -21,0 +21,0 @@ JAVASCRIPT_KEY: null,

@@ -15,2 +15,3 @@ /**

import ParseGeoPoint from './ParseGeoPoint';
import ParsePolygon from './ParsePolygon';
import ParseObject from './ParseObject';

@@ -58,2 +59,5 @@ import { opFromJSON } from './ParseOp';

}
if (value.__type === 'Polygon') {
return new ParsePolygon(value.coordinates);
}
var copy = {};

@@ -60,0 +64,0 @@ for (var k in value) {

@@ -15,2 +15,3 @@ /**

import ParseGeoPoint from './ParseGeoPoint';
import ParsePolygon from './ParsePolygon';
import ParseObject from './ParseObject';

@@ -34,3 +35,3 @@ import { Op } from './ParseOp';

}
if (value instanceof Op || value instanceof ParseACL || value instanceof ParseGeoPoint || value instanceof ParseRelation) {
if (value instanceof Op || value instanceof ParseACL || value instanceof ParseGeoPoint || value instanceof ParsePolygon || value instanceof ParseRelation) {
return value.toJSON();

@@ -37,0 +38,0 @@ }

@@ -96,2 +96,3 @@ /**

Parse.GeoPoint = require('./ParseGeoPoint').default;
Parse.Polygon = require('./ParsePolygon').default;
Parse.Installation = require('./ParseInstallation').default;

@@ -98,0 +99,0 @@ Parse.Object = require('./ParseObject').default;

@@ -692,2 +692,13 @@ /**

/**
* Atomically add the objects to the end of the array associated with a given
* key.
* @method addAll
* @param attr {String} The key.
* @param items {[]} The items to add.
*/
addAll(attr, items) {
return this.set(attr, new AddOp(items));
}
/**
* Atomically add an object to the array associated with a given key, only

@@ -706,2 +717,15 @@ * if it is not already present in the array. The position of the insert is

/**
* Atomically add the objects to the array associated with a given key, only
* if it is not already present in the array. The position of the insert is
* not guaranteed.
*
* @method addAllUnique
* @param attr {String} The key.
* @param items {[]} The objects to add.
*/
addAllUnique(attr, items) {
return this.set(attr, new AddUniqueOp(items));
}
/**
* Atomically remove all instances of an object from the array associated

@@ -719,2 +743,14 @@ * with a given key.

/**
* Atomically remove all instances of the objects from the array associated
* with a given key.
*
* @method removeAll
* @param attr {String} The key.
* @param items {[]} The object to remove.
*/
removeAll(attr, items) {
return this.set(attr, new RemoveOp(items));
}
/**
* Returns an instance of a subclass of Parse.Op describing what kind of

@@ -721,0 +757,0 @@ * modification has been performed on this field since the last time it was

@@ -16,2 +16,3 @@ /**

import ParseGeoPoint from './ParseGeoPoint';
import ParsePolygon from './ParsePolygon';
import ParseObject from './ParseObject';

@@ -51,6 +52,8 @@ import ParsePromise from './ParsePromise';

// add keys if the expected data is missing
if (!obj[component]) {
obj[component] = index == arr.length - 1 ? undefined : {};
if (obj && !obj.hasOwnProperty(component)) {
obj[component] = undefined;
}
obj = obj[component];
if (obj !== undefined) {
obj = obj[component];
}

@@ -62,2 +65,3 @@ //add this path component to the server mask so we can fill it in later if needed

}
serverMask = serverMask[component];
}

@@ -86,4 +90,6 @@ });

for (var key in mask) {
//traverse into objects as needed
copyMissingDataWithMask(src[key], dest[key], mask[key], true);
if (dest[key] !== undefined && dest[key] !== null && src !== undefined && src !== null) {
//traverse into objects as needed
copyMissingDataWithMask(src[key], dest[key], mask[key], true);
}
}

@@ -975,2 +981,15 @@ }

/**
* Add a constraint to the query that requires a particular key's
* coordinates that contains a ParseGeoPoint
*
* @method polygonContains
* @param {String} key The key to be constrained.
* @param {Parse.GeoPoint} GeoPoint
* @return {Parse.Query} Returns the query, so you can chain this call.
*/
polygonContains(key, point) {
return this._addCondition(key, '$geoIntersects', { '$point': point });
}
/** Query Orderings **/

@@ -977,0 +996,0 @@

@@ -13,4 +13,11 @@ /**

import ParsePromise from './ParsePromise';
// RN packager nonsense
import { AsyncStorage } from 'react-native/Libraries/react-native/react-native-implementation';
let AsyncStorage;
try {
// for React Native 0.43+
AsyncStorage = require('react-native/Libraries/react-native/react-native-implementation').AsyncStorage;
} catch (error) {
AsyncStorage = require('react-native/Libraries/react-native/react-native.js').AsyncStorage;
}

@@ -17,0 +24,0 @@ var StorageController = {

{
"name": "parse",
"version": "1.10.0",
"version": "1.10.1",
"description": "The Parse JavaScript SDK",

@@ -5,0 +5,0 @@ "homepage": "https://www.parse.com",

@@ -9,3 +9,3 @@ # Parse SDK for JavaScript

A library that gives you access to the powerful Parse cloud platform from your JavaScript app. For more information on Parse and its features, see [the website](http://parseplatform.org) or [the JavaScript guide](https://docs.parseplatform.org/js/guide/).
A library that gives you access to the powerful Parse cloud platform from your JavaScript app. For more information on Parse and its features, see [the website](http://parseplatform.org) or [the JavaScript guide](http://docs.parseplatform.org/js/guide/).

@@ -40,4 +40,2 @@ ## Getting Started

> As of `v1.10`, Parse-SDK-JS supports React Native 0.43+. Please use `v1.9.2` for previous versions of React Native.
## License

@@ -44,0 +42,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc