From 891ca5966f0e372171ec7acd9a9ef0e9abbc573e Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Wed, 8 Jan 2025 11:27:38 -0500 Subject: [PATCH 1/5] update core --- package-lock.json | 46 ++++++++++++++++++++++++++++++---------------- package.json | 2 +- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1964848..cc4ce35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { - "@comapeo/core": "2.1.0", + "@comapeo/core": "2.3.0", "@comapeo/ipc": "2.0.2", "@formatjs/intl": "^3.0.1", "@mapeo/default-config": "5.0.0", @@ -450,13 +450,13 @@ } }, "node_modules/@comapeo/core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@comapeo/core/-/core-2.1.0.tgz", - "integrity": "sha512-Fvi/EO1RJIQfpmKFUs4QApM2TsV8JrKw3HbNZ3hmlXiPl1oVVvIce0KkfdPJOoYHbEznTc9dIN1A2vkaoi431A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@comapeo/core/-/core-2.3.0.tgz", + "integrity": "sha512-yH/GOKMGSRNbdo4mKf+XXw7TGzdK+e4Ze9QfojhKs2Gdmq6uXMGp74XbUBUyzLKxiUnYCyOM0dPIyQR+i08yqg==", "license": "MIT", "dependencies": { "@comapeo/fallback-smp": "^1.0.0", - "@comapeo/schema": "1.2.0", + "@comapeo/schema": "1.3.0", "@digidem/types": "^2.3.0", "@fastify/error": "^3.4.1", "@fastify/type-provider-typebox": "^4.1.0", @@ -464,6 +464,7 @@ "@mapeo/crypto": "1.0.0-alpha.10", "@mapeo/sqlite-indexer": "1.0.0-alpha.9", "@sinclair/typebox": "^0.29.6", + "@sindresorhus/merge-streams": "^4.0.0", "b4a": "^1.6.3", "bcp-47": "^2.1.0", "better-sqlite3": "^8.7.0", @@ -499,8 +500,9 @@ "sub-encoder": "^2.1.1", "throttle-debounce": "^5.0.0", "tiny-typed-emitter": "^2.1.0", - "type-fest": "^4.5.0", + "type-fest": "^4.30.0", "undici": "^6.13.0", + "unix-path-resolve": "^1.0.2", "varint": "^6.0.0", "ws": "^8.18.0", "yauzl-promise": "^4.0.0" @@ -527,9 +529,9 @@ "license": "MIT" }, "node_modules/@comapeo/geometry": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@comapeo/geometry/-/geometry-1.0.2.tgz", - "integrity": "sha512-q6zadJA3lr85GZPTZ+lol9F6ERRq2Rt4upON7HhcwPPBiCLN696SY03OJZCE6xkXHxjJY98FF5DxVX3W0IftLQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@comapeo/geometry/-/geometry-1.1.1.tgz", + "integrity": "sha512-MKnyzqhmpUUV5qCjUUDwUjuBx/ym9aizfOZ0h9+6SjQwCQa2kBRTN+Y9qDqteFSlJd0QMQRKpBmu+2OXJPypCQ==", "license": "MIT", "dependencies": { "protobufjs": "^7.4.0" @@ -553,12 +555,12 @@ } }, "node_modules/@comapeo/schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@comapeo/schema/-/schema-1.2.0.tgz", - "integrity": "sha512-LWrUSqtXmrEmE/B9V/zffKBbJmMo37AlvjXczvGx1+BbCAjOYCPDX6GCtnSKNsvtnNS2KQZDm9apg3mp92tFGA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@comapeo/schema/-/schema-1.3.0.tgz", + "integrity": "sha512-+rDgfKahCbUk5bU6BBcCQ3aMSRJfenkbYET0PdN4sg2c+G3BOELaTI5+s5n+oZQEEOxYXp3UDkT61PlA2nUPQw==", "license": "MIT", "dependencies": { - "@comapeo/geometry": "^1.0.2", + "@comapeo/geometry": "^1.1.0", "compact-encoding": "^2.12.0", "protobufjs": "^7.2.5", "type-fest": "^4.26.0" @@ -3892,6 +3894,18 @@ "url": "https://github.com/sindresorhus/is?sponsor=1" } }, + "node_modules/@sindresorhus/merge-streams": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz", + "integrity": "sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", @@ -17914,9 +17928,9 @@ } }, "node_modules/type-fest": { - "version": "4.26.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.26.1.tgz", - "integrity": "sha512-yOGpmOAL7CkKe/91I5O3gPICmJNLJ1G4zFYVAsRHg7M64biSnPtRj0WNQt++bRkjYOqjWXrhnUw1utzmVErAdg==", + "version": "4.31.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.31.0.tgz", + "integrity": "sha512-yCxltHW07Nkhv/1F6wWBr8kz+5BGMfP+RbRSYFnegVb0qV/UMT0G0ElBloPVerqn4M2ZV80Ir1FtCcYv1cT6vQ==", "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=16" diff --git a/package.json b/package.json index aa200ef..309b55b 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "vite:build": "vite build src/renderer" }, "dependencies": { - "@comapeo/core": "2.1.0", + "@comapeo/core": "2.3.0", "@comapeo/ipc": "2.0.2", "@formatjs/intl": "^3.0.1", "@mapeo/default-config": "5.0.0", From 407564c663d68ce647e7006b8f80ecfddb1bc25a Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Wed, 8 Jan 2025 11:28:03 -0500 Subject: [PATCH 2/5] update core ipc --- package-lock.json | 10 +++++----- package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc4ce35..63cdef2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "GPL-3.0", "dependencies": { "@comapeo/core": "2.3.0", - "@comapeo/ipc": "2.0.2", + "@comapeo/ipc": "2.1.0", "@formatjs/intl": "^3.0.1", "@mapeo/default-config": "5.0.0", "debug": "^4.3.7", @@ -538,9 +538,9 @@ } }, "node_modules/@comapeo/ipc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@comapeo/ipc/-/ipc-2.0.2.tgz", - "integrity": "sha512-nOm2MzUjnN9GNYW8cAXzfAyW3URJz+lWm9nyKm8vmTTxiwBt6ZMEd2DCU28dl1KNfasqw79501jWY+fELFt/wg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@comapeo/ipc/-/ipc-2.1.0.tgz", + "integrity": "sha512-awrVjwI25wJVX1OoE4yBBdWP7rLO/lHeYfjne2wk7ecuuO5abekKUQ0QFoKLpvo94LNnK+K61jRrEN5A4FY9lw==", "license": "MIT", "dependencies": { "eventemitter3": "^5.0.1", @@ -551,7 +551,7 @@ "node": ">=18.17.1" }, "peerDependencies": { - "@comapeo/core": "^2.0.0" + "@comapeo/core": "^2.2.0" } }, "node_modules/@comapeo/schema": { diff --git a/package.json b/package.json index 309b55b..edeed1c 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ }, "dependencies": { "@comapeo/core": "2.3.0", - "@comapeo/ipc": "2.0.2", + "@comapeo/ipc": "2.1.0", "@formatjs/intl": "^3.0.1", "@mapeo/default-config": "5.0.0", "debug": "^4.3.7", From 01bfe9fbb9db4b3e97d1318b0339258192b7b941 Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Wed, 8 Jan 2025 11:29:27 -0500 Subject: [PATCH 3/5] update core react --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 63cdef2..b4c08d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "valibot": "^0.42.1" }, "devDependencies": { - "@comapeo/core-react": "0.1.2", + "@comapeo/core-react": "1.1.0", "@electron-forge/cli": "7.6.0", "@electron-forge/maker-deb": "7.6.0", "@electron-forge/maker-dmg": "7.6.0", @@ -509,9 +509,9 @@ } }, "node_modules/@comapeo/core-react": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@comapeo/core-react/-/core-react-0.1.2.tgz", - "integrity": "sha512-2BWce7pQKTE0anuxOWniAZTxDrFqmSPJvHcYGbDSQMftRraApL0kXc0E8Obq8IHHqtCwp9VDOhlIJpkHa+sZCw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@comapeo/core-react/-/core-react-1.1.0.tgz", + "integrity": "sha512-sukKrSoXNqo5Mq4qbSkzFdtse1uXKjaEUf1p3PFhzGZ2JAfXQwBE2ad0SAfprAjLgv2NslxbMYccWXu2WPzFLw==", "dev": true, "license": "MIT", "peerDependencies": { diff --git a/package.json b/package.json index edeed1c..cb84065 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "valibot": "^0.42.1" }, "devDependencies": { - "@comapeo/core-react": "0.1.2", + "@comapeo/core-react": "1.1.0", "@electron-forge/cli": "7.6.0", "@electron-forge/maker-deb": "7.6.0", "@electron-forge/maker-dmg": "7.6.0", From 5c8f7a3d52a573e9df7ce7d31897d078e663520e Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Wed, 8 Jan 2025 11:34:18 -0500 Subject: [PATCH 4/5] update patch file name --- ...> @comapeo+ipc+2.1.0+001+fix-client-server-import.patch} | 0 patches/README.md | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename patches/{@comapeo+ipc+2.0.2+001+fix-client-server-import.patch => @comapeo+ipc+2.1.0+001+fix-client-server-import.patch} (100%) diff --git a/patches/@comapeo+ipc+2.0.2+001+fix-client-server-import.patch b/patches/@comapeo+ipc+2.1.0+001+fix-client-server-import.patch similarity index 100% rename from patches/@comapeo+ipc+2.0.2+001+fix-client-server-import.patch rename to patches/@comapeo+ipc+2.1.0+001+fix-client-server-import.patch diff --git a/patches/README.md b/patches/README.md index cb64c12..f927551 100644 --- a/patches/README.md +++ b/patches/README.md @@ -11,15 +11,15 @@ By default, core sets up a file watcher for the `fallbackMapPath` option that's ## @comapeo/ipc -### [Change imports to avoid calling unavailable code](./@comapeo+ipc+2.0.2+001+fix-client-server-import.patch) +### [Change imports to avoid calling unavailable code](./@comapeo+ipc+2.1.0+001+fix-client-server-import.patch) -There was an error while running app via Expo because of exports in `rpc-reflector` package. To remove this patch, `rpc-reflector` would need to be updated not to use `encode-decode.js` file which indirect usage results in errors. +There was an error while running app because of exports in `rpc-reflector` package. To remove this patch, `rpc-reflector` would need to be updated not to use `encode-decode.js` file which indirect usage results in errors. ## rpc-reflector ### [Change imports to avoid calling unavailable code](./rpc-reflector+1.3.11+001+fix-client-duplex.patch) -There was an error while running app via Expo because of `duplex` method call in `rpc-reflector` package. +There was an error while running app because of `duplex` method call in `rpc-reflector` package. As this feature is not used in CoMapeo, this can be safely hardcoded to `false`. To remove this patch, `rpc-reflector` would need to be updated to account for this bug. ### [Use type imports in types-only file](./rpc-reflector+1.3.11+002+fix-verbatim-module-syntax-issues.patch) From 13b043eea9bea593b57c00ad02c913d6c2b5eb31 Mon Sep 17 00:00:00 2001 From: Andrew Chou Date: Wed, 8 Jan 2025 13:32:27 -0500 Subject: [PATCH 5/5] update file name for core patch --- ...=> @comapeo+core+2.3.0+001+fix-smp-fallback-map-setup.patch} | 0 patches/README.md | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename patches/{@comapeo+core+2.1.0+001+fix-smp-fallback-map-setup.patch => @comapeo+core+2.3.0+001+fix-smp-fallback-map-setup.patch} (100%) diff --git a/patches/@comapeo+core+2.1.0+001+fix-smp-fallback-map-setup.patch b/patches/@comapeo+core+2.3.0+001+fix-smp-fallback-map-setup.patch similarity index 100% rename from patches/@comapeo+core+2.1.0+001+fix-smp-fallback-map-setup.patch rename to patches/@comapeo+core+2.3.0+001+fix-smp-fallback-map-setup.patch diff --git a/patches/README.md b/patches/README.md index f927551..239f212 100644 --- a/patches/README.md +++ b/patches/README.md @@ -5,7 +5,7 @@ fixes. ## @comapeo/core -### [Do not watch fallback map patch when setting up SMP server plugin](./@comapeo+core+2.1.0+001+fix-smp-fallback-map-setup.patch) +### [Do not watch fallback map patch when setting up SMP server plugin](./@comapeo+core+2.3.0+001+fix-smp-fallback-map-setup.patch) By default, core sets up a file watcher for the `fallbackMapPath` option that's provided when instantiating `MapeoManager`. This does not work when packaging the app as an ASAR file (via Electron Forge) because watching a file within the ASAR directory is not possible. Instead, we change the setup so that it does not try to watch the file and instead make the assumption that the file always exists on instantiation, which is generally the case in CoMapeo Desktop (for now).