Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse

Package Overview
Dependencies
Maintainers
5
Versions
193
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.7.0 to 1.7.1

4

lib/browser/CoreManager.js

@@ -16,6 +16,6 @@ /**

// Defaults
IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node,
IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node && !process.version.electron,
REQUEST_ATTEMPT_LIMIT: 5,
SERVER_URL: 'https://api.parse.com/1',
VERSION: 'js' + '1.7.0',
VERSION: 'js' + '1.7.1',
APPLICATION_ID: null,

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

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

* @method url
* @param {Object} options An object to specify url options
* @return {String}

@@ -146,4 +147,12 @@ */

key: 'url',
value: function url() {
return this._url;
value: function url(options) {
options = options || {};
if (!this._url) {
return;
}
if (options.forceSecure) {
return this._url.replace(/^http:\/\//i, 'https://');
} else {
return this._url;
}
}

@@ -150,0 +159,0 @@

@@ -841,4 +841,17 @@ /**

}
var attributes = this.attributes;
if (typeof this.constructor.readOnlyAttributes === 'function') {
var readonly = this.constructor.readOnlyAttributes() || [];
// Attributes are frozen, so we have to rebuild an object,
// rather than delete readonly keys
var copy = {};
for (var a in attributes) {
if (readonly.indexOf(a) < 0) {
copy[a] = attributes[a];
}
}
attributes = copy;
}
if (clone.set) {
clone.set(this.attributes);
clone.set(attributes);
}

@@ -1403,2 +1416,4 @@ return clone;

* @param {Object} json The JSON map of the Object's data
* @param {boolean} override In single instance mode, all old server data
* is overwritten if this is set to true
* @static

@@ -1409,3 +1424,3 @@ * @return {Parse.Object} A Parse.Object reference

key: 'fromJSON',
value: function fromJSON(json) {
value: function fromJSON(json, override) {
if (!json.className) {

@@ -1422,2 +1437,9 @@ throw new Error('Cannot create an object without a className');

}
if (override) {
// id needs to be set before clearServerData can work
if (otherAttributes.objectId) {
o.id = otherAttributes.objectId;
}
o._clearServerData();
}
o._finishFetch(otherAttributes);

@@ -1682,2 +1704,3 @@ if (json.objectId) {

target._clearPendingOps();
target._clearServerData();
target._finishFetch(response);

@@ -1684,0 +1707,0 @@ }

@@ -296,3 +296,3 @@ /**

}
return _ParseObject2['default'].fromJSON(data);
return _ParseObject2['default'].fromJSON(data, true);
});

@@ -393,3 +393,3 @@ })._thenRunCallbacks(options);

}
return _ParseObject2['default'].fromJSON(objects[0]);
return _ParseObject2['default'].fromJSON(objects[0], true);
})._thenRunCallbacks(options);

@@ -396,0 +396,0 @@ }

@@ -636,2 +636,7 @@ /**

value: function logIn(username, password, options) {
if (typeof username !== 'string') {
return _ParsePromise2['default'].error(new _ParseError2['default'](_ParseError2['default'].OTHER_CAUSE, 'Username must be a string.'));
} else if (typeof password !== 'string') {
return _ParsePromise2['default'].error(new _ParseError2['default'](_ParseError2['default'].OTHER_CAUSE, 'Password must be a string.'));
}
var user = new ParseUser();

@@ -638,0 +643,0 @@ user._finishFetch({ username: username, password: password });

@@ -16,6 +16,6 @@ /**

// Defaults
IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node,
IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node && !process.version.electron,
REQUEST_ATTEMPT_LIMIT: 5,
SERVER_URL: 'https://api.parse.com/1',
VERSION: 'js' + '1.7.0',
VERSION: 'js' + '1.7.1',
APPLICATION_ID: null,

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

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

* @method url
* @param {Object} options An object to specify url options
* @return {String}

@@ -146,4 +147,12 @@ */

key: 'url',
value: function url() {
return this._url;
value: function url(options) {
options = options || {};
if (!this._url) {
return;
}
if (options.forceSecure) {
return this._url.replace(/^http:\/\//i, 'https://');
} else {
return this._url;
}
}

@@ -150,0 +159,0 @@

@@ -841,4 +841,17 @@ /**

}
var attributes = this.attributes;
if (typeof this.constructor.readOnlyAttributes === 'function') {
var readonly = this.constructor.readOnlyAttributes() || [];
// Attributes are frozen, so we have to rebuild an object,
// rather than delete readonly keys
var copy = {};
for (var a in attributes) {
if (readonly.indexOf(a) < 0) {
copy[a] = attributes[a];
}
}
attributes = copy;
}
if (clone.set) {
clone.set(this.attributes);
clone.set(attributes);
}

@@ -1403,2 +1416,4 @@ return clone;

* @param {Object} json The JSON map of the Object's data
* @param {boolean} override In single instance mode, all old server data
* is overwritten if this is set to true
* @static

@@ -1409,3 +1424,3 @@ * @return {Parse.Object} A Parse.Object reference

key: 'fromJSON',
value: function fromJSON(json) {
value: function fromJSON(json, override) {
if (!json.className) {

@@ -1422,2 +1437,9 @@ throw new Error('Cannot create an object without a className');

}
if (override) {
// id needs to be set before clearServerData can work
if (otherAttributes.objectId) {
o.id = otherAttributes.objectId;
}
o._clearServerData();
}
o._finishFetch(otherAttributes);

@@ -1682,2 +1704,3 @@ if (json.objectId) {

target._clearPendingOps();
target._clearServerData();
target._finishFetch(response);

@@ -1684,0 +1707,0 @@ }

@@ -296,3 +296,3 @@ /**

}
return _ParseObject2['default'].fromJSON(data);
return _ParseObject2['default'].fromJSON(data, true);
});

@@ -393,3 +393,3 @@ })._thenRunCallbacks(options);

}
return _ParseObject2['default'].fromJSON(objects[0]);
return _ParseObject2['default'].fromJSON(objects[0], true);
})._thenRunCallbacks(options);

@@ -396,0 +396,0 @@ }

@@ -636,2 +636,7 @@ /**

value: function logIn(username, password, options) {
if (typeof username !== 'string') {
return _ParsePromise2['default'].error(new _ParseError2['default'](_ParseError2['default'].OTHER_CAUSE, 'Username must be a string.'));
} else if (typeof password !== 'string') {
return _ParsePromise2['default'].error(new _ParseError2['default'](_ParseError2['default'].OTHER_CAUSE, 'Password must be a string.'));
}
var user = new ParseUser();

@@ -638,0 +643,0 @@ user._finishFetch({ username: username, password: password });

@@ -16,6 +16,6 @@ /**

// Defaults
IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node,
IS_NODE: typeof process !== 'undefined' && !!process.versions && !!process.versions.node && !process.version.electron,
REQUEST_ATTEMPT_LIMIT: 5,
SERVER_URL: 'https://api.parse.com/1',
VERSION: 'js' + '1.7.0',
VERSION: 'js' + '1.7.1',
APPLICATION_ID: null,

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

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

* @method url
* @param {Object} options An object to specify url options
* @return {String}

@@ -146,4 +147,12 @@ */

key: 'url',
value: function url() {
return this._url;
value: function url(options) {
options = options || {};
if (!this._url) {
return;
}
if (options.forceSecure) {
return this._url.replace(/^http:\/\//i, 'https://');
} else {
return this._url;
}
}

@@ -150,0 +159,0 @@

@@ -841,4 +841,17 @@ /**

}
var attributes = this.attributes;
if (typeof this.constructor.readOnlyAttributes === 'function') {
var readonly = this.constructor.readOnlyAttributes() || [];
// Attributes are frozen, so we have to rebuild an object,
// rather than delete readonly keys
var copy = {};
for (var a in attributes) {
if (readonly.indexOf(a) < 0) {
copy[a] = attributes[a];
}
}
attributes = copy;
}
if (clone.set) {
clone.set(this.attributes);
clone.set(attributes);
}

@@ -1403,2 +1416,4 @@ return clone;

* @param {Object} json The JSON map of the Object's data
* @param {boolean} override In single instance mode, all old server data
* is overwritten if this is set to true
* @static

@@ -1409,3 +1424,3 @@ * @return {Parse.Object} A Parse.Object reference

key: 'fromJSON',
value: function fromJSON(json) {
value: function fromJSON(json, override) {
if (!json.className) {

@@ -1422,2 +1437,9 @@ throw new Error('Cannot create an object without a className');

}
if (override) {
// id needs to be set before clearServerData can work
if (otherAttributes.objectId) {
o.id = otherAttributes.objectId;
}
o._clearServerData();
}
o._finishFetch(otherAttributes);

@@ -1682,2 +1704,3 @@ if (json.objectId) {

target._clearPendingOps();
target._clearServerData();
target._finishFetch(response);

@@ -1684,0 +1707,0 @@ }

@@ -296,3 +296,3 @@ /**

}
return _ParseObject2['default'].fromJSON(data);
return _ParseObject2['default'].fromJSON(data, true);
});

@@ -393,3 +393,3 @@ })._thenRunCallbacks(options);

}
return _ParseObject2['default'].fromJSON(objects[0]);
return _ParseObject2['default'].fromJSON(objects[0], true);
})._thenRunCallbacks(options);

@@ -396,0 +396,0 @@ }

@@ -636,2 +636,7 @@ /**

value: function logIn(username, password, options) {
if (typeof username !== 'string') {
return _ParsePromise2['default'].error(new _ParseError2['default'](_ParseError2['default'].OTHER_CAUSE, 'Username must be a string.'));
} else if (typeof password !== 'string') {
return _ParsePromise2['default'].error(new _ParseError2['default'](_ParseError2['default'].OTHER_CAUSE, 'Password must be a string.'));
}
var user = new ParseUser();

@@ -638,0 +643,0 @@ user._finishFetch({ username: username, password: password });

{
"name": "parse",
"version": "1.7.0",
"version": "1.7.1",
"description": "The Parse JavaScript SDK",

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

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