sqlite: rename DatabaseSync to Database - #65988
Conversation
|
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>
d90b1f9 to
b52ec3e
Compare
|
I didn't review the code fully, but does this leave an alias behind? If not, this will break every single current user. |
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>
| module.exports = { | ||
| Database, | ||
| DatabaseSync: deprecate( | ||
| Database, |
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:
|
|
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
Rename the
DatabaseSyncclass toDatabase, and the internalDatabaseSyncLimitshelper toDatabaseLimitsto match.See #57445 (comment)