From 11eb0f38a6e57e7409d1b2321fb559bd5c461a13 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Sun, 3 Aug 2025 14:33:47 +0800 Subject: [PATCH] use official @sqlite.org/sqlite-wasm instead of our fork --- gulpfile.js | 4 ++-- package.json | 2 +- src/main/frontend/worker/db_worker.cljs | 8 ++++---- yarn.lock | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 4fed6854f5..d1b72420fa 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -78,7 +78,7 @@ const common = { 'node_modules/@isomorphic-git/lightning-fs/dist/lightning-fs.min.js', 'packages/amplify/dist/amplify.js', 'packages/ui/dist/ui/ui.js', - 'node_modules/@logseq/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm', + 'node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm', 'node_modules/react/umd/react.production.min.js', 'node_modules/react/umd/react.development.js', 'node_modules/react-dom/umd/react-dom.production.min.js', @@ -129,7 +129,7 @@ const common = { 'node_modules/photoswipe/dist/umd/*.js', 'packages/amplify/dist/amplify.js', 'packages/ui/dist/ui/ui.js', - 'node_modules/@logseq/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm', + 'node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm', ]).pipe(gulp.dest(path.join(outputPath, 'mobile', 'js'))), () => gulp.src([ 'packages/ui/dist/ionic/*.js', diff --git a/package.json b/package.json index 038274e0cc..e5ea189bde 100644 --- a/package.json +++ b/package.json @@ -139,10 +139,10 @@ "@js-joda/timezone": "2.5.0", "@logseq/diff-merge": "^0.2.2", "@logseq/react-tweet-embed": "1.3.1-1", - "@logseq/sqlite-wasm": "=0.1.1", "@radix-ui/colors": "^0.1.8", "@sentry/react": "^6.18.2", "@sentry/tracing": "^6.18.2", + "@sqlite.org/sqlite-wasm": "^3.50.3-build1", "@tabler/icons-react": "^2.47.0", "@tabler/icons-webfont": "^2.47.0", "@tippyjs/react": "4.2.5", diff --git a/src/main/frontend/worker/db_worker.cljs b/src/main/frontend/worker/db_worker.cljs index 226ec9b63a..774fba31dc 100644 --- a/src/main/frontend/worker/db_worker.cljs +++ b/src/main/frontend/worker/db_worker.cljs @@ -1,6 +1,6 @@ (ns frontend.worker.db-worker "Worker used for browser DB implementation" - (:require ["@logseq/sqlite-wasm" :default sqlite3InitModule] + (:require ["@sqlite.org/sqlite-wasm" :default sqlite3InitModule] ["comlink" :as Comlink] [cljs-bean.core :as bean] [cljs.cache :as cache] @@ -187,7 +187,7 @@ (when search (.close search)) (when client-ops (.close client-ops)) (when-let [^js pool (worker-state/get-opfs-pool repo)] - (.releaseAccessHandles pool)) + (.pauseVfs pool)) (swap! *opfs-pools dissoc repo)) (defn- close-other-dbs! @@ -221,7 +221,7 @@ (p/let [^js pool (