Skip to content

Commit 528e1ba

Browse files
committed
chore: bump
1 parent 7bff567 commit 528e1ba

File tree

16 files changed

+37
-62
lines changed

16 files changed

+37
-62
lines changed

packages/firebase-admob/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-admob",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Admob",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-analytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-analytics",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Analytics",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-app-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-app-check",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - App Check",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-auth",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Auth",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-crashlytics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-crashlytics",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Crashlytics",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-database/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-database",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Database",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-dynamic-links/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-dynamic-links",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Dynamic Links",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-firestore/index.android.ts

Lines changed: 22 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,9 @@ function numberIs64Bit(item: number) {
143143
return item < -Math.pow(2, 31) + 1 || item > Math.pow(2, 31) - 1;
144144
}
145145

146-
147146
function serializeItems(value) {
148147
if (typeof value === 'string') {
149-
return java.lang.String.valueOf(value);
148+
return value;
150149
}
151150

152151
if (typeof value === 'number') {
@@ -204,7 +203,7 @@ function serializeItems(value) {
204203

205204
if (value && typeof value === 'object') {
206205
const keys = Object.keys(value);
207-
let dict = new java.util.HashMap();
206+
const dict = new java.util.HashMap();
208207
keys.forEach((key) => {
209208
dict.put(key, serializeItems(value[key]));
210209
});
@@ -646,114 +645,90 @@ export class Query<T extends DocumentData = DocumentData> implements IQuery<T> {
646645
if (fieldPath instanceof FieldPath) {
647646
switch (opStr) {
648647
case '!=':
649-
query = this.native.whereNotEqualTo(fieldPath.native, value?.native || value);
648+
query = this.native.whereNotEqualTo(fieldPath.native, serializeItems(value));
650649
break;
651650
case '<':
652-
query = this.native.whereLessThan(fieldPath.native, value?.native || value);
651+
query = this.native.whereLessThan(fieldPath.native, serializeItems(value));
653652
break;
654653
case '>':
655-
query = this.native.whereGreaterThan(fieldPath.native, value?.native || value);
654+
query = this.native.whereGreaterThan(fieldPath.native, serializeItems(value));
656655
break;
657656
case '<=':
658-
query = this.native.whereLessThanOrEqualTo(fieldPath.native, value?.native || value);
657+
query = this.native.whereLessThanOrEqualTo(fieldPath.native, serializeItems(value));
659658
break;
660659
case '>=':
661-
query = this.native.whereGreaterThanOrEqualTo(fieldPath.native, value?.native || value);
660+
query = this.native.whereGreaterThanOrEqualTo(fieldPath.native, serializeItems(value));
662661
break;
663662
case '==':
664-
query = this.native.whereEqualTo(fieldPath.native, value?.native || value);
663+
query = this.native.whereEqualTo(fieldPath.native, serializeItems(value));
665664
break;
666665
case 'array-contains':
667666
query = this.native.whereArrayContains(
668667
fieldPath.native,
669-
Array.isArray(value) ? value.map((val) => {
670-
return val?.native || val;
671-
}) : value
668+
serializeItems(value)
672669
);
673670
break;
674671
case 'array-contains-any':
675672
query = this.native.whereArrayContainsAny(
676673
fieldPath.native,
677-
java.util.Arrays.asList(
678-
value.map((val) => {
679-
return val?.native || val;
680-
})
681-
)
674+
serializeItems(value)
682675
);
683676
break;
684677
case 'in':
685678
query = this.native.whereIn(
686679
fieldPath.native,
687-
value.map((val) => {
688-
return val?.native || val;
689-
})
680+
serializeItems(value)
690681
);
691682
break;
692683
case 'not-in':
693684
query = this.native.whereNotIn(
694685
fieldPath.native,
695-
java.util.Arrays.asList(
696-
value.map((val) => {
697-
return val?.native || val;
698-
})
699-
)
686+
serializeItems(value)
700687
);
701688
break;
702689
}
703690
} else {
704691
switch (opStr) {
705692
case '!=':
706-
query = this.native.whereNotEqualTo(fieldPath as any, value?.native || value);
693+
query = this.native.whereNotEqualTo(fieldPath as any, serializeItems(value));
707694
break;
708695
case '<':
709-
query = this.native.whereLessThan(fieldPath as any, value?.native || value);
696+
query = this.native.whereLessThan(fieldPath as any, serializeItems(value));
710697
break;
711698
case '>':
712-
query = this.native.whereGreaterThan(fieldPath as any, value?.native || value);
699+
query = this.native.whereGreaterThan(fieldPath as any, serializeItems(value));
713700
break;
714701
case '<=':
715-
query = this.native.whereLessThanOrEqualTo(fieldPath as any, value?.native || value);
702+
query = this.native.whereLessThanOrEqualTo(fieldPath as any, serializeItems(value));
716703
break;
717704
case '>=':
718-
query = this.native.whereGreaterThanOrEqualTo(fieldPath as any, value?.native || value);
705+
query = this.native.whereGreaterThanOrEqualTo(fieldPath as any, serializeItems(value));
719706
break;
720707
case '==':
721-
query = this.native.whereEqualTo(fieldPath as any, value?.native || value);
708+
query = this.native.whereEqualTo(fieldPath as any, serializeItems(value));
722709
break;
723710
case 'array-contains':
724711
query = this.native.whereArrayContains(
725712
fieldPath as any,
726-
Array.isArray(value) ? value.map((val) => {
727-
return val?.native || val;
728-
}) : value
713+
serializeItems(value)
729714
);
730715
break;
731716
case 'array-contains-any':
732717
query = this.native.whereArrayContainsAny(
733718
fieldPath as any,
734-
java.util.Arrays.asList(
735-
value.map((val) => {
736-
return val?.native || val;
737-
})
738-
)
719+
serializeItems(value)
739720
);
740721
break;
741722
case 'in':
742723
query = this.native.whereIn(
743724
fieldPath as any,
744-
value.map((val) => {
745-
return val?.native || val;
746-
})
725+
serializeItems(value)
747726
);
748727
break;
749728
case 'not-in':
750729
query = this.native.whereNotIn(
751730
fieldPath as any,
752-
java.util.Arrays.asList(
753-
value.map((val) => {
754-
return val?.native || val;
755-
})
756-
)
731+
serializeItems(value)
757732
);
758733
break;
759734
}

packages/firebase-firestore/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-firestore",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Firestore",
55
"main": "index",
66
"typings": "index.d.ts",

packages/firebase-functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nativescript/firebase-functions",
3-
"version": "1.0.0-alpha.13",
3+
"version": "1.0.0-alpha.14",
44
"description": "NativeScript Firebase - Functions",
55
"main": "index",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)