You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PouchDB uses leveldown by default, which is quite old and unmaintained at the moment.
You cannot use it on node >= 20 because:
node-gyp-build tries to spawn an external helper script (prebuild-install.cmd, node-gyp.cmd, etc.) while installing leveldown.
Since Node v20.12.2 / v22.x the Windows-only security patch for CVE-2024-27980 blocks any direct spawn of a .cmd or .bat file unless the caller passes {shell:true}. When a blocked call happens, Node now throws Error: spawn EINVAL instead of running the command nodejs.org.
Upgrading leveldb would look overwhelming for me. So I decided to make this module.
SQLite3 is fast enough and lightweight
It internally uses better-sqlite3.
Compiling the native module is quite faster than leveldown.
Stable (I hope)
I copied integration tests from PouchDB and this module passes them:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Just wanted to share another adapter for PouchDB.
https://github.com/inkdropapp/pouchdb-adapter-node-sqlite
Why?
PouchDB uses leveldown by default, which is quite old and unmaintained at the moment.
You cannot use it on node >= 20 because:
node-gyp-buildtries to spawn an external helper script (prebuild-install.cmd,node-gyp.cmd, etc.) while installingleveldown..cmdor.batfile unless the caller passes{shell:true}. When a blocked call happens, Node now throwsError: spawn EINVALinstead of running the command nodejs.org.Upgrading leveldb would look overwhelming for me. So I decided to make this module.
SQLite3 is fast enough and lightweight
It internally uses better-sqlite3.
Compiling the native module is quite faster than leveldown.
Stable (I hope)
I copied integration tests from PouchDB and this module passes them:
It supports arm64
I'm going to use it in my product.
I hope some people will find this module useful as well.
Beta Was this translation helpful? Give feedback.
All reactions