parse 5.0.0-alpha.1 → 5.0.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.
package/README.md CHANGED
@@ -29,8 +29,8 @@ A library that gives you access to the powerful Parse Server backend from your J
29
29
  - [Getting Started](#getting-started)
30
30
  - [Using Parse on Different Platforms](#using-parse-on-different-platforms)
31
31
  - [Compatibility](#compatibility)
32
+ - [Parse Server](#parse-server)
32
33
  - [Node.js](#nodejs)
33
- - [Upgrading to Parse SDK 2.0.0](#upgrading-to-parse-sdk-200)
34
34
  - [3rd Party Authentications](#3rd-party-authentications)
35
35
  - [Experimenting](#experimenting)
36
36
  - [Contributing](#contributing)
@@ -91,21 +91,23 @@ Types are updated manually after every release. If a definition doesn't exist, p
91
91
 
92
92
  ## Compatibility
93
93
 
94
+ ### Parse Server
95
+
96
+ Parse JS SDK is compatible with the following versions of Parse Server.
97
+
98
+ | Parse JS SDK | Parse Server |
99
+ |--------------|--------------|
100
+ | 4.x.x | <= 6.x.x |
101
+ | 5.x.x | >= 7.x.x |
102
+
94
103
  ### Node.js
95
104
 
96
105
  Parse JS SDK is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [Node.js Long Term Support plan](https://github.com/nodejs/Release) and only test against versions that are officially supported and have not reached their end-of-life date.
97
106
 
98
107
  | Version | Latest Version | End-of-Life | Compatible |
99
108
  |------------|----------------|-------------|------------|
100
- | Node.js 18 | 18.19.0 | April 2025 | ✅ Yes |
101
- | Node.js 20 | 20.10.0 | April 2026 | ✅ Yes |
102
-
103
-
104
- ## Upgrading to Parse SDK 2.0.0
105
-
106
- With Parse SDK 2.0.0, gone are the backbone style callbacks and Parse.Promises.
107
-
108
- We have curated a [migration guide][migration] that should help you migrate your code.
109
+ | Node.js 18 | 18.19.0 | April 2025 | ✅ Yes |
110
+ | Node.js 20 | 20.10.0 | April 2026 | ✅ Yes |
109
111
 
110
112
  ## 3rd Party Authentications
111
113
 
@@ -130,6 +132,5 @@ We really want Parse to be yours, to see it grow and thrive in the open source c
130
132
  [contributing]: https://github.com/parse-community/Parse-SDK-JS/blob/master/CONTRIBUTING.md
131
133
  [custom-auth-module]: https://docs.parseplatform.org/js/guide/#custom-authentication-module
132
134
  [link-with]: https://docs.parseplatform.org/js/guide/#linking-users
133
- [migration]: https://github.com/parse-community/Parse-SDK-JS/blob/master/2.0.0.md
134
135
  [open-collective-link]: https://opencollective.com/parse-server
135
136
  [types-parse]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/parse
package/dist/parse.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v5.0.0-alpha.1
2
+ * Parse JavaScript SDK v5.0.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
@@ -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-alpha.1",
560
+ VERSION: 'js' + "5.0.0-alpha.3",
561
561
  APPLICATION_ID: null,
562
562
  JAVASCRIPT_KEY: null,
563
563
  MASTER_KEY: null,
@@ -1941,7 +1941,7 @@ var LiveQueryClient = /*#__PURE__*/function () {
1941
1941
  var className = query.className;
1942
1942
  var queryJSON = query.toJSON();
1943
1943
  var where = queryJSON.where;
1944
- var fields = (_queryJSON$keys = (0, _keys.default)(queryJSON)) === null || _queryJSON$keys === void 0 ? void 0 : _queryJSON$keys.split(',');
1944
+ var keys = (_queryJSON$keys = (0, _keys.default)(queryJSON)) === null || _queryJSON$keys === void 0 ? void 0 : _queryJSON$keys.split(',');
1945
1945
  var watch = (_queryJSON$watch = queryJSON.watch) === null || _queryJSON$watch === void 0 ? void 0 : _queryJSON$watch.split(',');
1946
1946
  var subscribeRequest = {
1947
1947
  op: OP_TYPES.SUBSCRIBE,
@@ -1949,7 +1949,7 @@ var LiveQueryClient = /*#__PURE__*/function () {
1949
1949
  query: {
1950
1950
  className: className,
1951
1951
  where: where,
1952
- fields: fields,
1952
+ keys: keys,
1953
1953
  watch: watch
1954
1954
  }
1955
1955
  };
@@ -11636,6 +11636,7 @@ var _LocalDatastoreUtils = _dereq_("./LocalDatastoreUtils");
11636
11636
  readPreference?: string,
11637
11637
  includeReadPreference?: string,
11638
11638
  subqueryReadPreference?: string,
11639
+ comment?: string,
11639
11640
  };*/
11640
11641
  /**
11641
11642
  * Converts a string into a regex that matches it.
@@ -11838,6 +11839,7 @@ var ParseQuery = /*#__PURE__*/function () {
11838
11839
  (0, _defineProperty2.default)(this, "_hint", void 0);
11839
11840
  (0, _defineProperty2.default)(this, "_explain", void 0);
11840
11841
  (0, _defineProperty2.default)(this, "_xhrRequest", void 0);
11842
+ (0, _defineProperty2.default)(this, "_comment", void 0);
11841
11843
  if (typeof objectClass === 'string') {
11842
11844
  if (objectClass === 'User' && _CoreManager.default.get('PERFORM_USER_REWRITE')) {
11843
11845
  this.className = '_User';
@@ -11873,6 +11875,7 @@ var ParseQuery = /*#__PURE__*/function () {
11873
11875
  task: null,
11874
11876
  onchange: function () {}
11875
11877
  };
11878
+ this._comment = null;
11876
11879
  }
11877
11880
 
11878
11881
  /**
@@ -12089,6 +12092,9 @@ var ParseQuery = /*#__PURE__*/function () {
12089
12092
  if (this._explain) {
12090
12093
  params.explain = true;
12091
12094
  }
12095
+ if (this._comment) {
12096
+ params.comment = this._comment;
12097
+ }
12092
12098
  for (var _key3 in this._extraOptions) {
12093
12099
  params[_key3] = this._extraOptions[_key3];
12094
12100
  }
@@ -12161,10 +12167,13 @@ var ParseQuery = /*#__PURE__*/function () {
12161
12167
  if (json.explain) {
12162
12168
  this._explain = !!json.explain;
12163
12169
  }
12170
+ if (json.comment) {
12171
+ this._comment = json.comment;
12172
+ }
12164
12173
  for (var _key4 in json) {
12165
12174
  if (json.hasOwnProperty(_key4)) {
12166
12175
  var _context4;
12167
- if ((0, _indexOf.default)(_context4 = ['where', 'include', 'keys', 'count', 'limit', 'skip', 'order', 'readPreference', 'includeReadPreference', 'subqueryReadPreference', 'hint', 'explain']).call(_context4, _key4) === -1) {
12176
+ if ((0, _indexOf.default)(_context4 = ['where', 'include', 'keys', 'count', 'limit', 'skip', 'order', 'readPreference', 'includeReadPreference', 'subqueryReadPreference', 'hint', 'explain', 'comment']).call(_context4, _key4) === -1) {
12168
12177
  this._extraOptions[_key4] = json[_key4];
12169
12178
  }
12170
12179
  }
@@ -13890,6 +13899,27 @@ var ParseQuery = /*#__PURE__*/function () {
13890
13899
  _this16._xhrRequest.onchange();
13891
13900
  };
13892
13901
  }
13902
+
13903
+ /**
13904
+ * Sets a comment to the query so that the query
13905
+ *can be identified when using a the profiler for MongoDB.
13906
+ *
13907
+ * @param {string} value a comment can make your profile data easier to interpret and trace.
13908
+ * @returns {Parse.Query} Returns the query, so you can chain this call.
13909
+ */
13910
+ }, {
13911
+ key: "comment",
13912
+ value: function (value /*: string*/) /*: ParseQuery*/{
13913
+ if (value == null) {
13914
+ delete this._comment;
13915
+ return this;
13916
+ }
13917
+ if (typeof value !== 'string') {
13918
+ throw new Error('The value of a comment to be sent with this query must be a string.');
13919
+ }
13920
+ this._comment = value;
13921
+ return this;
13922
+ }
13893
13923
  }], [{
13894
13924
  key: "fromJSON",
13895
13925
  value: function (className /*: string*/, json /*: QueryJSON*/) /*: ParseQuery*/{