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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.3.0-alpha.2
2
+ * Parse JavaScript SDK v5.3.0-alpha.3
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -358,7 +358,7 @@ const config = {
358
358
  SERVER_AUTH_TOKEN: null,
359
359
  LIVEQUERY_SERVER_URL: null,
360
360
  ENCRYPTED_KEY: null,
361
- VERSION: 'js' + "5.3.0-alpha.2",
361
+ VERSION: 'js' + "5.3.0-alpha.3",
362
362
  APPLICATION_ID: null,
363
363
  JAVASCRIPT_KEY: null,
364
364
  MASTER_KEY: null,
@@ -1108,7 +1108,7 @@ const FacebookUtils = {
1108
1108
  }
1109
1109
  }
1110
1110
  if (initOptions.status && typeof console !== 'undefined') {
1111
- const warn = console.warn || console.log || function () {}; // eslint-disable-line no-console
1111
+ const warn = console.warn || console.log || function () {};
1112
1112
  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.');
1113
1113
  }
1114
1114
  initOptions.status = false;
@@ -2532,7 +2532,7 @@ const LocalDatastoreController = {
2532
2532
  const [key, value] = pair;
2533
2533
  try {
2534
2534
  LDS[key] = JSON.parse(value);
2535
- } catch (error) {
2535
+ } catch (_) {
2536
2536
  LDS[key] = null;
2537
2537
  }
2538
2538
  });
@@ -3080,11 +3080,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
3080
3080
  compareTo = parserResult.result;
3081
3081
  }
3082
3082
  // Compare Date Object or Date String
3083
- if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' &&
3084
- // @ts-ignore
3085
- new Date(compareTo) !== 'Invalid Date' &&
3086
- // @ts-ignore
3087
- !isNaN(new Date(compareTo))) {
3083
+ if (toString.call(compareTo) === '[object Date]' || typeof compareTo === 'string' && new Date(compareTo).toString() !== 'Invalid Date') {
3088
3084
  object[key] = new Date(object[key].iso ? object[key].iso : object[key]);
3089
3085
  }
3090
3086
  switch (condition) {
@@ -3205,7 +3201,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
3205
3201
  break;
3206
3202
  case '$select':
3207
3203
  {
3208
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
3204
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
3209
3205
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
3210
3206
  });
3211
3207
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -3216,7 +3212,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
3216
3212
  }
3217
3213
  case '$dontSelect':
3218
3214
  {
3219
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
3215
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
3220
3216
  return matchesQuery(compareTo.query.className, obj, arr, compareTo.query.where);
3221
3217
  });
3222
3218
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -3227,7 +3223,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
3227
3223
  }
3228
3224
  case '$inQuery':
3229
3225
  {
3230
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
3226
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
3231
3227
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
3232
3228
  });
3233
3229
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -3240,7 +3236,7 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
3240
3236
  }
3241
3237
  case '$notInQuery':
3242
3238
  {
3243
- const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, index, arr) => {
3239
+ const subQueryObjects = (0, _filter.default)(objects).call(objects, (obj, _index, arr) => {
3244
3240
  return matchesQuery(compareTo.className, obj, arr, compareTo.where);
3245
3241
  });
3246
3242
  for (let i = 0; i < subQueryObjects.length; i += 1) {
@@ -3688,7 +3684,7 @@ const Parse = {
3688
3684
  */
3689
3685
  dumpLocalDatastore() {
3690
3686
  if (!this.LocalDatastore.isEnabled) {
3691
- console.log('Parse.enableLocalDatastore() must be called first'); // eslint-disable-line no-console
3687
+ console.log('Parse.enableLocalDatastore() must be called first');
3692
3688
  return _promise.default.resolve({});
3693
3689
  } else {
3694
3690
  return Parse.LocalDatastore._getAllContents();
@@ -4756,7 +4752,7 @@ function decodePayload(data) {
4756
4752
  if (json && typeof json === 'object') {
4757
4753
  return (0, _decode.default)(json);
4758
4754
  }
4759
- } catch (e) {
4755
+ } catch (_) {
4760
4756
  return null;
4761
4757
  }
4762
4758
  }
@@ -5744,7 +5740,6 @@ const DefaultController = {
5744
5740
  throw new Error('saveFile can only be used with File-type sources.');
5745
5741
  }
5746
5742
  const base64Data = await new _promise.default((res, rej) => {
5747
- // eslint-disable-next-line no-undef
5748
5743
  const reader = new FileReader();
5749
5744
  reader.onload = () => res(reader.result);
5750
5745
  reader.onerror = error => rej(error);
@@ -6895,7 +6890,7 @@ class ParseObject {
6895
6890
  if (objectCache[attr] !== stringified) {
6896
6891
  dirty[attr] = val;
6897
6892
  }
6898
- } catch (e) {
6893
+ } catch (_) {
6899
6894
  // Error occurred, possibly by a nested unsaved pointer in a mutable container
6900
6895
  // No matter how it happened, it indicates a change in the attribute
6901
6896
  dirty[attr] = val;
@@ -10029,7 +10024,7 @@ class ParseQuery {
10029
10024
  _OfflineQuery.default.validateQuery(this);
10030
10025
  const localDatastore = _CoreManager.default.getLocalDatastore();
10031
10026
  const objects = await localDatastore._serializeObjectsFromPinName(this._localDatastorePinName);
10032
- let results = (0, _filter.default)(_context = (0, _map.default)(objects).call(objects, (json, index, arr) => {
10027
+ let results = (0, _filter.default)(_context = (0, _map.default)(objects).call(objects, (json, _index, arr) => {
10033
10028
  const object = _ParseObject.default.fromJSON(json, false);
10034
10029
  if (json._localId && !json.objectId) {
10035
10030
  object._localId = json._localId;
@@ -12770,7 +12765,7 @@ class ParseUser extends _ParseObject.default {
12770
12765
  reject(error);
12771
12766
  });
12772
12767
  },
12773
- error: (provider, error) => {
12768
+ error: (_provider, error) => {
12774
12769
  reject(error);
12775
12770
  }
12776
12771
  });
@@ -14028,7 +14023,7 @@ let useXDomainRequest = false;
14028
14023
  if (typeof XDomainRequest !== 'undefined' && !('withCredentials' in new XMLHttpRequest())) {
14029
14024
  useXDomainRequest = true;
14030
14025
  }
14031
- function ajaxIE9(method, url, data, headers, options) {
14026
+ function ajaxIE9(method, url, data, _headers, options) {
14032
14027
  return new _promise.default((resolve, reject) => {
14033
14028
  // @ts-ignore
14034
14029
  const xdr = new XDomainRequest();
@@ -14291,7 +14286,7 @@ const RESTController = {
14291
14286
  try {
14292
14287
  const errorJSON = JSON.parse(response.responseText);
14293
14288
  error = new _ParseError.default(errorJSON.code, errorJSON.error);
14294
- } catch (e) {
14289
+ } catch (_) {
14295
14290
  // If we fail to parse the error text, that's okay.
14296
14291
  error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
14297
14292
  }
@@ -14812,7 +14807,7 @@ const StorageController = {
14812
14807
  try {
14813
14808
  // @ts-ignore
14814
14809
  wx.setStorageSync(path, value);
14815
- } catch (e) {
14810
+ } catch (_) {
14816
14811
  // Quota exceeded
14817
14812
  }
14818
14813
  },