Compare commits

..

3 Commits

Author SHA1 Message Date
Guido D'Orsi
23521e6468 Merge pull request #2197 from garden-co/changeset-release/main
Version Packages
2025-05-12 20:06:14 +02:00
github-actions[bot]
1627eb7652 Version Packages 2025-05-12 18:05:04 +00:00
Guido D'Orsi
ff846d9095 fix: loading RawAccount with the new subscription engine 2025-05-12 20:02:57 +02:00
96 changed files with 491 additions and 71 deletions

View File

@@ -1,5 +1,14 @@
# chat-rn-expo-clerk
## 1.0.117
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-expo@0.13.26
- jazz-react-native-media-images@0.13.26
## 1.0.116
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "chat-rn-expo-clerk",
"main": "index.js",
"version": "1.0.116",
"version": "1.0.117",
"scripts": {
"build": "expo export -p ios",
"start": "expo start",

View File

@@ -1,5 +1,13 @@
# chat-rn-expo
## 1.0.104
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-expo@0.13.26
## 1.0.103
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn-expo",
"version": "1.0.103",
"version": "1.0.104",
"main": "index.js",
"scripts": {
"build": "expo export -p ios",

View File

@@ -1,5 +1,13 @@
# chat-rn
## 1.0.112
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react-native@0.13.26
## 1.0.111
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-rn",
"version": "1.0.111",
"version": "1.0.112",
"main": "index.js",
"scripts": {
"android": "react-native run-android",

View File

@@ -1,5 +1,14 @@
# chat-vue
## 0.0.95
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
- jazz-vue@0.13.26
## 0.0.94
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "chat-vue",
"version": "0.0.94",
"version": "0.0.95",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,14 @@
# jazz-example-chat
## 0.0.193
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.192
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-chat",
"private": true,
"version": "0.0.192",
"version": "0.0.193",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# minimal-auth-clerk
## 0.0.92
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
- jazz-react-auth-clerk@0.13.26
## 0.0.91
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "clerk",
"private": true,
"version": "0.0.91",
"version": "0.0.92",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# file-share-svelte
## 0.0.76
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector-element@0.13.26
- jazz-svelte@0.13.26
## 0.0.75
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "file-share-svelte",
"version": "0.0.75",
"version": "0.0.76",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,14 @@
# jazz-tailwind-demo-auth-starter
## 0.0.32
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.31
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "filestream",
"private": true,
"version": "0.0.31",
"version": "0.0.32",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# form
## 0.1.33
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.1.32
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "form",
"private": true,
"version": "0.1.32",
"version": "0.1.33",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# image-upload
## 0.0.89
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.88
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "image-upload",
"private": true,
"version": "0.0.88",
"version": "0.0.89",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,11 @@
# jazz-example-inspector
## 0.0.143
### Patch Changes
- jazz-inspector@0.13.26
## 0.0.142
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-inspector-app",
"private": true,
"version": "0.0.142",
"version": "0.0.143",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# multi-cursors
## 0.0.85
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.84
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "multi-cursors",
"private": true,
"version": "0.0.84",
"version": "0.0.85",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# multiauth
## 0.0.33
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
- jazz-react-auth-clerk@0.13.26
## 0.0.32
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "multiauth",
"private": true,
"version": "0.0.32",
"version": "0.0.33",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# jazz-example-musicplayer
## 0.0.114
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.113
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-music-player",
"private": true,
"version": "0.0.113",
"version": "0.0.114",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# organization
## 0.0.85
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.84
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "organization",
"private": true,
"version": "0.0.84",
"version": "0.0.85",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# passkey-svelte
## 0.0.80
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-svelte@0.13.26
## 0.0.79
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "passkey-svelte",
"version": "0.0.79",
"version": "0.0.80",
"type": "module",
"private": true,
"scripts": {

View File

@@ -1,5 +1,13 @@
# minimal-auth-passkey
## 0.0.90
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.89
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "passkey",
"private": true,
"version": "0.0.89",
"version": "0.0.90",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# passphrase
## 0.0.87
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.86
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "passphrase",
"private": true,
"version": "0.0.86",
"version": "0.0.87",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# jazz-password-manager
## 0.0.111
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.110
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-password-manager",
"private": true,
"version": "0.0.110",
"version": "0.0.111",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# jazz-example-pets
## 0.0.209
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.208
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-pets",
"private": true,
"version": "0.0.208",
"version": "0.0.209",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# reactions
## 0.0.89
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.88
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "reactions",
"private": true,
"version": "0.0.88",
"version": "0.0.89",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# richtext-tiptap
## 0.1.2
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
- jazz-richtext-tiptap@0.1.2
## 0.1.1
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "richtext-tiptap",
"private": true,
"version": "0.1.1",
"version": "0.1.2",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# richtext
## 0.0.79
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
- jazz-richtext-prosemirror@0.1.13
## 0.0.78
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "richtext",
"private": true,
"version": "0.0.78",
"version": "0.0.79",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# todo-vue
## 0.0.93
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
- jazz-vue@0.13.26
## 0.0.92
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "todo-vue",
"version": "0.0.92",
"version": "0.0.93",
"private": true,
"type": "module",
"scripts": {

View File

@@ -1,5 +1,13 @@
# jazz-example-todo
## 0.0.208
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react@0.13.26
## 0.0.207
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-example-todo",
"private": true,
"version": "0.0.207",
"version": "0.0.208",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,14 @@
# version-history
## 0.0.87
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.86
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "version-history",
"private": true,
"version": "0.0.86",
"version": "0.0.87",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -1,5 +1,13 @@
# jazz-auth-clerk
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,14 +1,14 @@
{
"name": "jazz-auth-clerk",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"license": "MIT",
"dependencies": {
"cojson": "workspace:0.13.25",
"jazz-browser": "workspace:0.13.25",
"jazz-tools": "workspace:0.13.25"
"jazz-browser": "workspace:0.13.26",
"jazz-tools": "workspace:0.13.26"
},
"scripts": {
"format-and-lint": "biome check .",

View File

@@ -1,5 +1,13 @@
# jazz-browser-media-images
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-browser-media-images",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -8,8 +8,8 @@
"dependencies": {
"@types/image-blob-reduce": "^4.1.1",
"image-blob-reduce": "^4.1.0",
"jazz-browser": "workspace:0.13.25",
"jazz-tools": "workspace:0.13.25",
"jazz-browser": "workspace:0.13.26",
"jazz-tools": "workspace:0.13.26",
"pica": "^9.0.1"
},
"scripts": {

View File

@@ -1,5 +1,12 @@
# jazz-browser
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-browser",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,15 @@
# jazz-browser
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-auth-clerk@0.13.26
- jazz-react-core@0.13.26
- jazz-react-native-core@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-expo",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,13 @@
# jazz-inspector-element
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-inspector-element",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "./dist/main.js",
"types": "./dist/main.d.ts",

View File

@@ -1,5 +1,13 @@
# jazz-inspector
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react-core@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-inspector",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "./dist/app.js",
"types": "./dist/app.d.ts",

View File

@@ -1,5 +1,12 @@
# jazz-autosub
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -5,7 +5,7 @@
"types": "dist/index.d.ts",
"type": "module",
"license": "MIT",
"version": "0.13.25",
"version": "0.13.26",
"dependencies": {
"cojson": "workspace:*",
"cojson-transport-ws": "workspace:*",

View File

@@ -1,5 +1,15 @@
# jazz-browser-media-images
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-auth-clerk@0.13.26
- jazz-browser@0.13.26
- jazz-react@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-auth-clerk",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,12 @@
# jazz-react-core
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-core",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,13 @@
# jazz-browser
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react-core@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-react-native-core",
"type": "module",
"version": "0.13.25",
"version": "0.13.26",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,12 @@
# jazz-browser-media-images
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-native-media-images",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -1,5 +1,13 @@
# jazz-browser
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-react-native-core@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react-native",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",

View File

@@ -1,5 +1,15 @@
# jazz-react
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
- jazz-browser-media-images@0.13.26
- jazz-react-core@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-react",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -18,10 +18,10 @@
"dependencies": {
"@scure/bip39": "^1.3.0",
"cojson": "workspace:0.13.25",
"jazz-browser-media-images": "workspace:0.13.25",
"jazz-browser": "workspace:0.13.25",
"jazz-react-core": "workspace:0.13.25",
"jazz-tools": "workspace:0.13.25"
"jazz-browser-media-images": "workspace:0.13.26",
"jazz-browser": "workspace:0.13.26",
"jazz-react-core": "workspace:0.13.26",
"jazz-tools": "workspace:0.13.26"
},
"devDependencies": {
"@testing-library/dom": "^10.4.0",

View File

@@ -1,5 +1,13 @@
# jazz-richtext-prosemirror
## 0.1.13
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
## 0.1.12
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-richtext-prosemirror",
"version": "0.1.12",
"version": "0.1.13",
"description": "ProseMirror integration for Jazz rich text editing",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,14 @@
# jazz-richtext-tiptap
## 0.1.2
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
- jazz-richtext-prosemirror@0.1.13
## 0.1.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-richtext-tiptap",
"version": "0.1.1",
"version": "0.1.2",
"description": "Tiptap integration for Jazz rich text editing",
"main": "dist/index.js",
"types": "src/index.ts",

View File

@@ -1,5 +1,12 @@
# jazz-run
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -3,7 +3,7 @@
"bin": "./dist/index.js",
"type": "module",
"license": "MIT",
"version": "0.13.25",
"version": "0.13.26",
"exports": {
"./startSyncServer": {
"import": "./dist/startSyncServer.js",
@@ -31,7 +31,7 @@
"cojson-storage-sqlite": "workspace:0.13.25",
"cojson-transport-ws": "workspace:0.13.25",
"effect": "^3.6.5",
"jazz-tools": "workspace:0.13.25",
"jazz-tools": "workspace:0.13.26",
"ws": "^8.14.2"
},
"devDependencies": {

View File

@@ -1,5 +1,13 @@
# jazz-svelte
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-svelte",
"version": "0.13.25",
"version": "0.13.26",
"scripts": {
"dev": "vite dev",
"build": "vite build && npm run package",

View File

@@ -1,5 +1,11 @@
# jazz-tools
## 0.13.26
### Patch Changes
- ff846d9: Fix loading accounts with the new subscription engine
## 0.13.25
### Patch Changes

View File

@@ -17,7 +17,7 @@
},
"type": "module",
"license": "MIT",
"version": "0.13.25",
"version": "0.13.26",
"dependencies": {
"@scure/bip39": "^1.3.0",
"cojson": "workspace:*",

View File

@@ -72,12 +72,12 @@ export class SubscriptionScope<D extends CoValue> {
return;
}
const owner = getOwnerFromRawValue(update);
const ruleset = update.core.verified.header.ruleset;
// Groups and accounts are accessible by everyone, for the other coValues we use the role to check access
const hasAccess = ruleset.type === "group" || owner.myRole() !== undefined;
const hasAccess =
ruleset.type !== "ownedByGroup" ||
getOwnerFromRawValue(update).myRole() !== undefined;
if (!hasAccess) {
if (this.value.type !== "unauthorized") {

View File

@@ -1,13 +1,13 @@
import { RawAccount, RawCoValue, RawGroup } from "cojson";
import { RawAccount, RawCoValue } from "cojson";
import { RegisteredSchemas } from "../coValues/registeredSchemas.js";
import { CoValue, RefEncoded, instantiateRefEncoded } from "../internal.js";
import { coValuesCache } from "../lib/cache.js";
import { SubscriptionScope } from "./SubscriptionScope.js";
export function getOwnerFromRawValue(raw: RawCoValue) {
let owner = raw instanceof RawGroup ? raw : raw.group;
const owner = raw.group;
return coValuesCache.get(owner as any, () =>
return coValuesCache.get(owner, () =>
owner instanceof RawAccount
? RegisteredSchemas["Account"].fromRaw(owner)
: RegisteredSchemas["Group"].fromRaw(owner as any),

View File

@@ -1,12 +1,18 @@
import { expect, test } from "vitest";
import { LocalNode } from "cojson";
import { assert, beforeEach, expect, test } from "vitest";
import { Account, CoMap, Group, co } from "../exports.js";
import {
createJazzTestAccount,
linkAccounts,
setActiveAccount,
setupJazzTestSync,
} from "../testing.js";
import { setupTwoNodes } from "./utils.js";
beforeEach(async () => {
await setupJazzTestSync();
});
test("waitForAllCoValuesSync should resolve when all the values are synced", async () => {
class TestMap extends CoMap {
name = co.string;
@@ -98,3 +104,38 @@ test("accounts should sync correctly", async () => {
expect(members[0]?.account.profile!.name).toBe("test 1");
expect(members[1]?.account.profile!.name).toBe("test 2");
});
test("loading accounts should work", async () => {
const account = await createJazzTestAccount({
creationProps: {
name: "test 1",
},
});
const otherAccount = await createJazzTestAccount();
const loadedAccount = await Account.load(account.id, {
loadAs: otherAccount,
resolve: {
profile: true,
},
});
assert(loadedAccount);
expect(loadedAccount.profile.name).toBe("test 1");
});
test("loading raw accounts should work", async () => {
const account = await createJazzTestAccount({
creationProps: {
name: "test 1",
},
});
const loadedAccount = await Account.load(account.id, {
loadAs: account,
});
assert(loadedAccount);
expect(loadedAccount.profile!.name).toBe("test 1");
});

View File

@@ -1,5 +1,13 @@
# jazz-react
## 0.13.26
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-browser@0.13.26
## 0.13.25
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "jazz-vue",
"version": "0.13.25",
"version": "0.13.26",
"type": "module",
"main": "dist/index.js",
"types": "src/index.ts",

18
pnpm-lock.yaml generated
View File

@@ -2055,10 +2055,10 @@ importers:
specifier: workspace:0.13.25
version: link:../cojson
jazz-browser:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-browser
jazz-tools:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-tools
devDependencies:
typescript:
@@ -2096,10 +2096,10 @@ importers:
specifier: ^4.1.0
version: 4.1.0
jazz-browser:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-browser
jazz-tools:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-tools
pica:
specifier: ^9.0.1
@@ -2257,16 +2257,16 @@ importers:
specifier: workspace:0.13.25
version: link:../cojson
jazz-browser:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-browser
jazz-browser-media-images:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-browser-media-images
jazz-react-core:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-react-core
jazz-tools:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-tools
devDependencies:
'@testing-library/dom':
@@ -2568,7 +2568,7 @@ importers:
specifier: ^3.6.5
version: 3.11.9
jazz-tools:
specifier: workspace:0.13.25
specifier: workspace:0.13.26
version: link:../jazz-tools
ws:
specifier: ^8.14.2

View File

@@ -1,5 +1,14 @@
# jazz-tailwind-demo-auth-starter
## 0.0.86
### Patch Changes
- Updated dependencies [ff846d9]
- jazz-tools@0.13.26
- jazz-inspector@0.13.26
- jazz-react@0.13.26
## 0.0.85
### Patch Changes

View File

@@ -1,7 +1,7 @@
{
"name": "jazz-tailwind-demo-auth-starter",
"private": true,
"version": "0.0.85",
"version": "0.0.86",
"type": "module",
"scripts": {
"dev": "vite",