parse 5.3.0-alpha.2 → 5.3.0-alpha.3

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.
Files changed (50) hide show
  1. package/dist/parse.js +17 -24
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +17 -22
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/CoreManager.js +1 -1
  6. package/lib/browser/FacebookUtils.js +1 -1
  7. package/lib/browser/LocalDatastoreController.react-native.js +1 -1
  8. package/lib/browser/OfflineQuery.js +5 -9
  9. package/lib/browser/Parse.js +1 -3
  10. package/lib/browser/ParseConfig.js +1 -1
  11. package/lib/browser/ParseFile.js +0 -1
  12. package/lib/browser/ParseObject.js +1 -1
  13. package/lib/browser/ParseQuery.js +1 -1
  14. package/lib/browser/ParseUser.js +1 -1
  15. package/lib/browser/RESTController.js +2 -2
  16. package/lib/browser/StorageController.weapp.js +1 -1
  17. package/lib/node/CoreManager.js +1 -1
  18. package/lib/node/FacebookUtils.js +1 -1
  19. package/lib/node/LocalDatastoreController.react-native.js +1 -1
  20. package/lib/node/OfflineQuery.js +5 -9
  21. package/lib/node/Parse.js +1 -1
  22. package/lib/node/ParseConfig.js +1 -1
  23. package/lib/node/ParseFile.js +0 -1
  24. package/lib/node/ParseObject.js +1 -1
  25. package/lib/node/ParseQuery.js +1 -1
  26. package/lib/node/ParseUser.js +1 -1
  27. package/lib/node/RESTController.js +2 -2
  28. package/lib/node/StorageController.weapp.js +1 -1
  29. package/lib/react-native/CoreManager.js +1 -1
  30. package/lib/react-native/LocalDatastoreController.react-native.js +1 -1
  31. package/lib/react-native/OfflineQuery.js +5 -5
  32. package/lib/react-native/ParseConfig.js +1 -1
  33. package/lib/react-native/ParseObject.js +2 -1
  34. package/lib/react-native/ParseQuery.js +1 -1
  35. package/lib/react-native/ParseUser.js +1 -1
  36. package/lib/react-native/RESTController.js +11 -10
  37. package/lib/react-native/StorageController.weapp.js +1 -1
  38. package/lib/weapp/CoreManager.js +1 -1
  39. package/lib/weapp/FacebookUtils.js +1 -1
  40. package/lib/weapp/LocalDatastoreController.react-native.js +1 -1
  41. package/lib/weapp/OfflineQuery.js +5 -9
  42. package/lib/weapp/Parse.js +1 -1
  43. package/lib/weapp/ParseConfig.js +1 -1
  44. package/lib/weapp/ParseFile.js +0 -1
  45. package/lib/weapp/ParseObject.js +1 -1
  46. package/lib/weapp/ParseQuery.js +1 -1
  47. package/lib/weapp/ParseUser.js +1 -1
  48. package/lib/weapp/RESTController.js +2 -2
  49. package/lib/weapp/StorageController.weapp.js +1 -1
  50. package/package.json +20 -18
@@ -19,7 +19,7 @@ const config = {
19
19
  SERVER_AUTH_TOKEN: null,
20
20
  LIVEQUERY_SERVER_URL: null,
21
21
  ENCRYPTED_KEY: null,
22
- VERSION: 'js' + "5.3.0-alpha.2",
22
+ VERSION: 'js' + "5.3.0-alpha.3",
23
23
  APPLICATION_ID: null,
24
24
  JAVASCRIPT_KEY: null,
25
25
  MASTER_KEY: null,
@@ -103,7 +103,7 @@ const FacebookUtils = {
103
103
  }
104
104
  }
105
105
  if (initOptions.status && typeof console !== 'undefined') {
106
- const warn = console.warn || console.log || function () {}; // eslint-disable-line no-console
106
+ const warn = console.warn || console.log || function () {};
107
107
  warn.call(console, 'The "status" flag passed into' + ' FB.init, when set to true, can interfere with Parse Facebook' + ' integration, so it has been suppressed. Please call' + ' FB.getLoginStatus() explicitly if you require this behavior.');
108
108
  }
109
109
  initOptions.status = false;
@@ -53,7 +53,7 @@ const LocalDatastoreController = {
53
53
  const [key, value] = pair;
54
54
  try {
55
55
  LDS[key] = JSON.parse(value);
56
- } catch (error) {
56
+ } catch (_) {
57
57
  LDS[key] = null;
58
58
  }
59
59
  });
@@ -317,11 +317,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
317
317
  compareTo = parserResult.result;
318
318
  }
319
319
  // Compare Date Object or Date String
320
- if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' &&
321
- // @ts-ignore
322
- new Date(compareTo) !== 'Invalid Date' &&
323
- // @ts-ignore
324
- !isNaN(new Date(compareTo))) {
320
+ if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' && new Date(compareTo).toString() !== 'Invalid Date') {
325
321
  object[key] = new Date(object[key].iso ? object[key].iso : object[key]);
326
322
  }
327
323
  switch (condition) {
@@ -442,7 +438,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
442
438
  break;
443
439
  case '$select':
444
440
  {
445
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
441
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
446
442
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
447
443
  });
448
444
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -453,7 +449,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
453
449
  }
454
450
  case '$dontSelect':
455
451
  {
456
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
452
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
457
453
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
458
454
  });
459
455
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -464,7 +460,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
464
460
  }
465
461
  case '$inQuery':
466
462
  {
467
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
463
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
468
464
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
469
465
  });
470
466
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -477,7 +473,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
477
473
  }
478
474
  case '$notInQuery':
479
475
  {
480
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
476
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
481
477
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
482
478
  });
483
479
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -137,9 +137,7 @@ const Parse = {
137
137
  */
138
138
  initialize(applicationId, javaScriptKey) {
139
139
  if ("browser" === 'browser' && _CoreManager.default.get('IS_NODE') && !process.env.SERVER_RENDERING) {
140
- /* eslint-disable no-console */
141
140
  console.log("It looks like you're using the browser version of the SDK in a " + "node.js environment. You should require('parse/node') instead.");
142
- /* eslint-enable no-console */
143
141
  }
144
142
  Parse._initialize(applicationId, javaScriptKey);
145
143
  },
@@ -373,7 +371,7 @@ const Parse = {
373
371
  */
374
372
  dumpLocalDatastore() {
375
373
  if (!this.LocalDatastore.isEnabled) {
376
- console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
374
+ console.log('Parse.enableLocalDatastore() must be called first');
377
375
  return _promise.default.resolve({});
378
376
  } else {
379
377
  return Parse.LocalDatastore._getAllContents();
@@ -132,7 +132,7 @@ function decodePayload(data) {
132
132
  if (json && typeof json === 'object') {
133
133
  return (0, _decode.default)(json);
134
134
  }
135
- } catch (e) {
135
+ } catch (_) {
136
136
  return null;
137
137
  }
138
138
  }
@@ -403,7 +403,6 @@ const DefaultController = {
403
403
  throw new Error('saveFile can only be used with File-type sources.');
404
404
  }
405
405
  const base64Data = await new _promise.default((res, rej) => {
406
- // eslint-disable-next-line no-undef
407
406
  const reader = new FileReader();
408
407
  reader.onload = () => res(reader.result);
409
408
  reader.onerror = error => rej(error);
@@ -262,7 +262,7 @@ class ParseObject {
262
262
  if (objectCache[attr] !== stringified) {
263
263
  dirty[attr] = val;
264
264
  }
265
- } catch (e) {
265
+ } catch (_) {
266
266
  // Error occurred, possibly by a nested unsaved pointer in a mutable container
267
267
  // No matter how it happened, it indicates a change in the attribute
268
268
  dirty[attr] = val;
@@ -342,7 +342,7 @@ class ParseQuery {
342
342
  _OfflineQuery.default.validateQuery(this);
343
343
  const localDatastore = _CoreManager.default.getLocalDatastore();
344
344
  const objects = await localDatastore._serializeObjectsFromPinName(this._localDatastorePinName);
345
- let results = (0, _filter.default)(_context = (0, _map.default)(objects).call(objects, (json, index, arr) => {
345
+ let results = (0, _filter.default)(_context = (0, _map.default)(objects).call(objects, (json, _index, arr) => {
346
346
  const object = _ParseObject.default.fromJSON(json, false);
347
347
  if (json._localId && !json.objectId) {
348
348
  object._localId = json._localId;
@@ -125,7 +125,7 @@ class ParseUser extends _ParseObject.default {
125
125
  reject(error);
126
126
  });
127
127
  },
128
- error: (provider, error) => {
128
+ error: (_provider, error) => {
129
129
  reject(error);
130
130
  }
131
131
  });
@@ -28,7 +28,7 @@ let useXDomainRequest = false;
28
28
  if (typeof XDomainRequest !== 'undefined' && !('withCredentials' in new XMLHttpRequest())) {
29
29
  useXDomainRequest = true;
30
30
  }
31
- function ajaxIE9(method, url, data, headers, options) {
31
+ function ajaxIE9(method, url, data, _headers, options) {
32
32
  return new _promise.default((resolve, reject) => {
33
33
  // @ts-ignore
34
34
  const xdr = new XDomainRequest();
@@ -291,7 +291,7 @@ const RESTController = {
291
291
  try {
292
292
  const errorJSON = JSON.parse(response.responseText);
293
293
  error = new _ParseError.default(errorJSON.code, errorJSON.error);
294
- } catch (e) {
294
+ } catch (_) {
295
295
  // If we fail to parse the error text, that's okay.
296
296
  error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
297
297
  }
@@ -17,7 +17,7 @@ const StorageController = {
17
17
  try {
18
18
  // @ts-ignore
19
19
  wx.setStorageSync(path, value);
20
- } catch (e) {
20
+ } catch (_) {
21
21
  // Quota exceeded
22
22
  }
23
23
  },
@@ -16,7 +16,7 @@ const config = {
16
16
  SERVER_AUTH_TOKEN: null,
17
17
  LIVEQUERY_SERVER_URL: null,
18
18
  ENCRYPTED_KEY: null,
19
- VERSION: 'js' + "5.3.0-alpha.2",
19
+ VERSION: 'js' + "5.3.0-alpha.3",
20
20
  APPLICATION_ID: null,
21
21
  JAVASCRIPT_KEY: null,
22
22
  MASTER_KEY: null,
@@ -106,7 +106,7 @@ const FacebookUtils = {
106
106
  }
107
107
  }
108
108
  if (initOptions.status && typeof console !== 'undefined') {
109
- const warn = console.warn || console.log || function () {}; // eslint-disable-line no-console
109
+ const warn = console.warn || console.log || function () {};
110
110
  warn.call(console, 'The "status" flag passed into' + ' FB.init, when set to true, can interfere with Parse Facebook' + ' integration, so it has been suppressed. Please call' + ' FB.getLoginStatus() explicitly if you require this behavior.');
111
111
  }
112
112
  initOptions.status = false;
@@ -53,7 +53,7 @@ const LocalDatastoreController = {
53
53
  const [key, value] = pair;
54
54
  try {
55
55
  LDS[key] = JSON.parse(value);
56
- } catch (error) {
56
+ } catch (_) {
57
57
  LDS[key] = null;
58
58
  }
59
59
  });
@@ -311,11 +311,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
311
311
  compareTo = parserResult.result;
312
312
  }
313
313
  // Compare Date Object or Date String
314
- if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' &&
315
- // @ts-ignore
316
- new Date(compareTo) !== 'Invalid Date' &&
317
- // @ts-ignore
318
- !isNaN(new Date(compareTo))) {
314
+ if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' && new Date(compareTo).toString() !== 'Invalid Date') {
319
315
  object[key] = new Date(object[key].iso ? object[key].iso : object[key]);
320
316
  }
321
317
  switch (condition) {
@@ -435,7 +431,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
435
431
  break;
436
432
  case '$select':
437
433
  {
438
- const subQueryObjects = objects.filter((obj, index, arr) => {
434
+ const subQueryObjects = objects.filter((obj, _index, arr) => {
439
435
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
440
436
  });
441
437
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -446,7 +442,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
446
442
  }
447
443
  case '$dontSelect':
448
444
  {
449
- const subQueryObjects = objects.filter((obj, index, arr) => {
445
+ const subQueryObjects = objects.filter((obj, _index, arr) => {
450
446
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
451
447
  });
452
448
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -457,7 +453,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
457
453
  }
458
454
  case '$inQuery':
459
455
  {
460
- const subQueryObjects = objects.filter((obj, index, arr) => {
456
+ const subQueryObjects = objects.filter((obj, _index, arr) => {
461
457
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
462
458
  });
463
459
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -470,7 +466,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
470
466
  }
471
467
  case '$notInQuery':
472
468
  {
473
- const subQueryObjects = objects.filter((obj, index, arr) => {
469
+ const subQueryObjects = objects.filter((obj, _index, arr) => {
474
470
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
475
471
  });
476
472
  for (let i = 0; i < subQueryObjects.length; i += 1) {
package/lib/node/Parse.js CHANGED
@@ -360,7 +360,7 @@ const Parse = {
360
360
  */
361
361
  dumpLocalDatastore() {
362
362
  if (!this.LocalDatastore.isEnabled) {
363
- console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
363
+ console.log('Parse.enableLocalDatastore() must be called first');
364
364
  return Promise.resolve({});
365
365
  } else {
366
366
  return Parse.LocalDatastore._getAllContents();
@@ -129,7 +129,7 @@ function decodePayload(data) {
129
129
  if (json && typeof json === 'object') {
130
130
  return (0, _decode.default)(json);
131
131
  }
132
- } catch (e) {
132
+ } catch (_) {
133
133
  return null;
134
134
  }
135
135
  }
@@ -387,7 +387,6 @@ const DefaultController = {
387
387
  throw new Error('saveFile can only be used with File-type sources.');
388
388
  }
389
389
  const base64Data = await new Promise((res, rej) => {
390
- // eslint-disable-next-line no-undef
391
390
  const reader = new FileReader();
392
391
  reader.onload = () => res(reader.result);
393
392
  reader.onerror = error => rej(error);
@@ -247,7 +247,7 @@ class ParseObject {
247
247
  if (objectCache[attr] !== stringified) {
248
248
  dirty[attr] = val;
249
249
  }
250
- } catch (e) {
250
+ } catch (_) {
251
251
  // Error occurred, possibly by a nested unsaved pointer in a mutable container
252
252
  // No matter how it happened, it indicates a change in the attribute
253
253
  dirty[attr] = val;
@@ -309,7 +309,7 @@ class ParseQuery {
309
309
  _OfflineQuery.default.validateQuery(this);
310
310
  const localDatastore = _CoreManager.default.getLocalDatastore();
311
311
  const objects = await localDatastore._serializeObjectsFromPinName(this._localDatastorePinName);
312
- let results = objects.map((json, index, arr) => {
312
+ let results = objects.map((json, _index, arr) => {
313
313
  const object = _ParseObject.default.fromJSON(json, false);
314
314
  if (json._localId && !json.objectId) {
315
315
  object._localId = json._localId;
@@ -124,7 +124,7 @@ class ParseUser extends _ParseObject.default {
124
124
  reject(error);
125
125
  });
126
126
  },
127
- error: (provider, error) => {
127
+ error: (_provider, error) => {
128
128
  reject(error);
129
129
  }
130
130
  });
@@ -26,7 +26,7 @@ let useXDomainRequest = false;
26
26
  if (typeof XDomainRequest !== 'undefined' && !('withCredentials' in new XMLHttpRequest())) {
27
27
  useXDomainRequest = true;
28
28
  }
29
- function ajaxIE9(method, url, data, headers, options) {
29
+ function ajaxIE9(method, url, data, _headers, options) {
30
30
  return new Promise((resolve, reject) => {
31
31
  // @ts-ignore
32
32
  const xdr = new XDomainRequest();
@@ -287,7 +287,7 @@ const RESTController = {
287
287
  try {
288
288
  const errorJSON = JSON.parse(response.responseText);
289
289
  error = new _ParseError.default(errorJSON.code, errorJSON.error);
290
- } catch (e) {
290
+ } catch (_) {
291
291
  // If we fail to parse the error text, that's okay.
292
292
  error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
293
293
  }
@@ -14,7 +14,7 @@ const StorageController = {
14
14
  try {
15
15
  // @ts-ignore
16
16
  wx.setStorageSync(path, value);
17
- } catch (e) {
17
+ } catch (_) {
18
18
  // Quota exceeded
19
19
  }
20
20
  },
@@ -12,7 +12,7 @@ var config = {
12
12
  SERVER_AUTH_TOKEN: null,
13
13
  LIVEQUERY_SERVER_URL: null,
14
14
  ENCRYPTED_KEY: null,
15
- VERSION: 'js' + "5.3.0-alpha.2",
15
+ VERSION: 'js' + "5.3.0-alpha.3",
16
16
  APPLICATION_ID: null,
17
17
  JAVASCRIPT_KEY: null,
18
18
  MASTER_KEY: null,
@@ -63,7 +63,7 @@ var LocalDatastoreController = {
63
63
  value = _pair[1];
64
64
  try {
65
65
  LDS[key] = JSON.parse(value);
66
- } catch (error) {
66
+ } catch (_) {
67
67
  LDS[key] = null;
68
68
  }
69
69
  });
@@ -249,7 +249,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
249
249
  }
250
250
  compareTo = parserResult.result;
251
251
  }
252
- if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' && new Date(compareTo) !== 'Invalid Date' && !isNaN(new Date(compareTo))) {
252
+ if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' && new Date(compareTo).toString() !== 'Invalid Date') {
253
253
  object[key] = new Date(object[key].iso ? object[key].iso : object[key]);
254
254
  }
255
255
  switch (condition) {
@@ -359,7 +359,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
359
359
  break;
360
360
  case '$select':
361
361
  {
362
- var subQueryObjects = objects.filter(function (obj, index, arr) {
362
+ var subQueryObjects = objects.filter(function (obj, _index, arr) {
363
363
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
364
364
  });
365
365
  for (var _i = 0; _i < subQueryObjects.length; _i += 1) {
@@ -370,7 +370,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
370
370
  }
371
371
  case '$dontSelect':
372
372
  {
373
- var _subQueryObjects = objects.filter(function (obj, index, arr) {
373
+ var _subQueryObjects = objects.filter(function (obj, _index, arr) {
374
374
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
375
375
  });
376
376
  for (var _i2 = 0; _i2 < _subQueryObjects.length; _i2 += 1) {
@@ -381,7 +381,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
381
381
  }
382
382
  case '$inQuery':
383
383
  {
384
- var _subQueryObjects2 = objects.filter(function (obj, index, arr) {
384
+ var _subQueryObjects2 = objects.filter(function (obj, _index, arr) {
385
385
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
386
386
  });
387
387
  for (var _i3 = 0; _i3 < _subQueryObjects2.length; _i3 += 1) {
@@ -394,7 +394,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
394
394
  }
395
395
  case '$notInQuery':
396
396
  {
397
- var _subQueryObjects3 = objects.filter(function (obj, index, arr) {
397
+ var _subQueryObjects3 = objects.filter(function (obj, _index, arr) {
398
398
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
399
399
  });
400
400
  for (var _i4 = 0; _i4 < _subQueryObjects3.length; _i4 += 1) {
@@ -77,7 +77,7 @@ function decodePayload(data) {
77
77
  if (json && typeof json === 'object') {
78
78
  return (0, _decode.default)(json);
79
79
  }
80
- } catch (e) {
80
+ } catch (_) {
81
81
  return null;
82
82
  }
83
83
  }
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  exports.default = void 0;
6
6
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
7
7
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
+ var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
8
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
11
  var _CoreManager = _interopRequireDefault(require("./CoreManager"));
@@ -189,7 +190,7 @@ var ParseObject = function () {
189
190
  if (objectCache[attr] !== stringified) {
190
191
  dirty[attr] = val;
191
192
  }
192
- } catch (e) {
193
+ } catch (_) {
193
194
  dirty[attr] = val;
194
195
  }
195
196
  }
@@ -199,7 +199,7 @@ var ParseQuery = function () {
199
199
  _OfflineQuery.default.validateQuery(this);
200
200
  var localDatastore = _CoreManager.default.getLocalDatastore();
201
201
  var objects = yield localDatastore._serializeObjectsFromPinName(this._localDatastorePinName);
202
- var results = objects.map(function (json, index, arr) {
202
+ var results = objects.map(function (json, _index, arr) {
203
203
  var object = _ParseObject.default.fromJSON(json, false);
204
204
  if (json._localId && !json.objectId) {
205
205
  object._localId = json._localId;
@@ -107,7 +107,7 @@ var ParseUser = function (_ParseObject) {
107
107
  reject(error);
108
108
  });
109
109
  },
110
- error: function (provider, _error) {
110
+ error: function (_provider, _error) {
111
111
  reject(_error);
112
112
  }
113
113
  });
@@ -16,7 +16,7 @@ var useXDomainRequest = false;
16
16
  if (typeof XDomainRequest !== 'undefined' && !('withCredentials' in new XMLHttpRequest())) {
17
17
  useXDomainRequest = true;
18
18
  }
19
- function ajaxIE9(method, url, data, headers, options) {
19
+ function ajaxIE9(method, url, data, _headers, options) {
20
20
  return new Promise(function (resolve, reject) {
21
21
  var xdr = new XDomainRequest();
22
22
  xdr.onload = function () {
@@ -62,7 +62,7 @@ var RESTController = {
62
62
  var isIdempotent = _CoreManager.default.get('IDEMPOTENCY') && ['POST', 'PUT'].includes(method);
63
63
  var requestId = isIdempotent ? (0, _uuid.default)() : '';
64
64
  var attempts = 0;
65
- (function dispatch() {
65
+ var _dispatch = function () {
66
66
  if (XHR == null) {
67
67
  throw new Error('Cannot make a request: No definition of XMLHttpRequest was found.');
68
68
  }
@@ -101,7 +101,7 @@ var RESTController = {
101
101
  } else if (xhr.status >= 500 || xhr.status === 0) {
102
102
  if (++attempts < _CoreManager.default.get('REQUEST_ATTEMPT_LIMIT')) {
103
103
  var delay = Math.round(Math.random() * 125 * Math.pow(2, attempts));
104
- setTimeout(dispatch, delay);
104
+ setTimeout(_dispatch, delay);
105
105
  } else if (xhr.status === 0) {
106
106
  promise.reject('Unable to connect to the Parse API');
107
107
  } else {
@@ -129,7 +129,7 @@ var RESTController = {
129
129
  headers[key] = customHeaders[key];
130
130
  }
131
131
  if (options && typeof options.progress === 'function') {
132
- var handleProgress = function handleProgress(type, event) {
132
+ var handleProgress = function (type, event) {
133
133
  if (event.lengthComputable) {
134
134
  options.progress(event.loaded / event.total, event.loaded, event.total, {
135
135
  type: type
@@ -166,10 +166,11 @@ var RESTController = {
166
166
  if (options && typeof options.requestTask === 'function') {
167
167
  options.requestTask(xhr);
168
168
  }
169
- })();
169
+ };
170
+ _dispatch();
170
171
  return promise;
171
172
  },
172
- request: function request(method, path, data, options) {
173
+ request: function (method, path, data, options) {
173
174
  options = options || {};
174
175
  var url = _CoreManager.default.get('SERVER_URL');
175
176
  if (url[url.length - 1] !== '/') {
@@ -255,13 +256,13 @@ var RESTController = {
255
256
  });
256
257
  }).catch(RESTController.handleError);
257
258
  },
258
- handleError: function handleError(response) {
259
+ handleError: function (response) {
259
260
  var error;
260
261
  if (response && response.responseText) {
261
262
  try {
262
263
  var errorJSON = JSON.parse(response.responseText);
263
264
  error = new _ParseError.default(errorJSON.code, errorJSON.error);
264
- } catch (e) {
265
+ } catch (_) {
265
266
  error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
266
267
  }
267
268
  } else {
@@ -270,10 +271,10 @@ var RESTController = {
270
271
  }
271
272
  return Promise.reject(error);
272
273
  },
273
- _setXHR: function _setXHR(xhr) {
274
+ _setXHR: function (xhr) {
274
275
  XHR = xhr;
275
276
  },
276
- _getXHR: function _getXHR() {
277
+ _getXHR: function () {
277
278
  return XHR;
278
279
  }
279
280
  };
@@ -10,7 +10,7 @@ var StorageController = {
10
10
  setItem: function (path, value) {
11
11
  try {
12
12
  wx.setStorageSync(path, value);
13
- } catch (e) {}
13
+ } catch (_) {}
14
14
  },
15
15
  removeItem: function (path) {
16
16
  wx.removeStorageSync(path);
@@ -19,7 +19,7 @@ const config = {
19
19
  SERVER_AUTH_TOKEN: null,
20
20
  LIVEQUERY_SERVER_URL: null,
21
21
  ENCRYPTED_KEY: null,
22
- VERSION: 'js' + "5.3.0-alpha.2",
22
+ VERSION: 'js' + "5.3.0-alpha.3",
23
23
  APPLICATION_ID: null,
24
24
  JAVASCRIPT_KEY: null,
25
25
  MASTER_KEY: null,
@@ -103,7 +103,7 @@ const FacebookUtils = {
103
103
  }
104
104
  }
105
105
  if (initOptions.status && typeof console !== 'undefined') {
106
- const warn = console.warn || console.log || function () {}; // eslint-disable-line no-console
106
+ const warn = console.warn || console.log || function () {};
107
107
  warn.call(console, 'The "status" flag passed into' + ' FB.init, when set to true, can interfere with Parse Facebook' + ' integration, so it has been suppressed. Please call' + ' FB.getLoginStatus() explicitly if you require this behavior.');
108
108
  }
109
109
  initOptions.status = false;
@@ -53,7 +53,7 @@ const LocalDatastoreController = {
53
53
  const [key, value] = pair;
54
54
  try {
55
55
  LDS[key] = JSON.parse(value);
56
- } catch (error) {
56
+ } catch (_) {
57
57
  LDS[key] = null;
58
58
  }
59
59
  });
@@ -317,11 +317,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
317
317
  compareTo = parserResult.result;
318
318
  }
319
319
  // Compare Date Object or Date String
320
- if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' &&
321
- // @ts-ignore
322
- new Date(compareTo) !== 'Invalid Date' &&
323
- // @ts-ignore
324
- !isNaN(new Date(compareTo))) {
320
+ if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' && new Date(compareTo).toString() !== 'Invalid Date') {
325
321
  object[key] = new Date(object[key].iso ? object[key].iso : object[key]);
326
322
  }
327
323
  switch (condition) {
@@ -442,7 +438,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
442
438
  break;
443
439
  case '$select':
444
440
  {
445
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
441
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
446
442
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
447
443
  });
448
444
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -453,7 +449,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
453
449
  }
454
450
  case '$dontSelect':
455
451
  {
456
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
452
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
457
453
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
458
454
  });
459
455
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -464,7 +460,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
464
460
  }
465
461
  case '$inQuery':
466
462
  {
467
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
463
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
468
464
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
469
465
  });
470
466
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -477,7 +473,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
477
473
  }
478
474
  case '$notInQuery':
479
475
  {
480
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
476
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
481
477
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
482
478
  });
483
479
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -367,7 +367,7 @@ const Parse = {
367
367
  */
368
368
  dumpLocalDatastore() {
369
369
  if (!this.LocalDatastore.isEnabled) {
370
- console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
370
+ console.log('Parse.enableLocalDatastore() must be called first');
371
371
  return _promise.default.resolve({});
372
372
  } else {
373
373
  return Parse.LocalDatastore._getAllContents();