jazz-tools 0.13.7 → 0.13.10
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +13 -0
- package/dist/{chunk-VQWUJIL4.js → chunk-NFVKGXSH.js} +16 -3
- package/dist/chunk-NFVKGXSH.js.map +1 -0
- package/dist/coValues/deepLoading.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/package.json +2 -2
- package/src/coValues/coList.ts +5 -1
- package/src/coValues/deepLoading.ts +15 -1
- package/src/tests/subscribe.test.ts +205 -0
- package/dist/chunk-VQWUJIL4.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.13.
|
2
|
+
> jazz-tools@0.13.10 build /home/runner/_work/jazz/jazz/packages/jazz-tools
|
3
3
|
> tsup && pnpm types
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
|
@@ -11,12 +11,12 @@
|
|
11
11
|
[34mESM[39m Build start
|
12
12
|
[32mESM[39m [1mdist/index.js [22m[32m1.50 KB[39m
|
13
13
|
[32mESM[39m [1mdist/testing.js [22m[32m6.26 KB[39m
|
14
|
-
[32mESM[39m [1mdist/chunk-
|
14
|
+
[32mESM[39m [1mdist/chunk-NFVKGXSH.js [22m[32m128.03 KB[39m
|
15
15
|
[32mESM[39m [1mdist/index.js.map [22m[32m259.00 B[39m
|
16
16
|
[32mESM[39m [1mdist/testing.js.map [22m[32m12.37 KB[39m
|
17
|
-
[32mESM[39m [1mdist/chunk-
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
17
|
+
[32mESM[39m [1mdist/chunk-NFVKGXSH.js.map [22m[32m301.60 KB[39m
|
18
|
+
[32mESM[39m ⚡️ Build success in 48ms
|
19
19
|
|
20
|
-
> jazz-tools@0.13.
|
20
|
+
> jazz-tools@0.13.10 types /home/runner/_work/jazz/jazz/packages/jazz-tools
|
21
21
|
> tsc --outDir dist
|
22
22
|
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.13.10
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies [f837cfe]
|
8
|
+
- cojson@0.13.10
|
9
|
+
|
10
|
+
## 0.13.9
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- a6cf01f: Handle null values on CoList when using $each: true
|
15
|
+
|
3
16
|
## 0.13.7
|
4
17
|
|
5
18
|
### Patch Changes
|
@@ -73,7 +73,7 @@ function fulfillsDepth(depth, value) {
|
|
73
73
|
const result = { status: "fulfilled" };
|
74
74
|
for (const [key, item] of Object.entries(value)) {
|
75
75
|
const rawValue = map._raw.get(key);
|
76
|
-
if (rawValue !== void 0) {
|
76
|
+
if (rawValue !== void 0 && rawValue !== null) {
|
77
77
|
if (!item) {
|
78
78
|
if (hasReadAccess(map, key)) {
|
79
79
|
result.status = "unfulfilled";
|
@@ -154,7 +154,17 @@ function fulfillsDepth(depth, value) {
|
|
154
154
|
} else if (value._type === "CoList") {
|
155
155
|
if ("$each" in depth) {
|
156
156
|
const result = { status: "fulfilled" };
|
157
|
+
const list = value;
|
157
158
|
for (const [key, item] of value.entries()) {
|
159
|
+
const rawValue = list._raw.get(key);
|
160
|
+
if (!rawValue) {
|
161
|
+
if (isOptionalField(value, ItemsSym)) {
|
162
|
+
continue;
|
163
|
+
}
|
164
|
+
throw new Error(
|
165
|
+
`The ref ${key} on ${list.constructor.name} is required but missing`
|
166
|
+
);
|
167
|
+
}
|
158
168
|
if (hasRefValue(value, key)) {
|
159
169
|
if (!item) {
|
160
170
|
if (hasReadAccess(value, key)) {
|
@@ -2965,7 +2975,10 @@ var _CoList = class _CoList extends Array {
|
|
2965
2975
|
_CoList.prototype._type = "CoList";
|
2966
2976
|
var CoList = _CoList;
|
2967
2977
|
function toRawItems(items, itemDescriptor) {
|
2968
|
-
const rawItems = itemDescriptor === "json" ? items : "encoded" in itemDescriptor ? items?.map((e) => itemDescriptor.encoded.encode(e)) : isRefEncoded(itemDescriptor) ? items?.map((v) =>
|
2978
|
+
const rawItems = itemDescriptor === "json" ? items : "encoded" in itemDescriptor ? items?.map((e) => itemDescriptor.encoded.encode(e)) : isRefEncoded(itemDescriptor) ? items?.map((v) => {
|
2979
|
+
if (!v) return null;
|
2980
|
+
return v.id;
|
2981
|
+
}) : (() => {
|
2969
2982
|
throw new Error("Invalid element descriptor");
|
2970
2983
|
})();
|
2971
2984
|
return rawItems;
|
@@ -4443,4 +4456,4 @@ export {
|
|
4443
4456
|
consumeInviteLink
|
4444
4457
|
};
|
4445
4458
|
/* istanbul ignore file -- @preserve */
|
4446
|
-
//# sourceMappingURL=chunk-
|
4459
|
+
//# sourceMappingURL=chunk-NFVKGXSH.js.map
|