parse 8.1.1-alpha.4 → 8.1.1-alpha.5

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.
@@ -18,7 +18,7 @@ const config = {
18
18
  SERVER_URL: 'https://api.parse.com/1',
19
19
  LIVEQUERY_SERVER_URL: null,
20
20
  ENCRYPTED_KEY: null,
21
- VERSION: 'js' + "8.1.1-alpha.4",
21
+ VERSION: 'js' + "8.1.1-alpha.5",
22
22
  APPLICATION_ID: null,
23
23
  JAVASCRIPT_KEY: null,
24
24
  MAINTENANCE_KEY: null,
@@ -14,7 +14,7 @@ const config = {
14
14
  SERVER_URL: 'https://api.parse.com/1',
15
15
  LIVEQUERY_SERVER_URL: null,
16
16
  ENCRYPTED_KEY: null,
17
- VERSION: 'js' + "8.1.1-alpha.4",
17
+ VERSION: 'js' + "8.1.1-alpha.5",
18
18
  APPLICATION_ID: null,
19
19
  JAVASCRIPT_KEY: null,
20
20
  MAINTENANCE_KEY: null,
@@ -10,7 +10,7 @@ var config = {
10
10
  SERVER_URL: 'https://api.parse.com/1',
11
11
  LIVEQUERY_SERVER_URL: null,
12
12
  ENCRYPTED_KEY: null,
13
- VERSION: 'js' + "8.1.1-alpha.4",
13
+ VERSION: 'js' + "8.1.1-alpha.5",
14
14
  APPLICATION_ID: null,
15
15
  JAVASCRIPT_KEY: null,
16
16
  MAINTENANCE_KEY: null,
@@ -18,7 +18,7 @@ const config = {
18
18
  SERVER_URL: 'https://api.parse.com/1',
19
19
  LIVEQUERY_SERVER_URL: null,
20
20
  ENCRYPTED_KEY: null,
21
- VERSION: 'js' + "8.1.1-alpha.4",
21
+ VERSION: 'js' + "8.1.1-alpha.5",
22
22
  APPLICATION_ID: null,
23
23
  JAVASCRIPT_KEY: null,
24
24
  MAINTENANCE_KEY: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "8.1.1-alpha.4",
3
+ "version": "8.1.1-alpha.5",
4
4
  "description": "Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org",
6
6
  "keywords": [
@@ -88,7 +88,7 @@
88
88
  "@semantic-release/commit-analyzer": "13.0.1",
89
89
  "@semantic-release/git": "10.0.1",
90
90
  "@semantic-release/github": "12.0.5",
91
- "@semantic-release/npm": "13.1.3",
91
+ "@semantic-release/npm": "13.1.4",
92
92
  "@semantic-release/release-notes-generator": "14.1.0",
93
93
  "@types/facebook-js-sdk": "3.3.11",
94
94
  "babel-jest": "30.2.0",
@@ -119,7 +119,7 @@
119
119
  "puppeteer": "24.37.2",
120
120
  "regenerator-runtime": "0.14.1",
121
121
  "semantic-release": "25.0.3",
122
- "typescript-eslint": "8.54.0",
122
+ "typescript-eslint": "8.55.0",
123
123
  "vite": "7.3.1",
124
124
  "vite-plugin-commonjs": "0.10.4",
125
125
  "vite-plugin-node-polyfills": "0.25.0"
@@ -417,7 +417,7 @@ declare class ParseQuery<T extends ParseObject = ParseObject> {
417
417
  * @param value The value that the Parse.Object must contain.
418
418
  * @returns {Parse.Query} Returns the query, so you can chain this call.
419
419
  */
420
- equalTo<K extends keyof T['attributes'] | keyof BaseAttributes>(key: K, value: T['attributes'][K] | (T['attributes'][K] extends ParseObject ? Pointer : T['attributes'][K] extends (infer E)[] ? E : never)): this;
420
+ equalTo<K extends keyof T['attributes'] | keyof BaseAttributes>(key: K, value: T['attributes'][K] | (NonNullable<T['attributes'][K]> extends ParseObject ? Pointer : NonNullable<T['attributes'][K]> extends (infer E)[] ? E : never)): this;
421
421
  /**
422
422
  * Adds a constraint to the query that requires a particular key's value to
423
423
  * be not equal to the provided value.
@@ -426,7 +426,7 @@ declare class ParseQuery<T extends ParseObject = ParseObject> {
426
426
  * @param value The value that must not be equalled.
427
427
  * @returns {Parse.Query} Returns the query, so you can chain this call.
428
428
  */
429
- notEqualTo<K extends keyof T['attributes'] | keyof BaseAttributes>(key: K, value: T['attributes'][K] | (T['attributes'][K] extends ParseObject ? Pointer : T['attributes'][K] extends (infer E)[] ? E : never)): this;
429
+ notEqualTo<K extends keyof T['attributes'] | keyof BaseAttributes>(key: K, value: T['attributes'][K] | (NonNullable<T['attributes'][K]> extends ParseObject ? Pointer : NonNullable<T['attributes'][K]> extends (infer E)[] ? E : never)): this;
430
430
  /**
431
431
  * Adds a constraint to the query that requires a particular key's value to
432
432
  * be less than the provided value.
package/types/tests.ts CHANGED
@@ -1888,6 +1888,8 @@ function testQuery() {
1888
1888
  attribute2: number;
1889
1889
  attribute3: AnotherSubClass;
1890
1890
  attribute4: string[];
1891
+ attribute5?: AnotherSubClass[];
1892
+ attribute6?: string[];
1891
1893
  }> {}
1892
1894
  const query = new Parse.Query(MySubClass);
1893
1895
 
@@ -1997,6 +1999,22 @@ function testQuery() {
1997
1999
  // $ExpectType ParseQuery<MySubClass>
1998
2000
  query.equalTo('attribute4', ['a_string_value']);
1999
2001
 
2002
+
2003
+ // Optional object[] (e.g. prop?: ClassName[] ): allow matching a single element (array contains object), and allow matching the full array
2004
+ // $ExpectType ParseQuery<MySubClass>
2005
+ query.equalTo('attribute5', new AnotherSubClass());
2006
+ // $ExpectType ParseQuery<MySubClass>
2007
+ query.equalTo('attribute5', [new AnotherSubClass()]);
2008
+ // Since there is no `$ExpectNotError` thing, this line is instead used to at least prove that there is no regression for type safety for `Array of object` fields
2009
+ // $ExpectError
2010
+ query.equalTo('attribute5', new MySubClass());
2011
+
2012
+ // Optional string[] (e.g. prop?: string[] ): allow matching a single element (array contains string), and allow matching the full array
2013
+ // $ExpectType ParseQuery<MySubClass>
2014
+ query.equalTo('attribute6', 'a_string_value');
2015
+ // $ExpectType ParseQuery<MySubClass>
2016
+ query.equalTo('attribute6', ['a_string_value']);
2017
+
2000
2018
  // $ExpectType ParseQuery<MySubClass>
2001
2019
  query.notEqualTo('attribute4', 'a_string_value');
2002
2020
  // $ExpectType ParseQuery<MySubClass>
@@ -2011,6 +2029,12 @@ function testQuery() {
2011
2029
  // $ExpectError
2012
2030
  query.notEqualTo('attribute4', [5]);
2013
2031
 
2032
+ // Optional string[]: reject invalid element types
2033
+ // $ExpectError
2034
+ query.equalTo('attribute6', 5);
2035
+ // $ExpectError
2036
+ query.notEqualTo('attribute6', 5);
2037
+
2014
2038
  // $ExpectType ParseQuery<MySubClass>
2015
2039
  query.exists('attribute1');
2016
2040
  // $ExpectError