@prmichaelsen/firebase-admin-sdk-v8 2.5.1 → 2.5.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/.claude/settings.local.json +13 -0
- package/CHANGELOG.md +10 -0
- package/dist/index.js +24 -6
- package/dist/index.mjs +24 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.5.2] - 2026-03-03
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Firestore Query**: Fixed null/undefined and NaN value queries in Firestore
|
|
12
|
+
- Added support for `where('field', '==', null)` queries using `unaryFilter` with `IS_NULL` operator
|
|
13
|
+
- Added support for `where('field', '==', NaN)` queries using `unaryFilter` with `IS_NAN` operator
|
|
14
|
+
- Previously, null/NaN queries would fail because they incorrectly used `fieldFilter` instead of `unaryFilter`
|
|
15
|
+
- Firestore REST API requires `unaryFilter` for these special value comparisons
|
|
16
|
+
- All 463 tests passing with fix
|
|
17
|
+
|
|
8
18
|
## [2.5.1] - 2026-02-24
|
|
9
19
|
|
|
10
20
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -1100,13 +1100,31 @@ function buildStructuredQuery(collectionPath, options) {
|
|
|
1100
1100
|
from: [fromClause]
|
|
1101
1101
|
};
|
|
1102
1102
|
if (options?.where && options.where.length > 0) {
|
|
1103
|
-
const filters = options.where.map((filter) =>
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1103
|
+
const filters = options.where.map((filter) => {
|
|
1104
|
+
if ((filter.value === null || filter.value === void 0) && filter.op === "==") {
|
|
1105
|
+
return {
|
|
1106
|
+
unaryFilter: {
|
|
1107
|
+
field: { fieldPath: filter.field },
|
|
1108
|
+
op: "IS_NULL"
|
|
1109
|
+
}
|
|
1110
|
+
};
|
|
1108
1111
|
}
|
|
1109
|
-
|
|
1112
|
+
if (filter.value !== filter.value && filter.op === "==") {
|
|
1113
|
+
return {
|
|
1114
|
+
unaryFilter: {
|
|
1115
|
+
field: { fieldPath: filter.field },
|
|
1116
|
+
op: "IS_NAN"
|
|
1117
|
+
}
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
return {
|
|
1121
|
+
fieldFilter: {
|
|
1122
|
+
field: { fieldPath: filter.field },
|
|
1123
|
+
op: mapWhereOp(filter.op),
|
|
1124
|
+
value: toFirestoreValue(filter.value)
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
});
|
|
1110
1128
|
if (filters.length === 1) {
|
|
1111
1129
|
query.where = filters[0];
|
|
1112
1130
|
} else {
|
package/dist/index.mjs
CHANGED
|
@@ -859,13 +859,31 @@ function buildStructuredQuery(collectionPath, options) {
|
|
|
859
859
|
from: [fromClause]
|
|
860
860
|
};
|
|
861
861
|
if (options?.where && options.where.length > 0) {
|
|
862
|
-
const filters = options.where.map((filter) =>
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
862
|
+
const filters = options.where.map((filter) => {
|
|
863
|
+
if ((filter.value === null || filter.value === void 0) && filter.op === "==") {
|
|
864
|
+
return {
|
|
865
|
+
unaryFilter: {
|
|
866
|
+
field: { fieldPath: filter.field },
|
|
867
|
+
op: "IS_NULL"
|
|
868
|
+
}
|
|
869
|
+
};
|
|
867
870
|
}
|
|
868
|
-
|
|
871
|
+
if (filter.value !== filter.value && filter.op === "==") {
|
|
872
|
+
return {
|
|
873
|
+
unaryFilter: {
|
|
874
|
+
field: { fieldPath: filter.field },
|
|
875
|
+
op: "IS_NAN"
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
return {
|
|
880
|
+
fieldFilter: {
|
|
881
|
+
field: { fieldPath: filter.field },
|
|
882
|
+
op: mapWhereOp(filter.op),
|
|
883
|
+
value: toFirestoreValue(filter.value)
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
});
|
|
869
887
|
if (filters.length === 1) {
|
|
870
888
|
query.where = filters[0];
|
|
871
889
|
} else {
|
package/package.json
CHANGED