parse 6.1.0 → 6.1.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.
Files changed (60) hide show
  1. package/dist/parse.js +28 -38
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +28 -38
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/CoreManager.js +1 -1
  6. package/lib/browser/Parse.js +14 -14
  7. package/lib/browser/ParseObject.js +2 -1
  8. package/lib/browser/ParseOp.js +1 -1
  9. package/lib/browser/ParseQuery.js +8 -20
  10. package/lib/browser/TaskQueue.js +1 -0
  11. package/lib/node/CoreManager.js +1 -1
  12. package/lib/node/Parse.js +14 -14
  13. package/lib/node/ParseObject.js +2 -1
  14. package/lib/node/ParseOp.js +1 -1
  15. package/lib/node/ParseQuery.js +8 -20
  16. package/lib/node/TaskQueue.js +1 -0
  17. package/lib/react-native/CoreManager.js +1 -1
  18. package/lib/react-native/ObjectStateMutations.js +13 -13
  19. package/lib/react-native/ParseACL.js +7 -7
  20. package/lib/react-native/ParseCLP.js +15 -15
  21. package/lib/react-native/ParseObject.js +9 -9
  22. package/lib/react-native/ParseQuery.js +8 -16
  23. package/lib/react-native/ParseUser.js +15 -15
  24. package/lib/weapp/CoreManager.js +1 -1
  25. package/lib/weapp/Parse.js +14 -14
  26. package/lib/weapp/ParseObject.js +2 -1
  27. package/lib/weapp/ParseOp.js +1 -1
  28. package/lib/weapp/ParseQuery.js +8 -20
  29. package/lib/weapp/TaskQueue.js +1 -0
  30. package/package.json +8 -8
  31. package/types/Analytics.d.ts +1 -3
  32. package/types/CoreManager.d.ts +56 -62
  33. package/types/LocalDatastore.d.ts +3 -3
  34. package/types/LocalDatastoreController.default.d.ts +1 -1
  35. package/types/LocalDatastoreController.react-native.d.ts +1 -1
  36. package/types/ObjectStateMutations.d.ts +12 -18
  37. package/types/Parse.d.ts +63 -324
  38. package/types/ParseACL.d.ts +2 -6
  39. package/types/ParseCLP.d.ts +2 -6
  40. package/types/ParseConfig.d.ts +3 -11
  41. package/types/ParseFile.d.ts +8 -12
  42. package/types/ParseInstallation.d.ts +4 -4
  43. package/types/ParseObject.d.ts +24 -26
  44. package/types/ParseOp.d.ts +13 -15
  45. package/types/ParsePolygon.d.ts +3 -3
  46. package/types/ParseQuery.d.ts +39 -55
  47. package/types/ParseSchema.d.ts +12 -28
  48. package/types/ParseUser.d.ts +8 -14
  49. package/types/Push.d.ts +2 -2
  50. package/types/RESTController.d.ts +4 -4
  51. package/types/SingleInstanceStateController.d.ts +1 -1
  52. package/types/Storage.d.ts +2 -2
  53. package/types/StorageController.react-native.d.ts +2 -2
  54. package/types/TaskQueue.d.ts +3 -3
  55. package/types/UniqueInstanceStateController.d.ts +1 -1
  56. package/types/arrayContainsObject.d.ts +1 -1
  57. package/types/encode.d.ts +1 -1
  58. package/types/eslint.config.mjs +30 -0
  59. package/types/unique.d.ts +1 -1
  60. package/types/unsavedChildren.d.ts +1 -1
@@ -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' + "6.1.0",
22
+ VERSION: 'js' + "6.1.1",
23
23
  APPLICATION_ID: null,
24
24
  JAVASCRIPT_KEY: null,
25
25
  MAINTENANCE_KEY: null,
@@ -109,7 +109,7 @@ const Parse = {
109
109
  Hooks: undefined,
110
110
  Parse: undefined,
111
111
  /**
112
- * @member {EventuallyQueue} Parse.EventuallyQueue
112
+ * @property {EventuallyQueue} Parse.EventuallyQueue
113
113
  * @static
114
114
  */
115
115
  set EventuallyQueue(queue) {
@@ -179,7 +179,7 @@ const Parse = {
179
179
  return _CoreManager.default.getRESTController().request('GET', 'health');
180
180
  },
181
181
  /**
182
- * @member {string} Parse.applicationId
182
+ * @property {string} Parse.applicationId
183
183
  * @static
184
184
  */
185
185
  set applicationId(value) {
@@ -189,7 +189,7 @@ const Parse = {
189
189
  return _CoreManager.default.get('APPLICATION_ID');
190
190
  },
191
191
  /**
192
- * @member {string} Parse.javaScriptKey
192
+ * @property {string} Parse.javaScriptKey
193
193
  * @static
194
194
  */
195
195
  set javaScriptKey(value) {
@@ -199,7 +199,7 @@ const Parse = {
199
199
  return _CoreManager.default.get('JAVASCRIPT_KEY');
200
200
  },
201
201
  /**
202
- * @member {string} Parse.masterKey
202
+ * @property {string} Parse.masterKey
203
203
  * @static
204
204
  */
205
205
  set masterKey(value) {
@@ -209,7 +209,7 @@ const Parse = {
209
209
  return _CoreManager.default.get('MASTER_KEY');
210
210
  },
211
211
  /**
212
- * @member {string} Parse.maintenanceKey
212
+ * @property {string} Parse.maintenanceKey
213
213
  * @static
214
214
  */
215
215
  set maintenanceKey(value) {
@@ -219,7 +219,7 @@ const Parse = {
219
219
  return _CoreManager.default.get('MAINTENANCE_KEY');
220
220
  },
221
221
  /**
222
- * @member {string} Parse.serverURL
222
+ * @property {string} Parse.serverURL
223
223
  * @static
224
224
  */
225
225
  set serverURL(value) {
@@ -229,7 +229,7 @@ const Parse = {
229
229
  return _CoreManager.default.get('SERVER_URL');
230
230
  },
231
231
  /**
232
- * @member {string} Parse.serverAuthToken
232
+ * @property {string} Parse.serverAuthToken
233
233
  * @static
234
234
  */
235
235
  set serverAuthToken(value) {
@@ -239,7 +239,7 @@ const Parse = {
239
239
  return _CoreManager.default.get('SERVER_AUTH_TOKEN');
240
240
  },
241
241
  /**
242
- * @member {string} Parse.serverAuthType
242
+ * @property {string} Parse.serverAuthType
243
243
  * @static
244
244
  */
245
245
  set serverAuthType(value) {
@@ -249,7 +249,7 @@ const Parse = {
249
249
  return _CoreManager.default.get('SERVER_AUTH_TYPE');
250
250
  },
251
251
  /**
252
- * @member {ParseLiveQuery} Parse.LiveQuery
252
+ * @property {ParseLiveQuery} Parse.LiveQuery
253
253
  * @static
254
254
  */
255
255
  set LiveQuery(liveQuery) {
@@ -259,7 +259,7 @@ const Parse = {
259
259
  return _CoreManager.default.getLiveQuery();
260
260
  },
261
261
  /**
262
- * @member {string} Parse.liveQueryServerURL
262
+ * @property {string} Parse.liveQueryServerURL
263
263
  * @static
264
264
  */
265
265
  set liveQueryServerURL(value) {
@@ -269,7 +269,7 @@ const Parse = {
269
269
  return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
270
270
  },
271
271
  /**
272
- * @member {boolean} Parse.encryptedUser
272
+ * @property {boolean} Parse.encryptedUser
273
273
  * @static
274
274
  */
275
275
  set encryptedUser(value) {
@@ -279,7 +279,7 @@ const Parse = {
279
279
  return _CoreManager.default.get('ENCRYPTED_USER');
280
280
  },
281
281
  /**
282
- * @member {string} Parse.secret
282
+ * @property {string} Parse.secret
283
283
  * @static
284
284
  */
285
285
  set secret(value) {
@@ -289,7 +289,7 @@ const Parse = {
289
289
  return _CoreManager.default.get('ENCRYPTED_KEY');
290
290
  },
291
291
  /**
292
- * @member {boolean} Parse.idempotency
292
+ * @property {boolean} Parse.idempotency
293
293
  * @static
294
294
  */
295
295
  set idempotency(value) {
@@ -299,7 +299,7 @@ const Parse = {
299
299
  return _CoreManager.default.get('IDEMPOTENCY');
300
300
  },
301
301
  /**
302
- * @member {boolean} Parse.allowCustomObjectId
302
+ * @property {boolean} Parse.allowCustomObjectId
303
303
  * @static
304
304
  */
305
305
  set allowCustomObjectId(value) {
@@ -1362,7 +1362,7 @@ class ParseObject {
1362
1362
  */
1363
1363
  destroy(options) {
1364
1364
  if (!this.id) {
1365
- return _promise.default.resolve();
1365
+ return _promise.default.resolve(undefined);
1366
1366
  }
1367
1367
  const destroyOptions = ParseObject._getRequestOptions(options);
1368
1368
  return _CoreManager.default.getObjectController().destroy(this, destroyOptions);
@@ -2346,6 +2346,7 @@ const DefaultController = {
2346
2346
  const batchReady = [];
2347
2347
  const batchTasks = [];
2348
2348
  (0, _forEach.default)(batch).call(batch, (obj, index) => {
2349
+ // eslint-disable-next-line
2349
2350
  const ready = (0, _promiseUtils.resolvingPromise)();
2350
2351
  batchReady.push(ready);
2351
2352
  stateController.pushPendingState(obj._getStateIdentifier());
@@ -70,7 +70,7 @@ function opFromJSON(json) {
70
70
  class Op {
71
71
  // Empty parent class
72
72
  applyTo() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
73
- mergeWith() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
73
+ mergeWith() {} /* eslint-disable-line */
74
74
  toJSON() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
75
75
  }
76
76
  exports.Op = Op;
@@ -691,25 +691,19 @@ class ParseQuery {
691
691
  * Executes a distinct query and returns unique values
692
692
  *
693
693
  * @param {string} key A field to find distinct values
694
- * @param {object} options
695
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
696
694
  * @returns {Promise} A promise that is resolved with the query completes.
697
695
  */
698
- distinct(key, options) {
699
- options = options || {};
696
+ distinct(key) {
700
697
  const distinctOptions = {
701
698
  useMasterKey: true
702
699
  };
703
- if (Object.hasOwn(options, 'sessionToken')) {
704
- distinctOptions.sessionToken = options.sessionToken;
705
- }
706
700
  this._setRequestTask(distinctOptions);
707
- const controller = _CoreManager.default.getQueryController();
708
701
  const params = {
709
702
  distinct: key,
710
703
  where: this._where,
711
704
  hint: this._hint
712
705
  };
706
+ const controller = _CoreManager.default.getQueryController();
713
707
  return controller.aggregate(this.className, params, distinctOptions).then(results => {
714
708
  return results.results;
715
709
  });
@@ -719,20 +713,9 @@ class ParseQuery {
719
713
  * Executes an aggregate query and returns aggregate results
720
714
  *
721
715
  * @param {(Array|object)} pipeline Array or Object of stages to process query
722
- * @param {object} options
723
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
724
716
  * @returns {Promise} A promise that is resolved with the query completes.
725
717
  */
726
- aggregate(pipeline, options) {
727
- options = options || {};
728
- const aggregateOptions = {
729
- useMasterKey: true
730
- };
731
- if (Object.hasOwn(options, 'sessionToken')) {
732
- aggregateOptions.sessionToken = options.sessionToken;
733
- }
734
- this._setRequestTask(aggregateOptions);
735
- const controller = _CoreManager.default.getQueryController();
718
+ aggregate(pipeline) {
736
719
  if (!(0, _isArray.default)(pipeline) && typeof pipeline !== 'object') {
737
720
  throw new Error('Invalid pipeline must be Array or Object');
738
721
  }
@@ -750,6 +733,11 @@ class ParseQuery {
750
733
  explain: this._explain,
751
734
  readPreference: this._readPreference
752
735
  };
736
+ const aggregateOptions = {
737
+ useMasterKey: true
738
+ };
739
+ this._setRequestTask(aggregateOptions);
740
+ const controller = _CoreManager.default.getQueryController();
753
741
  return controller.aggregate(this.className, params, aggregateOptions).then(results => {
754
742
  return results.results;
755
743
  });
@@ -14,6 +14,7 @@ class TaskQueue {
14
14
  this.queue = [];
15
15
  }
16
16
  enqueue(task) {
17
+ // eslint-disable-next-line
17
18
  const taskComplete = (0, _promiseUtils.resolvingPromise)();
18
19
  this.queue.push({
19
20
  task: task,
@@ -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' + "6.1.0",
19
+ VERSION: 'js' + "6.1.1",
20
20
  APPLICATION_ID: null,
21
21
  JAVASCRIPT_KEY: null,
22
22
  MAINTENANCE_KEY: null,
package/lib/node/Parse.js CHANGED
@@ -110,7 +110,7 @@ const Parse = {
110
110
  Hooks: undefined,
111
111
  Parse: undefined,
112
112
  /**
113
- * @member {EventuallyQueue} Parse.EventuallyQueue
113
+ * @property {EventuallyQueue} Parse.EventuallyQueue
114
114
  * @static
115
115
  */
116
116
  set EventuallyQueue(queue) {
@@ -176,7 +176,7 @@ const Parse = {
176
176
  return _CoreManager.default.getRESTController().request('GET', 'health');
177
177
  },
178
178
  /**
179
- * @member {string} Parse.applicationId
179
+ * @property {string} Parse.applicationId
180
180
  * @static
181
181
  */
182
182
  set applicationId(value) {
@@ -186,7 +186,7 @@ const Parse = {
186
186
  return _CoreManager.default.get('APPLICATION_ID');
187
187
  },
188
188
  /**
189
- * @member {string} Parse.javaScriptKey
189
+ * @property {string} Parse.javaScriptKey
190
190
  * @static
191
191
  */
192
192
  set javaScriptKey(value) {
@@ -196,7 +196,7 @@ const Parse = {
196
196
  return _CoreManager.default.get('JAVASCRIPT_KEY');
197
197
  },
198
198
  /**
199
- * @member {string} Parse.masterKey
199
+ * @property {string} Parse.masterKey
200
200
  * @static
201
201
  */
202
202
  set masterKey(value) {
@@ -206,7 +206,7 @@ const Parse = {
206
206
  return _CoreManager.default.get('MASTER_KEY');
207
207
  },
208
208
  /**
209
- * @member {string} Parse.maintenanceKey
209
+ * @property {string} Parse.maintenanceKey
210
210
  * @static
211
211
  */
212
212
  set maintenanceKey(value) {
@@ -216,7 +216,7 @@ const Parse = {
216
216
  return _CoreManager.default.get('MAINTENANCE_KEY');
217
217
  },
218
218
  /**
219
- * @member {string} Parse.serverURL
219
+ * @property {string} Parse.serverURL
220
220
  * @static
221
221
  */
222
222
  set serverURL(value) {
@@ -226,7 +226,7 @@ const Parse = {
226
226
  return _CoreManager.default.get('SERVER_URL');
227
227
  },
228
228
  /**
229
- * @member {string} Parse.serverAuthToken
229
+ * @property {string} Parse.serverAuthToken
230
230
  * @static
231
231
  */
232
232
  set serverAuthToken(value) {
@@ -236,7 +236,7 @@ const Parse = {
236
236
  return _CoreManager.default.get('SERVER_AUTH_TOKEN');
237
237
  },
238
238
  /**
239
- * @member {string} Parse.serverAuthType
239
+ * @property {string} Parse.serverAuthType
240
240
  * @static
241
241
  */
242
242
  set serverAuthType(value) {
@@ -246,7 +246,7 @@ const Parse = {
246
246
  return _CoreManager.default.get('SERVER_AUTH_TYPE');
247
247
  },
248
248
  /**
249
- * @member {ParseLiveQuery} Parse.LiveQuery
249
+ * @property {ParseLiveQuery} Parse.LiveQuery
250
250
  * @static
251
251
  */
252
252
  set LiveQuery(liveQuery) {
@@ -256,7 +256,7 @@ const Parse = {
256
256
  return _CoreManager.default.getLiveQuery();
257
257
  },
258
258
  /**
259
- * @member {string} Parse.liveQueryServerURL
259
+ * @property {string} Parse.liveQueryServerURL
260
260
  * @static
261
261
  */
262
262
  set liveQueryServerURL(value) {
@@ -266,7 +266,7 @@ const Parse = {
266
266
  return _CoreManager.default.get('LIVEQUERY_SERVER_URL');
267
267
  },
268
268
  /**
269
- * @member {boolean} Parse.encryptedUser
269
+ * @property {boolean} Parse.encryptedUser
270
270
  * @static
271
271
  */
272
272
  set encryptedUser(value) {
@@ -276,7 +276,7 @@ const Parse = {
276
276
  return _CoreManager.default.get('ENCRYPTED_USER');
277
277
  },
278
278
  /**
279
- * @member {string} Parse.secret
279
+ * @property {string} Parse.secret
280
280
  * @static
281
281
  */
282
282
  set secret(value) {
@@ -286,7 +286,7 @@ const Parse = {
286
286
  return _CoreManager.default.get('ENCRYPTED_KEY');
287
287
  },
288
288
  /**
289
- * @member {boolean} Parse.idempotency
289
+ * @property {boolean} Parse.idempotency
290
290
  * @static
291
291
  */
292
292
  set idempotency(value) {
@@ -296,7 +296,7 @@ const Parse = {
296
296
  return _CoreManager.default.get('IDEMPOTENCY');
297
297
  },
298
298
  /**
299
- * @member {boolean} Parse.allowCustomObjectId
299
+ * @property {boolean} Parse.allowCustomObjectId
300
300
  * @static
301
301
  */
302
302
  set allowCustomObjectId(value) {
@@ -1342,7 +1342,7 @@ class ParseObject {
1342
1342
  */
1343
1343
  destroy(options) {
1344
1344
  if (!this.id) {
1345
- return Promise.resolve();
1345
+ return Promise.resolve(undefined);
1346
1346
  }
1347
1347
  const destroyOptions = ParseObject._getRequestOptions(options);
1348
1348
  return _CoreManager.default.getObjectController().destroy(this, destroyOptions);
@@ -2325,6 +2325,7 @@ const DefaultController = {
2325
2325
  const batchReady = [];
2326
2326
  const batchTasks = [];
2327
2327
  batch.forEach((obj, index) => {
2328
+ // eslint-disable-next-line
2328
2329
  const ready = (0, _promiseUtils.resolvingPromise)();
2329
2330
  batchReady.push(ready);
2330
2331
  stateController.pushPendingState(obj._getStateIdentifier());
@@ -66,7 +66,7 @@ function opFromJSON(json) {
66
66
  class Op {
67
67
  // Empty parent class
68
68
  applyTo() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
69
- mergeWith() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
69
+ mergeWith() {} /* eslint-disable-line */
70
70
  toJSON() {} /* eslint-disable-line @typescript-eslint/no-unused-vars */
71
71
  }
72
72
  exports.Op = Op;
@@ -655,25 +655,19 @@ class ParseQuery {
655
655
  * Executes a distinct query and returns unique values
656
656
  *
657
657
  * @param {string} key A field to find distinct values
658
- * @param {object} options
659
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
660
658
  * @returns {Promise} A promise that is resolved with the query completes.
661
659
  */
662
- distinct(key, options) {
663
- options = options || {};
660
+ distinct(key) {
664
661
  const distinctOptions = {
665
662
  useMasterKey: true
666
663
  };
667
- if (Object.hasOwn(options, 'sessionToken')) {
668
- distinctOptions.sessionToken = options.sessionToken;
669
- }
670
664
  this._setRequestTask(distinctOptions);
671
- const controller = _CoreManager.default.getQueryController();
672
665
  const params = {
673
666
  distinct: key,
674
667
  where: this._where,
675
668
  hint: this._hint
676
669
  };
670
+ const controller = _CoreManager.default.getQueryController();
677
671
  return controller.aggregate(this.className, params, distinctOptions).then(results => {
678
672
  return results.results;
679
673
  });
@@ -683,20 +677,9 @@ class ParseQuery {
683
677
  * Executes an aggregate query and returns aggregate results
684
678
  *
685
679
  * @param {(Array|object)} pipeline Array or Object of stages to process query
686
- * @param {object} options
687
- * @param {string} [options.sessionToken] A valid session token, used for making a request on behalf of a specific user.
688
680
  * @returns {Promise} A promise that is resolved with the query completes.
689
681
  */
690
- aggregate(pipeline, options) {
691
- options = options || {};
692
- const aggregateOptions = {
693
- useMasterKey: true
694
- };
695
- if (Object.hasOwn(options, 'sessionToken')) {
696
- aggregateOptions.sessionToken = options.sessionToken;
697
- }
698
- this._setRequestTask(aggregateOptions);
699
- const controller = _CoreManager.default.getQueryController();
682
+ aggregate(pipeline) {
700
683
  if (!Array.isArray(pipeline) && typeof pipeline !== 'object') {
701
684
  throw new Error('Invalid pipeline must be Array or Object');
702
685
  }
@@ -714,6 +697,11 @@ class ParseQuery {
714
697
  explain: this._explain,
715
698
  readPreference: this._readPreference
716
699
  };
700
+ const aggregateOptions = {
701
+ useMasterKey: true
702
+ };
703
+ this._setRequestTask(aggregateOptions);
704
+ const controller = _CoreManager.default.getQueryController();
717
705
  return controller.aggregate(this.className, params, aggregateOptions).then(results => {
718
706
  return results.results;
719
707
  });
@@ -10,6 +10,7 @@ class TaskQueue {
10
10
  this.queue = [];
11
11
  }
12
12
  enqueue(task) {
13
+ // eslint-disable-next-line
13
14
  const taskComplete = (0, _promiseUtils.resolvingPromise)();
14
15
  this.queue.push({
15
16
  task: task,
@@ -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' + "6.1.0",
15
+ VERSION: 'js' + "6.1.1",
16
16
  APPLICATION_ID: null,
17
17
  JAVASCRIPT_KEY: null,
18
18
  MAINTENANCE_KEY: null,
@@ -28,11 +28,11 @@ function defaultState() {
28
28
  };
29
29
  }
30
30
  function setServerData(serverData, attributes) {
31
- for (var _attr in attributes) {
32
- if (typeof attributes[_attr] !== 'undefined') {
33
- serverData[_attr] = attributes[_attr];
31
+ for (var attr in attributes) {
32
+ if (typeof attributes[attr] !== 'undefined') {
33
+ serverData[attr] = attributes[attr];
34
34
  } else {
35
- delete serverData[_attr];
35
+ delete serverData[attr];
36
36
  }
37
37
  }
38
38
  }
@@ -57,14 +57,14 @@ function popPendingState(pendingOps) {
57
57
  function mergeFirstPendingState(pendingOps) {
58
58
  var first = popPendingState(pendingOps);
59
59
  var next = pendingOps[0];
60
- for (var _attr2 in first) {
61
- if (next[_attr2] && first[_attr2]) {
62
- var merged = next[_attr2].mergeWith(first[_attr2]);
60
+ for (var attr in first) {
61
+ if (next[attr] && first[attr]) {
62
+ var merged = next[attr].mergeWith(first[attr]);
63
63
  if (merged) {
64
- next[_attr2] = merged;
64
+ next[attr] = merged;
65
65
  }
66
66
  } else {
67
- next[_attr2] = first[_attr2];
67
+ next[attr] = first[attr];
68
68
  }
69
69
  }
70
70
  }
@@ -148,12 +148,12 @@ function nestedSet(obj, key, value) {
148
148
  }
149
149
  function commitServerChanges(serverData, objectCache, changes) {
150
150
  var ParseObject = _CoreManager.default.getParseObject();
151
- for (var _attr3 in changes) {
152
- var val = changes[_attr3];
153
- nestedSet(serverData, _attr3, val);
151
+ for (var attr in changes) {
152
+ var val = changes[attr];
153
+ nestedSet(serverData, attr, val);
154
154
  if (val && typeof val === 'object' && !(val instanceof ParseObject) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
155
155
  var json = (0, _encode.default)(val, false, true);
156
- objectCache[_attr3] = JSON.stringify(json);
156
+ objectCache[attr] = JSON.stringify(json);
157
157
  }
158
158
  }
159
159
  }
@@ -17,18 +17,18 @@ var ParseACL = function () {
17
17
  this.setReadAccess(arg1, true);
18
18
  this.setWriteAccess(arg1, true);
19
19
  } else {
20
- for (var _userId in arg1) {
21
- var accessList = arg1[_userId];
22
- this.permissionsById[_userId] = {};
23
- for (var _permission in accessList) {
24
- var allowed = accessList[_permission];
25
- if (_permission !== 'read' && _permission !== 'write') {
20
+ for (var userId in arg1) {
21
+ var accessList = arg1[userId];
22
+ this.permissionsById[userId] = {};
23
+ for (var permission in accessList) {
24
+ var allowed = accessList[permission];
25
+ if (permission !== 'read' && permission !== 'write') {
26
26
  throw new TypeError('Tried to create an ACL with an invalid permission type.');
27
27
  }
28
28
  if (typeof allowed !== 'boolean') {
29
29
  throw new TypeError('Tried to create an ACL with an invalid permission value.');
30
30
  }
31
- this.permissionsById[_userId][_permission] = allowed;
31
+ this.permissionsById[userId][permission] = allowed;
32
32
  }
33
33
  }
34
34
  }
@@ -78,19 +78,19 @@ var ParseCLP = function () {
78
78
  this.setRoleReadAccess(userId, true);
79
79
  this.setRoleWriteAccess(userId, true);
80
80
  } else {
81
- for (var _permission in userId) {
82
- var users = userId[_permission];
83
- var isValidPermission = !!VALID_PERMISSIONS.get(_permission);
84
- var isValidPermissionExtended = !!VALID_PERMISSIONS_EXTENDED.get(_permission);
85
- var isValidGroupPermission = ['readUserFields', 'writeUserFields'].includes(_permission);
86
- if (typeof _permission !== 'string' || !(isValidPermission || isValidPermissionExtended || isValidGroupPermission)) {
81
+ for (var permission in userId) {
82
+ var users = userId[permission];
83
+ var isValidPermission = !!VALID_PERMISSIONS.get(permission);
84
+ var isValidPermissionExtended = !!VALID_PERMISSIONS_EXTENDED.get(permission);
85
+ var isValidGroupPermission = ['readUserFields', 'writeUserFields'].includes(permission);
86
+ if (typeof permission !== 'string' || !(isValidPermission || isValidPermissionExtended || isValidGroupPermission)) {
87
87
  throw new TypeError('Tried to create an CLP with an invalid permission type.');
88
88
  }
89
89
  if (isValidGroupPermission) {
90
90
  if (users.every(function (pointer) {
91
91
  return typeof pointer === 'string';
92
92
  })) {
93
- this.permissionsMap[_permission] = users;
93
+ this.permissionsMap[permission] = users;
94
94
  continue;
95
95
  } else {
96
96
  throw new TypeError('Tried to create an CLP with an invalid permission value.');
@@ -101,7 +101,7 @@ var ParseCLP = function () {
101
101
  if (typeof allowed !== 'boolean' && !isValidPermissionExtended && user !== 'pointerFields') {
102
102
  throw new TypeError('Tried to create an CLP with an invalid permission value.');
103
103
  }
104
- this.permissionsMap[_permission][user] = allowed;
104
+ this.permissionsMap[permission][user] = allowed;
105
105
  }
106
106
  }
107
107
  }
@@ -125,20 +125,20 @@ var ParseCLP = function () {
125
125
  if (permissions.length !== otherPermissions.length) {
126
126
  return false;
127
127
  }
128
- for (var _permission2 in this.permissionsMap) {
129
- if (!other.permissionsMap[_permission2]) {
128
+ for (var permission in this.permissionsMap) {
129
+ if (!other.permissionsMap[permission]) {
130
130
  return false;
131
131
  }
132
- var users = Object.keys(this.permissionsMap[_permission2]);
133
- var otherUsers = Object.keys(other.permissionsMap[_permission2]);
132
+ var users = Object.keys(this.permissionsMap[permission]);
133
+ var otherUsers = Object.keys(other.permissionsMap[permission]);
134
134
  if (users.length !== otherUsers.length) {
135
135
  return false;
136
136
  }
137
- for (var user in this.permissionsMap[_permission2]) {
138
- if (!other.permissionsMap[_permission2][user]) {
137
+ for (var user in this.permissionsMap[permission]) {
138
+ if (!other.permissionsMap[permission][user]) {
139
139
  return false;
140
140
  }
141
- if (this.permissionsMap[_permission2][user] !== other.permissionsMap[_permission2][user]) {
141
+ if (this.permissionsMap[permission][user] !== other.permissionsMap[permission][user]) {
142
142
  return false;
143
143
  }
144
144
  }
@@ -740,9 +740,9 @@ var ParseObject = function () {
740
740
  if (Object.hasOwn(attrs, 'ACL') && !(attrs.ACL instanceof _ParseACL.default)) {
741
741
  return new _ParseError.default(_ParseError.default.OTHER_CAUSE, 'ACL must be a Parse ACL.');
742
742
  }
743
- for (var _key in attrs) {
744
- if (!/^[A-Za-z_][0-9A-Za-z_.]*$/.test(_key)) {
745
- return new _ParseError.default(_ParseError.default.INVALID_KEY_NAME, `Invalid key name: ${_key}`);
743
+ for (var key in attrs) {
744
+ if (!/^[A-Za-z_][0-9A-Za-z_.]*$/.test(key)) {
745
+ return new _ParseError.default(_ParseError.default.INVALID_KEY_NAME, `Invalid key name: ${key}`);
746
746
  }
747
747
  }
748
748
  return false;
@@ -765,14 +765,14 @@ var ParseObject = function () {
765
765
  key: "revert",
766
766
  value: function () {
767
767
  var keysToRevert;
768
- for (var _len = arguments.length, keys = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
769
- keys[_key2] = arguments[_key2];
768
+ for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {
769
+ keys[_key] = arguments[_key];
770
770
  }
771
771
  if (keys.length) {
772
772
  keysToRevert = [];
773
- for (var _key3 of keys) {
774
- if (typeof _key3 === 'string') {
775
- keysToRevert.push(_key3);
773
+ for (var key of keys) {
774
+ if (typeof key === 'string') {
775
+ keysToRevert.push(key);
776
776
  } else {
777
777
  throw new Error('Parse.Object#revert expects either no, or a list of string, arguments.');
778
778
  }
@@ -901,7 +901,7 @@ var ParseObject = function () {
901
901
  key: "destroy",
902
902
  value: function (options) {
903
903
  if (!this.id) {
904
- return Promise.resolve();
904
+ return Promise.resolve(undefined);
905
905
  }
906
906
  var destroyOptions = ParseObject._getRequestOptions(options);
907
907
  return _CoreManager.default.getObjectController().destroy(this, destroyOptions);