* support prebuild for electron v20
* Remove unsupported versions of Node and Electron
(see https://www.electronjs.org/docs/latest/tutorial/electron-timelines and https://github.com/nodejs/Release/#end-of-life-releases)
* enforce the use of node-gyp 8.4.1
builds for electron 20 fail with prebuild 11.0.4 internal node-gyp version 6.1.0
* conditional compile with CreationContext for NodeJs < 16
* use c++17 to fix Mac M1 and Linux x64 builds
* add c++17 flag for MSVC
Co-authored-by: Matthew McEachen <matthew@photostructure.com>
Add linker flags to
- prevent the dynamic linker from using an external SQLite for this
library (`-Bsymbolic`) and
- prevent the dynamic linker from using the internal SQLite for other
libraries (`--exclude-libs ALL`).
This is just a (conflict-free) cherry-pick of a Signal-specific fix in
https://github.com/signalapp/better-sqlite3/pull/3 that seems OK to
upstream further.
V8 has required C++14 since ~2017. It appears that changes in recent V8 versions (8.6+) have brought C++14 features into the parts of V8 that `better-sqlite3` builds against, causing native module compilation to fail. (I observed this when updating from Electron 10, which uses V8 8.5, to Electron 11, which uses V8 8.7.) Updating to the C++14 standard resolves this issue and gets `better-sqlite3` building again.
This adds prebuild support. When the library is released from GitHub a travis build will run which builds the library for Node 8, 10 and 12, and Electron 2 - 7
- Incorporated new modules into read-only query methods
- Rewrote pragma method
- Added limits to sqlite3 connections to prevent segfaults and data corruption