-
Notifications
You must be signed in to change notification settings - Fork 61
fix(node): load properly better-sqlite3 #795
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
Conversation
🦋 Changeset detectedLatest commit: eba6034 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
simolus3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To help me validate this, could you share how you've reproduced this? We've obviously also using that in tests and demos and never had issues with it. I assume this only happens on CommonJS entrypoints?
This also needs a changeset (pnpm -w changeset).
flochaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it's on CommonJS one. Will add the changeset
simolus3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix 👍 I can reproduce the issue with a .cjs entrypoint.
Co-authored-by: Simon Binder <oss@simonbinder.eu>
|
My bad will will fix
Florian Chazal
…On Sun, 21 Dec 2025, 13:01 Simon Binder, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/node/src/db/SqliteWorker.ts
<#795 (comment)>
:
> + return module && typeof module === 'object' && 'default' in module
+ ? module.default
+ : module;
@flochaz <https://github.com/flochaz> You've marked this as resolved but
the branch still has the original variant. Is there a reason against this
change?
—
Reply to this email directly, view it on GitHub
<#795 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJLIUM3BL6S6FBGXI6GTXT4C2D3HAVCNFSM6AAAAACOWR36ZWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTMMBRGY3TAOBZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Co-authored-by: Simon Binder <oss@simonbinder.eu>
simolus3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
Released in version |
Context
Using the default worker fail with bad import of better-sqlite3. Patching
loadBetterSqlite3function to return thedefaultif exposed fixed the issue.