parse 5.0.0-beta.1 → 5.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.0.0-beta.1
2
+ * Parse JavaScript SDK v5.1.0-alpha.1
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -557,7 +557,7 @@ var config /*: Config & { [key: string]: mixed }*/ = {
557
557
  SERVER_AUTH_TOKEN: null,
558
558
  LIVEQUERY_SERVER_URL: null,
559
559
  ENCRYPTED_KEY: null,
560
- VERSION: 'js' + "5.0.0-beta.1",
560
+ VERSION: 'js' + "5.1.0-alpha.1",
561
561
  APPLICATION_ID: null,
562
562
  JAVASCRIPT_KEY: null,
563
563
  MASTER_KEY: null,
@@ -9346,14 +9346,17 @@ var ParseObject = /*#__PURE__*/function () {
9346
9346
  attrs[arg1] = arg2;
9347
9347
  options = arg3;
9348
9348
  }
9349
+ options = options || {};
9349
9350
  if (attrs) {
9350
- var validation = this.validate(attrs);
9351
- if (validation) {
9352
- return _promise.default.reject(validation);
9351
+ var validationError;
9352
+ options.error = function (_, validation) {
9353
+ validationError = validation;
9354
+ };
9355
+ var success = this.set(attrs, options);
9356
+ if (!success) {
9357
+ return _promise.default.reject(validationError);
9353
9358
  }
9354
- this.set(attrs, options);
9355
9359
  }
9356
- options = options || {};
9357
9360
  var saveOptions = {};
9358
9361
  if (options.hasOwnProperty('useMasterKey')) {
9359
9362
  saveOptions.useMasterKey = !!options.useMasterKey;
@@ -16179,13 +16182,8 @@ var ParseUser = /*#__PURE__*/function (_ParseObject) {
16179
16182
  if (typeof password !== 'string') {
16180
16183
  return _promise.default.reject(new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'Password must be a string.'));
16181
16184
  }
16182
- options = options || {};
16183
- var verificationOption = {};
16184
- if (options.hasOwnProperty('useMasterKey')) {
16185
- verificationOption.useMasterKey = options.useMasterKey;
16186
- }
16187
16185
  var controller = _CoreManager.default.getUserController();
16188
- return controller.verifyPassword(username, password, verificationOption);
16186
+ return controller.verifyPassword(username, password, options || {});
16189
16187
  }
16190
16188
 
16191
16189
  /**
@@ -16790,6 +16788,7 @@ var uuidv4 = _dereq_('./uuid');
16790
16788
  progress?: any,
16791
16789
  context?: any,
16792
16790
  usePost?: boolean,
16791
+ ignoreEmailVerification?: boolean,
16793
16792
  };*/
16794
16793
  /*:: export type FullOptions = {
16795
16794
  success?: any,
@@ -17005,6 +17004,9 @@ var RESTController = {
17005
17004
  throw new Error('Cannot use the Master Key, it has not been provided.');
17006
17005
  }
17007
17006
  }
17007
+ if (options.ignoreEmailVerification !== undefined) {
17008
+ payload.ignoreEmailVerification = options.ignoreEmailVerification;
17009
+ }
17008
17010
  if (_CoreManager.default.get('FORCE_REVOCABLE_SESSION')) {
17009
17011
  payload._RevocableSession = '1';
17010
17012
  }