Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better-sqlite3 as a peer dep #92

Closed
gmaclennan opened this issue Jan 30, 2023 · 0 comments · Fixed by #93
Closed

better-sqlite3 as a peer dep #92

gmaclennan opened this issue Jan 30, 2023 · 0 comments · Fixed by #93
Assignees

Comments

@gmaclennan
Copy link
Member

Since there seem to be challenges with building sqlite on all platforms (e.g. digidem/mapeo-desktop#715 (comment)), maybe consider adding better-sqlite3 as a peer dep, and changing the constructor to accept a sqlite instance instead of a db path. That would enable us to continue to use better-sqlite3@7 for mapeo mobile for now, while also updating to @8 for desktop.
(however when better-sqlite3 says that node 12 support is dropped, it means that it is no longer tested and prebuilds are no longer made, but I don't see anything yet that breaks for node 12, but it could break for node 12 with a non-breaking change in the future).

@achou11 achou11 self-assigned this Jan 30, 2023
EvanHahn added a commit that referenced this issue Feb 11, 2024
The core of this change:

```diff
 const mapServer = createMapServer(
   {},
-  { database: new Database('./example.db') }
+  { storagePath: './map-server-example.db' }
 )
```

See also: [#92], [#93], [this comment][comment].

[#92]: #92
[#93]: #93
[comment]: #100 (comment)
EvanHahn added a commit that referenced this issue Feb 12, 2024
The core of this change:

```diff
 const mapServer = createMapServer(
   {},
-  { database: new Database('./example.db') }
+  { storagePath: './map-server-example.db' }
 )
```

See also: [#92], [#93], [this comment][comment].

[#92]: #92
[#93]: #93
[comment]: #100 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants