parse 5.3.0-alpha.1 → 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.
- package/dist/parse.js +531 -612
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +531 -610
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/FacebookUtils.js +1 -1
- package/lib/browser/LocalDatastoreController.react-native.js +1 -1
- package/lib/browser/ObjectStateMutations.js +1 -10
- package/lib/browser/OfflineQuery.js +5 -9
- package/lib/browser/Parse.js +1 -3
- package/lib/browser/ParseConfig.js +1 -1
- package/lib/browser/ParseFile.js +0 -1
- package/lib/browser/ParseObject.js +1 -1
- package/lib/browser/ParseQuery.js +1 -1
- package/lib/browser/ParseUser.js +1 -1
- package/lib/browser/RESTController.js +2 -2
- package/lib/browser/StorageController.weapp.js +1 -1
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/FacebookUtils.js +1 -1
- package/lib/node/LocalDatastoreController.react-native.js +1 -1
- package/lib/node/ObjectStateMutations.js +1 -5
- package/lib/node/OfflineQuery.js +5 -9
- package/lib/node/Parse.js +1 -1
- package/lib/node/ParseConfig.js +1 -1
- package/lib/node/ParseFile.js +0 -1
- package/lib/node/ParseObject.js +1 -1
- package/lib/node/ParseQuery.js +1 -1
- package/lib/node/ParseUser.js +1 -1
- package/lib/node/RESTController.js +2 -2
- package/lib/node/StorageController.weapp.js +1 -1
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/LocalDatastoreController.react-native.js +1 -1
- package/lib/react-native/ObjectStateMutations.js +0 -5
- package/lib/react-native/OfflineQuery.js +5 -5
- package/lib/react-native/ParseConfig.js +1 -1
- package/lib/react-native/ParseObject.js +2 -1
- package/lib/react-native/ParseQuery.js +1 -1
- package/lib/react-native/ParseUser.js +1 -1
- package/lib/react-native/RESTController.js +11 -10
- package/lib/react-native/StorageController.weapp.js +1 -1
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/FacebookUtils.js +1 -1
- package/lib/weapp/LocalDatastoreController.react-native.js +1 -1
- package/lib/weapp/ObjectStateMutations.js +1 -10
- package/lib/weapp/OfflineQuery.js +5 -9
- package/lib/weapp/Parse.js +1 -1
- package/lib/weapp/ParseConfig.js +1 -1
- package/lib/weapp/ParseFile.js +0 -1
- package/lib/weapp/ParseObject.js +1 -1
- package/lib/weapp/ParseQuery.js +1 -1
- package/lib/weapp/ParseUser.js +1 -1
- package/lib/weapp/RESTController.js +2 -2
- package/lib/weapp/StorageController.weapp.js +1 -1
- package/package.json +20 -18
|
@@ -16,10 +16,6 @@ exports.setPendingOp = setPendingOp;
|
|
|
16
16
|
exports.setServerData = setServerData;
|
|
17
17
|
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
18
18
|
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
19
|
-
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/keys"));
|
|
20
|
-
var _some = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/some"));
|
|
21
|
-
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/parse-int"));
|
|
22
|
-
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/values"));
|
|
23
19
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/json/stringify"));
|
|
24
20
|
var _encode = _interopRequireDefault(require("./encode"));
|
|
25
21
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
@@ -172,12 +168,7 @@ function nestedSet(obj, key, value) {
|
|
|
172
168
|
function commitServerChanges(serverData, objectCache, changes) {
|
|
173
169
|
const ParseObject = _CoreManager.default.getParseObject();
|
|
174
170
|
for (const attr in changes) {
|
|
175
|
-
|
|
176
|
-
let val = changes[attr];
|
|
177
|
-
// Check for JSON array { '0': { something }, '1': { something } }
|
|
178
|
-
if (val && typeof val === 'object' && !(0, _isArray.default)(val) && (0, _keys.default)(val).length > 0 && (0, _some.default)(_context = (0, _keys.default)(val)).call(_context, k => !isNaN((0, _parseInt2.default)(k))) && !(0, _includes.default)(_context2 = ['sentPerUTCOffset', 'failedPerUTCOffset']).call(_context2, attr)) {
|
|
179
|
-
val = (0, _values.default)(val);
|
|
180
|
-
}
|
|
171
|
+
const val = changes[attr];
|
|
181
172
|
nestedSet(serverData, attr, val);
|
|
182
173
|
if (val && typeof val === 'object' && !(val instanceof ParseObject) && !(val instanceof _ParseFile.default) && !(val instanceof _ParseRelation.default)) {
|
|
183
174
|
const json = (0, _encode.default)(val, false, true);
|
|
@@ -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,
|
|
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,
|
|
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,
|
|
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,
|
|
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) {
|
package/lib/weapp/Parse.js
CHANGED
|
@@ -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');
|
|
370
|
+
console.log('Parse.enableLocalDatastore() must be called first');
|
|
371
371
|
return _promise.default.resolve({});
|
|
372
372
|
} else {
|
|
373
373
|
return Parse.LocalDatastore._getAllContents();
|
package/lib/weapp/ParseConfig.js
CHANGED
package/lib/weapp/ParseFile.js
CHANGED
|
@@ -404,7 +404,6 @@ const DefaultController = {
|
|
|
404
404
|
throw new Error('saveFile can only be used with File-type sources.');
|
|
405
405
|
}
|
|
406
406
|
const base64Data = await new _promise.default((res, rej) => {
|
|
407
|
-
// eslint-disable-next-line no-undef
|
|
408
407
|
const reader = new FileReader();
|
|
409
408
|
reader.onload = () => res(reader.result);
|
|
410
409
|
reader.onerror = error => rej(error);
|
package/lib/weapp/ParseObject.js
CHANGED
|
@@ -262,7 +262,7 @@ class ParseObject {
|
|
|
262
262
|
if (objectCache[attr] !== stringified) {
|
|
263
263
|
dirty[attr] = val;
|
|
264
264
|
}
|
|
265
|
-
} catch (
|
|
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;
|
package/lib/weapp/ParseQuery.js
CHANGED
|
@@ -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,
|
|
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;
|
package/lib/weapp/ParseUser.js
CHANGED
|
@@ -29,7 +29,7 @@ let useXDomainRequest = false;
|
|
|
29
29
|
if (typeof XDomainRequest !== 'undefined' && !('withCredentials' in new XMLHttpRequest())) {
|
|
30
30
|
useXDomainRequest = true;
|
|
31
31
|
}
|
|
32
|
-
function ajaxIE9(method, url, data,
|
|
32
|
+
function ajaxIE9(method, url, data, _headers, options) {
|
|
33
33
|
return new _promise.default((resolve, reject) => {
|
|
34
34
|
// @ts-ignore
|
|
35
35
|
const xdr = new XDomainRequest();
|
|
@@ -292,7 +292,7 @@ const RESTController = {
|
|
|
292
292
|
try {
|
|
293
293
|
const errorJSON = JSON.parse(response.responseText);
|
|
294
294
|
error = new _ParseError.default(errorJSON.code, errorJSON.error);
|
|
295
|
-
} catch (
|
|
295
|
+
} catch (_) {
|
|
296
296
|
// If we fail to parse the error text, that's okay.
|
|
297
297
|
error = new _ParseError.default(_ParseError.default.INVALID_JSON, 'Received an error with invalid JSON from Parse: ' + response.responseText);
|
|
298
298
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse",
|
|
3
|
-
"version": "5.3.0-alpha.
|
|
3
|
+
"version": "5.3.0-alpha.3",
|
|
4
4
|
"description": "Parse JavaScript SDK",
|
|
5
5
|
"homepage": "https://parseplatform.org",
|
|
6
6
|
"keywords": [
|
|
@@ -29,27 +29,28 @@
|
|
|
29
29
|
"react-native": false
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@babel/runtime-corejs3": "7.24.
|
|
32
|
+
"@babel/runtime-corejs3": "7.24.8",
|
|
33
33
|
"idb-keyval": "6.2.1",
|
|
34
34
|
"react-native-crypto-js": "1.0.0",
|
|
35
35
|
"uuid": "10.0.0",
|
|
36
|
-
"ws": "8.
|
|
36
|
+
"ws": "8.18.0",
|
|
37
37
|
"xmlhttprequest": "1.8.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "7.24.
|
|
40
|
+
"@babel/core": "7.24.9",
|
|
41
41
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
42
42
|
"@babel/plugin-transform-runtime": "7.24.7",
|
|
43
|
-
"@babel/preset-env": "7.
|
|
44
|
-
"@babel/preset-react": "7.
|
|
43
|
+
"@babel/preset-env": "7.25.3",
|
|
44
|
+
"@babel/preset-react": "7.24.7",
|
|
45
45
|
"@babel/preset-typescript": "7.24.7",
|
|
46
46
|
"@definitelytyped/dtslint": "0.0.163",
|
|
47
|
+
"@eslint/js": "9.7.0",
|
|
47
48
|
"@parse/minami": "git+https://github.com/parse-community/minami#main",
|
|
48
49
|
"@saithodev/semantic-release-backmerge": "4.0.1",
|
|
49
50
|
"@semantic-release/changelog": "6.0.3",
|
|
50
51
|
"@semantic-release/commit-analyzer": "13.0.0",
|
|
51
52
|
"@semantic-release/git": "10.0.1",
|
|
52
|
-
"@semantic-release/github": "10.
|
|
53
|
+
"@semantic-release/github": "10.1.1",
|
|
53
54
|
"@semantic-release/npm": "12.0.1",
|
|
54
55
|
"@semantic-release/release-notes-generator": "14.0.1",
|
|
55
56
|
"@types/facebook-js-sdk": "3.3.11",
|
|
@@ -61,9 +62,9 @@
|
|
|
61
62
|
"codecov": "3.8.3",
|
|
62
63
|
"core-js": "3.37.1",
|
|
63
64
|
"cross-env": "7.0.2",
|
|
64
|
-
"eslint": "
|
|
65
|
-
"eslint-plugin-jsdoc": "
|
|
66
|
-
"express": "4.
|
|
65
|
+
"eslint": "9.9.1",
|
|
66
|
+
"eslint-plugin-jsdoc": "50.0.0",
|
|
67
|
+
"express": "4.21.0",
|
|
67
68
|
"gulp": "5.0.0",
|
|
68
69
|
"gulp-babel": "8.0.0",
|
|
69
70
|
"gulp-derequire": "3.0.0",
|
|
@@ -71,8 +72,8 @@
|
|
|
71
72
|
"gulp-rename": "2.0.0",
|
|
72
73
|
"gulp-uglify": "3.0.2",
|
|
73
74
|
"gulp-watch": "5.0.1",
|
|
74
|
-
"husky": "9.
|
|
75
|
-
"jasmine": "5.
|
|
75
|
+
"husky": "9.1.5",
|
|
76
|
+
"jasmine": "5.2.0",
|
|
76
77
|
"jasmine-reporters": "2.5.2",
|
|
77
78
|
"jasmine-spec-reporter": "7.0.0",
|
|
78
79
|
"jest": "29.7.0",
|
|
@@ -82,12 +83,13 @@
|
|
|
82
83
|
"lint-staged": "15.2.7",
|
|
83
84
|
"madge": "7.0.0",
|
|
84
85
|
"metro-react-native-babel-preset": "0.77.0",
|
|
85
|
-
"mongodb-runner": "5.6.
|
|
86
|
-
"parse-server": "7.
|
|
87
|
-
"prettier": "3.3.
|
|
86
|
+
"mongodb-runner": "5.6.4",
|
|
87
|
+
"parse-server": "7.2.0",
|
|
88
|
+
"prettier": "3.3.3",
|
|
88
89
|
"puppeteer": "20.4.0",
|
|
89
90
|
"regenerator-runtime": "0.14.1",
|
|
90
91
|
"semantic-release": "24.0.0",
|
|
92
|
+
"typescript-eslint": "8.0.0-alpha.10",
|
|
91
93
|
"vinyl-source-stream": "2.0.0"
|
|
92
94
|
},
|
|
93
95
|
"optionalDependencies": {
|
|
@@ -102,9 +104,9 @@
|
|
|
102
104
|
"test:mongodb:runnerstart": "mongodb-runner start -- --port 27017",
|
|
103
105
|
"test:types": "dtslint --expectOnly types",
|
|
104
106
|
"posttest:mongodb": "mongodb-runner stop --all",
|
|
105
|
-
"lint": "eslint --cache src/ integration/
|
|
106
|
-
"lint:fix": "eslint --fix --cache src/ integration/
|
|
107
|
-
"lint:types": "
|
|
107
|
+
"lint": "eslint --cache src/ integration/",
|
|
108
|
+
"lint:fix": "eslint --fix --cache src/ integration/",
|
|
109
|
+
"lint:types": "eslint --cache types/",
|
|
108
110
|
"watch": "cross-env PARSE_BUILD=${PARSE_BUILD} gulp watch",
|
|
109
111
|
"watch:browser": "cross-env PARSE_BUILD=browser npm run watch",
|
|
110
112
|
"watch:node": "cross-env PARSE_BUILD=node npm run watch",
|