jazz-tools 0.13.23 → 0.13.26

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > jazz-tools@0.13.23 build /home/runner/_work/jazz/jazz/packages/jazz-tools
2
+ > jazz-tools@0.13.26 build /home/runner/_work/jazz/jazz/packages/jazz-tools
3
3
  > tsup && pnpm types
4
4
 
5
5
  CLI Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
@@ -11,12 +11,12 @@
11
11
  ESM Build start
12
12
  ESM dist/index.js 1.48 KB
13
13
  ESM dist/testing.js 6.27 KB
14
- ESM dist/chunk-K7VKB2XQ.js 122.91 KB
14
+ ESM dist/chunk-E4PALNK7.js 122.85 KB
15
15
  ESM dist/index.js.map 258.00 B
16
16
  ESM dist/testing.js.map 12.38 KB
17
- ESM dist/chunk-K7VKB2XQ.js.map 281.53 KB
18
- ESM ⚡️ Build success in 47ms
17
+ ESM dist/chunk-E4PALNK7.js.map 281.45 KB
18
+ ESM ⚡️ Build success in 57ms
19
19
 
20
- > jazz-tools@0.13.23 types /home/runner/_work/jazz/jazz/packages/jazz-tools
20
+ > jazz-tools@0.13.26 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.26
4
+
5
+ ### Patch Changes
6
+
7
+ - ff846d9: Fix loading accounts with the new subscription engine
8
+
9
+ ## 0.13.25
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [a846e07]
14
+ - cojson@0.13.25
15
+
3
16
  ## 0.13.23
4
17
 
5
18
  ### Patch Changes
@@ -136,7 +136,7 @@ var JazzError = class _JazzError {
136
136
  };
137
137
 
138
138
  // src/subscribe/utils.ts
139
- import { RawAccount, RawGroup } from "cojson";
139
+ import { RawAccount } from "cojson";
140
140
 
141
141
  // src/coValues/registeredSchemas.ts
142
142
  var RegisteredSchemas = {};
@@ -157,7 +157,7 @@ var coValuesCache = {
157
157
 
158
158
  // src/subscribe/utils.ts
159
159
  function getOwnerFromRawValue(raw) {
160
- let owner = raw instanceof RawGroup ? raw : raw.group;
160
+ const owner = raw.group;
161
161
  return coValuesCache.get(
162
162
  owner,
163
163
  () => owner instanceof RawAccount ? RegisteredSchemas["Account"].fromRaw(owner) : RegisteredSchemas["Group"].fromRaw(owner)
@@ -245,9 +245,8 @@ var SubscriptionScope = class _SubscriptionScope {
245
245
  this.triggerUpdate();
246
246
  return;
247
247
  }
248
- const owner = getOwnerFromRawValue(update);
249
248
  const ruleset = update.core.verified.header.ruleset;
250
- const hasAccess = ruleset.type === "group" || owner.myRole() !== void 0;
249
+ const hasAccess = ruleset.type !== "ownedByGroup" || getOwnerFromRawValue(update).myRole() !== void 0;
251
250
  if (!hasAccess) {
252
251
  if (this.value.type !== "unauthorized") {
253
252
  this.updateValue(
@@ -3508,7 +3507,7 @@ var CoPlainText = class extends String {
3508
3507
  *
3509
3508
  * The 'hint' parameter indicates the preferred type of conversion:
3510
3509
  * - 'string': prefer string conversion
3511
- * - 'number': prefer number conversion (not meaningful for text, so return NaN)
3510
+ * - 'number': prefer number conversion (attempt to parse the text as a number)
3512
3511
  * - 'default': usually treat as string
3513
3512
  */
3514
3513
  [Symbol.toPrimitive](hint) {
@@ -4274,4 +4273,4 @@ export {
4274
4273
  consumeInviteLink
4275
4274
  };
4276
4275
  /* istanbul ignore file -- @preserve */
4277
- //# sourceMappingURL=chunk-K7VKB2XQ.js.map
4276
+ //# sourceMappingURL=chunk-E4PALNK7.js.map