sqlite: rename DatabaseSync to Database - #65988
Open
araujogui wants to merge 3 commits into
Open
Conversation
Collaborator
|
Review requested:
|
Rename the DatabaseSync class to Database, and the internal DatabaseSyncLimits helper to DatabaseLimits to match. Assisted-by: claude-code:claude-sonnet-5 Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
araujogui
force-pushed
the
sqlite-rename-database-class
branch
from
September 11, 2026 17:20
d90b1f9 to
b52ec3e
Compare
Contributor
|
I didn't review the code fully, but does this leave an alias behind? If not, this will break every single current user. |
Member
Author
No, it doesn't. I will add it later |
DatabaseSync is kept as an alias of Database, wrapped with a DEP0210 runtime deprecation warning, so existing code using the pre-rename name keeps working. Assisted-by: claude-code:claude-sonnet-5 Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
lib/sqlite.js used object-spread (`...sqlite`) to re-export the internal binding, which crashed tools/doc's api-links generator: it walks module.exports's ObjectExpression properties expecting a `value` on each one, and a SpreadElement has no such property (TypeError: Cannot read properties of undefined (reading 'type')). This broke the "Build from tarball" CI job. Destructure the binding's exports into bare identifiers instead, matching the pattern already used in lib/crypto.js for its deprecated Hash/Hmac exports. Also fill in the DEP0210 changes entry's pr-url, now that the pull request exists. Assisted-by: claude-code:claude-sonnet-5 Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
araujogui
commented
Sep 11, 2026
| module.exports = { | ||
| Database, | ||
| DatabaseSync: deprecate( | ||
| Database, |
Member
Author
There was a problem hiding this comment.
I introduced a runtime deprecation of DatabaseSync but don't know if that's correct given that node:sqlite isn't stable yet.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65988 +/- ##
==========================================
- Coverage 90.18% 89.98% -0.21%
==========================================
Files 771 784 +13
Lines 265487 268372 +2885
Branches 50461 51122 +661
==========================================
+ Hits 239437 241496 +2059
- Misses 17006 17426 +420
- Partials 9044 9450 +406
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename the
DatabaseSyncclass toDatabase, and the internalDatabaseSyncLimitshelper toDatabaseLimitsto match.See #57445 (comment)