Merge upstream (gh/WiseLibs/better-sqlite3) changes#42
Merged
Conversation
Co-authored-by: m4heshd <6711514+m4heshd@users.noreply.github.com>
Add SQLITE_ENABLE_PERCENTILE compile-time option
Co-authored-by: m4heshd <6711514+m4heshd@users.noreply.github.com>
* Add support for Node.js v26 prebuilds * Update `mocha` to the latest version * Add Node v26 to supported engines
Temporarily rollback support for electron v42 prebuilds Avoid building for electron v42 till the updated V8 API errors are sorted out.
Sync with upstream WiseLibs/better-sqlite3 while preserving this fork's
intentional divergences. All conflicts resolved in favor of our fork,
except we adopt upstream's SQLITE_ENABLE_PERCENTILE flag and Node 26 CI
support.
Kept ours (rejected upstream changes):
- deps/sqlite3/{sqlite3.c,sqlite3.h,sqlite3ext.h}: stay on our
begin-concurrent checkin 0e862bc9ed7aa9ae (SQLite 3.51.0); do NOT take
upstream's SQLite 3.53.1. sqlite3ext.h restored to ours so the bundled
amalgamation remains a coherent 3.51.0 set -- upstream auto-merged
3.52.0 api routines (str_truncate/carray_bind/...) that our sqlite3.c
does not implement.
- deps/download.sh: keep CHECKIN-based source fetch, not VERSION release.
- .github/workflows/build.yml: keep our reworked CI (electron prebuilds
dropped, native ARM runners); still drop upstream's electron v42 change.
- package.json: keep @rocicorp/zero-sqlite3 1.1.1, our engines and deps.
Adopted from upstream:
- SQLITE_ENABLE_PERCENTILE (#1447): percentile()/median() aggregates.
Already bundled in our amalgamation behind the ifdef, so this is a pure
flag flip -- no rebuild. Added to defines.gypi (auto-merged),
download.sh, and compilation.md to keep them consistent.
- Node.js v26 support (#1468), adapted to our CI: added -t 26.0.0 to the
MODERN prebuild command and 26 to the test matrix (GCC-11/bookworm path
via the existing matrix.node >= 25 conditional). engines stays LTS-only
(22.x||24.x), consistent with how we already treat node 25.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mocha 10 bundles yargs 16, whose extensionless `yargs/yargs` entry calls
require() and crashes under Node 26's module resolution ("ReferenceError:
require is not defined in ES module scope"), failing every Node 26 CI job
at `npm test` before any test runs. mocha 11 ships yargs 17, which works.
This is the devDep bump upstream paired with its Node 26 support; we'd
declined it during the merge.
Verified locally: Node 26.2.0 -> 338 passing; Node 24.4.1 -> 337 passing,
1 pending (no regression). Test-only change; shipped package unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Node 26's bundled gyp config feeds Clang/LLD ThinLTO flags (-flto=thin, /opt:lldltojobs=2) into the addon's MSVC link step, which link.exe rejects with LNK1117. Our build defines no LTO flags and Node <=25 builds fine on Windows, so this is an upstream Node 26 + MSVC toolchain issue (it also breaks Windows+Node26 source installs, independent of this repo) and isn't reproducible off-Windows. Exclude windows-2022 + Node 26 from the test matrix so CI is green; Node 26 stays fully tested on macOS and Linux. The release-only Windows prebuild job still lists Node 26 via NODE_BUILD_CMD_MODERN and will need the same exclusion before the next release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.