parse 8.5.1-alpha.1 → 8.6.0
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 +51414 -59386
- package/dist/parse.min.js +25372 -1
- package/dist/parse.weapp.js +51477 -59439
- package/dist/parse.weapp.min.js +25422 -1
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/ParseQuery.js +29 -4
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/ParseQuery.js +29 -4
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/ParseQuery.js +11 -4
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/ParseQuery.js +29 -4
- package/package.json +24 -24
- package/types/ParseQuery.d.ts +23 -1
- package/types/eslint.config.mjs +1 -0
|
@@ -714,9 +714,27 @@ class ParseQuery {
|
|
|
714
714
|
* Executes an aggregate query and returns aggregate results
|
|
715
715
|
*
|
|
716
716
|
* @param {(Array|object)} pipeline Array or Object of stages to process query
|
|
717
|
+
* @param {object} options Valid options are:<ul>
|
|
718
|
+
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
|
|
719
|
+
* be used for this request. Defaults to `true` when not provided, for
|
|
720
|
+
* backward compatibility.
|
|
721
|
+
* <li>sessionToken: A valid session token, used for making a request on
|
|
722
|
+
* behalf of a specific user.
|
|
723
|
+
* <li>context: A dictionary that is accessible in Cloud Code triggers.
|
|
724
|
+
* <li>rawValues: When `true`, disables schema-based value transformation
|
|
725
|
+
* in the pipeline. Pipeline values are interpreted using MongoDB
|
|
726
|
+
* Extended JSON (EJSON), so typed values such as `{ $date: '...' }`,
|
|
727
|
+
* `{ $oid: '...' }`, `{ $numberDecimal: '...' }`, etc. are converted
|
|
728
|
+
* to their corresponding BSON types by the server. Requires Parse
|
|
729
|
+
* Server 9.9.0+
|
|
730
|
+
* <li>rawFieldNames: When `true`, disables automatic field-name
|
|
731
|
+
* transformation (e.g. `createdAt` → `_created_at`) in the pipeline.
|
|
732
|
+
* Users write native MongoDB field names directly. Requires Parse
|
|
733
|
+
* Server 9.9.0+
|
|
734
|
+
* </ul>
|
|
717
735
|
* @returns {Promise} A promise that is resolved with the query completes.
|
|
718
736
|
*/
|
|
719
|
-
aggregate(pipeline) {
|
|
737
|
+
aggregate(pipeline, options) {
|
|
720
738
|
if (!(0, _isArray.default)(pipeline) && typeof pipeline !== 'object') {
|
|
721
739
|
throw new Error('Invalid pipeline must be Array or Object');
|
|
722
740
|
}
|
|
@@ -734,9 +752,16 @@ class ParseQuery {
|
|
|
734
752
|
explain: this._explain,
|
|
735
753
|
readPreference: this._readPreference
|
|
736
754
|
};
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
755
|
+
if ((options === null || options === void 0 ? void 0 : options.rawValues) !== undefined) {
|
|
756
|
+
params.rawValues = options.rawValues;
|
|
757
|
+
}
|
|
758
|
+
if ((options === null || options === void 0 ? void 0 : options.rawFieldNames) !== undefined) {
|
|
759
|
+
params.rawFieldNames = options.rawFieldNames;
|
|
760
|
+
}
|
|
761
|
+
const aggregateOptions = _ParseObject.default._getRequestOptions(options);
|
|
762
|
+
if (aggregateOptions.useMasterKey === undefined) {
|
|
763
|
+
aggregateOptions.useMasterKey = true;
|
|
764
|
+
}
|
|
740
765
|
this._setRequestTask(aggregateOptions);
|
|
741
766
|
const controller = _CoreManager.default.getQueryController();
|
|
742
767
|
return controller.aggregate(this.className, params, aggregateOptions).then(results => {
|
package/lib/node/CoreManager.js
CHANGED
package/lib/node/ParseQuery.js
CHANGED
|
@@ -679,9 +679,27 @@ class ParseQuery {
|
|
|
679
679
|
* Executes an aggregate query and returns aggregate results
|
|
680
680
|
*
|
|
681
681
|
* @param {(Array|object)} pipeline Array or Object of stages to process query
|
|
682
|
+
* @param {object} options Valid options are:<ul>
|
|
683
|
+
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
|
|
684
|
+
* be used for this request. Defaults to `true` when not provided, for
|
|
685
|
+
* backward compatibility.
|
|
686
|
+
* <li>sessionToken: A valid session token, used for making a request on
|
|
687
|
+
* behalf of a specific user.
|
|
688
|
+
* <li>context: A dictionary that is accessible in Cloud Code triggers.
|
|
689
|
+
* <li>rawValues: When `true`, disables schema-based value transformation
|
|
690
|
+
* in the pipeline. Pipeline values are interpreted using MongoDB
|
|
691
|
+
* Extended JSON (EJSON), so typed values such as `{ $date: '...' }`,
|
|
692
|
+
* `{ $oid: '...' }`, `{ $numberDecimal: '...' }`, etc. are converted
|
|
693
|
+
* to their corresponding BSON types by the server. Requires Parse
|
|
694
|
+
* Server 9.9.0+
|
|
695
|
+
* <li>rawFieldNames: When `true`, disables automatic field-name
|
|
696
|
+
* transformation (e.g. `createdAt` → `_created_at`) in the pipeline.
|
|
697
|
+
* Users write native MongoDB field names directly. Requires Parse
|
|
698
|
+
* Server 9.9.0+
|
|
699
|
+
* </ul>
|
|
682
700
|
* @returns {Promise} A promise that is resolved with the query completes.
|
|
683
701
|
*/
|
|
684
|
-
aggregate(pipeline) {
|
|
702
|
+
aggregate(pipeline, options) {
|
|
685
703
|
if (!Array.isArray(pipeline) && typeof pipeline !== 'object') {
|
|
686
704
|
throw new Error('Invalid pipeline must be Array or Object');
|
|
687
705
|
}
|
|
@@ -699,9 +717,16 @@ class ParseQuery {
|
|
|
699
717
|
explain: this._explain,
|
|
700
718
|
readPreference: this._readPreference
|
|
701
719
|
};
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}
|
|
720
|
+
if ((options === null || options === void 0 ? void 0 : options.rawValues) !== undefined) {
|
|
721
|
+
params.rawValues = options.rawValues;
|
|
722
|
+
}
|
|
723
|
+
if ((options === null || options === void 0 ? void 0 : options.rawFieldNames) !== undefined) {
|
|
724
|
+
params.rawFieldNames = options.rawFieldNames;
|
|
725
|
+
}
|
|
726
|
+
const aggregateOptions = _ParseObject.default._getRequestOptions(options);
|
|
727
|
+
if (aggregateOptions.useMasterKey === undefined) {
|
|
728
|
+
aggregateOptions.useMasterKey = true;
|
|
729
|
+
}
|
|
705
730
|
this._setRequestTask(aggregateOptions);
|
|
706
731
|
const controller = _CoreManager.default.getQueryController();
|
|
707
732
|
return controller.aggregate(this.className, params, aggregateOptions).then(results => {
|
|
@@ -471,7 +471,7 @@ var ParseQuery = function () {
|
|
|
471
471
|
}
|
|
472
472
|
}, {
|
|
473
473
|
key: "aggregate",
|
|
474
|
-
value: function (pipeline) {
|
|
474
|
+
value: function (pipeline, options) {
|
|
475
475
|
if (!Array.isArray(pipeline) && typeof pipeline !== 'object') {
|
|
476
476
|
throw new Error('Invalid pipeline must be Array or Object');
|
|
477
477
|
}
|
|
@@ -489,9 +489,16 @@ var ParseQuery = function () {
|
|
|
489
489
|
explain: this._explain,
|
|
490
490
|
readPreference: this._readPreference
|
|
491
491
|
};
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
}
|
|
492
|
+
if ((options == null ? void 0 : options.rawValues) !== undefined) {
|
|
493
|
+
params.rawValues = options.rawValues;
|
|
494
|
+
}
|
|
495
|
+
if ((options == null ? void 0 : options.rawFieldNames) !== undefined) {
|
|
496
|
+
params.rawFieldNames = options.rawFieldNames;
|
|
497
|
+
}
|
|
498
|
+
var aggregateOptions = _ParseObject.default._getRequestOptions(options);
|
|
499
|
+
if (aggregateOptions.useMasterKey === undefined) {
|
|
500
|
+
aggregateOptions.useMasterKey = true;
|
|
501
|
+
}
|
|
495
502
|
this._setRequestTask(aggregateOptions);
|
|
496
503
|
var controller = _CoreManager.default.getQueryController();
|
|
497
504
|
return controller.aggregate(this.className, params, aggregateOptions).then(function (results) {
|
package/lib/weapp/CoreManager.js
CHANGED
package/lib/weapp/ParseQuery.js
CHANGED
|
@@ -714,9 +714,27 @@ class ParseQuery {
|
|
|
714
714
|
* Executes an aggregate query and returns aggregate results
|
|
715
715
|
*
|
|
716
716
|
* @param {(Array|object)} pipeline Array or Object of stages to process query
|
|
717
|
+
* @param {object} options Valid options are:<ul>
|
|
718
|
+
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
|
|
719
|
+
* be used for this request. Defaults to `true` when not provided, for
|
|
720
|
+
* backward compatibility.
|
|
721
|
+
* <li>sessionToken: A valid session token, used for making a request on
|
|
722
|
+
* behalf of a specific user.
|
|
723
|
+
* <li>context: A dictionary that is accessible in Cloud Code triggers.
|
|
724
|
+
* <li>rawValues: When `true`, disables schema-based value transformation
|
|
725
|
+
* in the pipeline. Pipeline values are interpreted using MongoDB
|
|
726
|
+
* Extended JSON (EJSON), so typed values such as `{ $date: '...' }`,
|
|
727
|
+
* `{ $oid: '...' }`, `{ $numberDecimal: '...' }`, etc. are converted
|
|
728
|
+
* to their corresponding BSON types by the server. Requires Parse
|
|
729
|
+
* Server 9.9.0+
|
|
730
|
+
* <li>rawFieldNames: When `true`, disables automatic field-name
|
|
731
|
+
* transformation (e.g. `createdAt` → `_created_at`) in the pipeline.
|
|
732
|
+
* Users write native MongoDB field names directly. Requires Parse
|
|
733
|
+
* Server 9.9.0+
|
|
734
|
+
* </ul>
|
|
717
735
|
* @returns {Promise} A promise that is resolved with the query completes.
|
|
718
736
|
*/
|
|
719
|
-
aggregate(pipeline) {
|
|
737
|
+
aggregate(pipeline, options) {
|
|
720
738
|
if (!(0, _isArray.default)(pipeline) && typeof pipeline !== 'object') {
|
|
721
739
|
throw new Error('Invalid pipeline must be Array or Object');
|
|
722
740
|
}
|
|
@@ -734,9 +752,16 @@ class ParseQuery {
|
|
|
734
752
|
explain: this._explain,
|
|
735
753
|
readPreference: this._readPreference
|
|
736
754
|
};
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
755
|
+
if ((options === null || options === void 0 ? void 0 : options.rawValues) !== undefined) {
|
|
756
|
+
params.rawValues = options.rawValues;
|
|
757
|
+
}
|
|
758
|
+
if ((options === null || options === void 0 ? void 0 : options.rawFieldNames) !== undefined) {
|
|
759
|
+
params.rawFieldNames = options.rawFieldNames;
|
|
760
|
+
}
|
|
761
|
+
const aggregateOptions = _ParseObject.default._getRequestOptions(options);
|
|
762
|
+
if (aggregateOptions.useMasterKey === undefined) {
|
|
763
|
+
aggregateOptions.useMasterKey = true;
|
|
764
|
+
}
|
|
740
765
|
this._setRequestTask(aggregateOptions);
|
|
741
766
|
const controller = _CoreManager.default.getQueryController();
|
|
742
767
|
return controller.aggregate(this.className, params, aggregateOptions).then(results => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "parse",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"description": "Parse JavaScript SDK",
|
|
5
5
|
"homepage": "https://parseplatform.org",
|
|
6
6
|
"keywords": [
|
|
@@ -66,63 +66,63 @@
|
|
|
66
66
|
"react-native": false
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@babel/runtime": "7.
|
|
70
|
-
"@babel/runtime-corejs3": "7.29.
|
|
69
|
+
"@babel/runtime": "7.29.2",
|
|
70
|
+
"@babel/runtime-corejs3": "7.29.2",
|
|
71
71
|
"crypto-js": "4.2.0",
|
|
72
72
|
"idb-keyval": "6.2.2",
|
|
73
73
|
"react-native-crypto-js": "1.0.0",
|
|
74
|
-
"ws": "8.
|
|
74
|
+
"ws": "8.20.0"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@babel/core": "7.29.0",
|
|
78
78
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
79
79
|
"@babel/plugin-transform-runtime": "7.29.0",
|
|
80
|
-
"@babel/preset-env": "7.29.
|
|
80
|
+
"@babel/preset-env": "7.29.2",
|
|
81
81
|
"@babel/preset-react": "7.28.5",
|
|
82
82
|
"@babel/preset-typescript": "7.27.1",
|
|
83
|
-
"@eslint/js": "
|
|
83
|
+
"@eslint/js": "10.0.1",
|
|
84
84
|
"@parse/minami": "git+https://github.com/parse-community/minami#main",
|
|
85
|
-
"@rollup/plugin-terser": "0.
|
|
85
|
+
"@rollup/plugin-terser": "1.0.0",
|
|
86
86
|
"@saithodev/semantic-release-backmerge": "4.0.1",
|
|
87
87
|
"@semantic-release/changelog": "6.0.3",
|
|
88
88
|
"@semantic-release/commit-analyzer": "13.0.1",
|
|
89
89
|
"@semantic-release/git": "10.0.1",
|
|
90
|
-
"@semantic-release/github": "12.0.
|
|
91
|
-
"@semantic-release/npm": "13.1.
|
|
90
|
+
"@semantic-release/github": "12.0.6",
|
|
91
|
+
"@semantic-release/npm": "13.1.5",
|
|
92
92
|
"@semantic-release/release-notes-generator": "14.1.0",
|
|
93
93
|
"@types/facebook-js-sdk": "3.3.11",
|
|
94
|
-
"babel-jest": "30.
|
|
94
|
+
"babel-jest": "30.3.0",
|
|
95
95
|
"babel-plugin-minify-dead-code-elimination": "0.5.2",
|
|
96
96
|
"babel-plugin-transform-inline-environment-variables": "0.4.4",
|
|
97
97
|
"codecov": "3.8.3",
|
|
98
|
-
"core-js": "3.
|
|
98
|
+
"core-js": "3.49.0",
|
|
99
99
|
"cross-env": "10.1.0",
|
|
100
|
-
"eslint": "
|
|
100
|
+
"eslint": "10.2.0",
|
|
101
101
|
"eslint-plugin-expect-type": "0.6.2",
|
|
102
|
-
"eslint-plugin-jsdoc": "62.
|
|
102
|
+
"eslint-plugin-jsdoc": "62.9.0",
|
|
103
103
|
"express": "5.2.1",
|
|
104
104
|
"gulp": "5.0.1",
|
|
105
105
|
"gulp-babel": "8.0.0",
|
|
106
106
|
"gulp-watch": "5.0.1",
|
|
107
|
-
"jasmine": "6.
|
|
107
|
+
"jasmine": "6.1.0",
|
|
108
108
|
"jasmine-reporters": "2.5.2",
|
|
109
109
|
"jasmine-spec-reporter": "7.0.0",
|
|
110
|
-
"jest": "
|
|
111
|
-
"jest-environment-jsdom": "30.
|
|
110
|
+
"jest": "30.3.0",
|
|
111
|
+
"jest-environment-jsdom": "30.3.0",
|
|
112
112
|
"jsdoc": "4.0.5",
|
|
113
113
|
"jsdoc-babel": "0.5.0",
|
|
114
|
-
"lint-staged": "16.
|
|
114
|
+
"lint-staged": "16.4.0",
|
|
115
115
|
"madge": "8.0.0",
|
|
116
116
|
"metro-react-native-babel-preset": "0.77.0",
|
|
117
|
-
"mongodb-runner": "6.
|
|
118
|
-
"parse-server": "9.
|
|
119
|
-
"puppeteer": "24.
|
|
117
|
+
"mongodb-runner": "6.7.3",
|
|
118
|
+
"parse-server": "9.8.0",
|
|
119
|
+
"puppeteer": "24.40.0",
|
|
120
120
|
"regenerator-runtime": "0.14.1",
|
|
121
121
|
"semantic-release": "25.0.3",
|
|
122
|
-
"typescript-eslint": "8.
|
|
123
|
-
"vite": "
|
|
122
|
+
"typescript-eslint": "8.58.1",
|
|
123
|
+
"vite": "8.0.8",
|
|
124
124
|
"vite-plugin-commonjs": "0.10.4",
|
|
125
|
-
"vite-plugin-node-polyfills": "0.
|
|
125
|
+
"vite-plugin-node-polyfills": "0.26.0"
|
|
126
126
|
},
|
|
127
127
|
"scripts": {
|
|
128
128
|
"build": "node build_releases.js",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"cross-env": "cross-env"
|
|
153
153
|
},
|
|
154
154
|
"engines": {
|
|
155
|
-
"node": ">=20.19.0 <21 || >=22.
|
|
155
|
+
"node": ">=20.19.0 <21 || >=22.13.0 <23 || >=24.1.0 <25"
|
|
156
156
|
},
|
|
157
157
|
"jest": {
|
|
158
158
|
"automock": true,
|
package/types/ParseQuery.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export type FindOptions = QueryOptions;
|
|
|
16
16
|
export type CountOptions = BaseRequestOptions;
|
|
17
17
|
export type GetOptions = QueryOptions;
|
|
18
18
|
export type FirstOptions = QueryOptions;
|
|
19
|
+
export interface AggregateOptions extends QueryOptions {
|
|
20
|
+
rawValues?: boolean;
|
|
21
|
+
rawFieldNames?: boolean;
|
|
22
|
+
}
|
|
19
23
|
export interface FullTextOptions {
|
|
20
24
|
language?: string;
|
|
21
25
|
caseSensitive?: boolean;
|
|
@@ -262,9 +266,27 @@ declare class ParseQuery<T extends ParseObject = ParseObject> {
|
|
|
262
266
|
* Executes an aggregate query and returns aggregate results
|
|
263
267
|
*
|
|
264
268
|
* @param {(Array|object)} pipeline Array or Object of stages to process query
|
|
269
|
+
* @param {object} options Valid options are:<ul>
|
|
270
|
+
* <li>useMasterKey: In Cloud Code and Node only, causes the Master Key to
|
|
271
|
+
* be used for this request. Defaults to `true` when not provided, for
|
|
272
|
+
* backward compatibility.
|
|
273
|
+
* <li>sessionToken: A valid session token, used for making a request on
|
|
274
|
+
* behalf of a specific user.
|
|
275
|
+
* <li>context: A dictionary that is accessible in Cloud Code triggers.
|
|
276
|
+
* <li>rawValues: When `true`, disables schema-based value transformation
|
|
277
|
+
* in the pipeline. Pipeline values are interpreted using MongoDB
|
|
278
|
+
* Extended JSON (EJSON), so typed values such as `{ $date: '...' }`,
|
|
279
|
+
* `{ $oid: '...' }`, `{ $numberDecimal: '...' }`, etc. are converted
|
|
280
|
+
* to their corresponding BSON types by the server. Requires Parse
|
|
281
|
+
* Server 9.9.0+
|
|
282
|
+
* <li>rawFieldNames: When `true`, disables automatic field-name
|
|
283
|
+
* transformation (e.g. `createdAt` → `_created_at`) in the pipeline.
|
|
284
|
+
* Users write native MongoDB field names directly. Requires Parse
|
|
285
|
+
* Server 9.9.0+
|
|
286
|
+
* </ul>
|
|
265
287
|
* @returns {Promise} A promise that is resolved with the query completes.
|
|
266
288
|
*/
|
|
267
|
-
aggregate(pipeline: any): Promise<any[]>;
|
|
289
|
+
aggregate(pipeline: any, options?: AggregateOptions): Promise<any[]>;
|
|
268
290
|
/**
|
|
269
291
|
* Retrieves at most one Parse.Object that satisfies this query.
|
|
270
292
|
*
|
package/types/eslint.config.mjs
CHANGED
|
@@ -19,6 +19,7 @@ export default tseslint.config({
|
|
|
19
19
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
20
20
|
"@typescript-eslint/no-explicit-any": "off",
|
|
21
21
|
"@typescript-eslint/no-unsafe-return": "off",
|
|
22
|
+
"no-useless-assignment": "off",
|
|
22
23
|
},
|
|
23
24
|
languageOptions: {
|
|
24
25
|
parser: tseslint.parser,
|