Skip to content

Commit

Permalink
Merge branch 'master' into sqlite3_update_hook
Browse files Browse the repository at this point in the history
  • Loading branch information
kewde committed Jan 8, 2021
2 parents 175f73b + 2aae3a5 commit 18b9ba0
Show file tree
Hide file tree
Showing 29 changed files with 1,289 additions and 1,219 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -24,4 +24,6 @@ test/nw/app.nw
local.env
.mason
.eslintrc.js
setup.sh
setup.sh
/build-tmp-napi-v3
/build-tmp-napi-v6
181 changes: 31 additions & 150 deletions .travis.yml
Expand Up @@ -21,84 +21,45 @@ matrix:
- os: linux
dist: trusty
compiler: clang
env: NODE_VERSION="13"
env: NODE_VERSION="14"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
dist: trusty
compiler: clang
env: NODE_VERSION="12"
env: NODE_VERSION="13"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
dist: trusty
compiler: clang
env: NODE_VERSION="11"
env: NODE_VERSION="12"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="10"
env: NODE_VERSION="11"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="9"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="8"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="7"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="6"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="5"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="4"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
# test building against external sqlite
- os: linux
compiler: clang
env: NODE_VERSION="8" EXTERNAL_SQLITE=true PUBLISHABLE=false
env: NODE_VERSION="10"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5','libsqlite3-dev']
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
# OS X
- os: osx
compiler: clang
env: NODE_VERSION="14" # node abi 83
- os: osx
compiler: clang
env: NODE_VERSION="13" # node abi 79
Expand All @@ -110,177 +71,97 @@ matrix:
env: NODE_VERSION="11" # node abi 67
- os: osx
compiler: clang
env: NODE_VERSION="10" # node abi 64
- os: osx
compiler: clang
env: NODE_VERSION="9" # node abi 59
- os: osx
compiler: clang
env: NODE_VERSION="8" # node abi 57
- os: osx
compiler: clang
env: NODE_VERSION="7" # node abi 51
- os: osx
compiler: clang
env: NODE_VERSION="6" # node abi 48
- os: osx
compiler: clang
env: NODE_VERSION="5" # node abi 47
- os: osx
compiler: clang
env: NODE_VERSION="4" # node abi 46
env: NODE_VERSION="10" # node abi 67
# electron Linux
- os: linux
compiler: clang
env: NODE_VERSION="8" ELECTRON_VERSION="7.1.0"
env: NODE_VERSION="12.13.0" ELECTRON_VERSION="8.2.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="8" ELECTRON_VERSION="7.0.0"
env: NODE_VERSION="12.13.0" ELECTRON_VERSION="8.1.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="6.1.0"
env: NODE_VERSION="12.13.0" ELECTRON_VERSION="8.0.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="6.0.0"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="5.0.0"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
env: NODE_VERSION="12.8.1" ELECTRON_VERSION="7.2.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="4.2.0"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
env: NODE_VERSION="12.8.1" ELECTRON_VERSION="7.1.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="4.1.0"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
env: NODE_VERSION="12.8.1" ELECTRON_VERSION="7.0.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="4.0.0"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
env: NODE_VERSION="12.4.0" ELECTRON_VERSION="6.1.0"
dist: trusty
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="3.0.6"
env: NODE_VERSION="12.4.0" ELECTRON_VERSION="6.0.0"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="2.0.1"
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5', 'libc6']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.8.4"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.7.12"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.6.2"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.3.14"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
# electron MacOs
- os: osx
compiler: clang
env: NODE_VERSION="8" ELECTRON_VERSION="7.1.0"
- os: osx
compiler: clang
env: NODE_VERSION="8" ELECTRON_VERSION="7.0.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="6.1.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="6.0.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="5.0.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="4.2.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="4.1.0"
env: NODE_VERSION="12.13.0" ELECTRON_VERSION="8.2.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="4.0.0"
env: NODE_VERSION="12.13.0" ELECTRON_VERSION="8.1.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="3.0.6"
env: NODE_VERSION="12.13.0" ELECTRON_VERSION="8.0.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="2.0.1"
env: NODE_VERSION="12.8.1" ELECTRON_VERSION="7.2.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.8.4"
env: NODE_VERSION="12.8.1" ELECTRON_VERSION="7.1.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.7.12"
env: NODE_VERSION="12.8.1" ELECTRON_VERSION="7.0.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.6.2"
env: NODE_VERSION="12.4.0" ELECTRON_VERSION="6.1.0"
- os: osx
compiler: clang
env: NODE_VERSION="6" ELECTRON_VERSION="1.3.14"
env: NODE_VERSION="12.4.0" ELECTRON_VERSION="6.0.0"

env:
global:
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,31 @@
# Changelog

## 5.0.1
- dep: node-addon-api to ^3.0.0 [#1367](https://github.com/mapbox/node-sqlite3/pull/1367)
- bug: bad comparison of c string [#1347](https://github.com/mapbox/node-sqlite3/pull/1347)
- build: Install files to be deployed [#1352](https://github.com/mapbox/node-sqlite3/pull/1352)
- sqlite3: upgrade to 3.32.3 [#1351](https://github.com/mapbox/node-sqlite3/pull/1351)
- bug: worker threads crash [#1367](https://github.com/mapbox/node-sqlite3/pull/1367)
- bug: segfaults [#1368](https://github.com/mapbox/node-sqlite3/pull/1368)
- typo: broken link to MapBox site [#1369](https://github.com/mapbox/node-sqlite3/pull/1369)

## 5.0.0
- prebuilt: Node 14 support, dropped support for all version of Node < 10 [#1304](https://github.com/mapbox/node-sqlite3/pull/1304)
- prebuilt: add electron 7.2 [#1324](https://github.com/mapbox/node-sqlite3/pull/1324)
- napi: refactor codebase to use N-API instead of NAN (+ various improvements) [#1304](https://github.com/mapbox/node-sqlite3/pull/1304)
- trace: don't require throw to add trace info for verbose [#1317](https://github.com/mapbox/node-sqlite3/pull/1317)
- ci: remove permission setting [#1319](https://github.com/mapbox/node-sqlite3/pull/1319)

## 4.2.0
- electron: Electron v8, v8.1.x & v8.2.x [#1294](https://github.com/mapbox/node-sqlite3/pull/1294) [#1308](https://github.com/mapbox/node-sqlite3/pull/1308)
- sqlite3: update to 3.31.1 (3310100) [#1289](https://github.com/mapbox/node-sqlite3/pull/1289)
- webpack: split sqlite3-binding.js out so that it could be override by webpack [#1268](https://github.com/mapbox/node-sqlite3/pull/1268)
- sqlite3: enable 'SQLITE_ENABLE_DBSTAT_VTAB=1' [#1281](https://github.com/mapbox/node-sqlite3/pull/1281)
- deps: remove request [#1287](https://github.com/mapbox/node-sqlite3/pull/1287)
- deps: alternative update of node-gyp for electron (v1 - v4), windows [#1283](https://github.com/mapbox/node-sqlite3/pull/1283)
- electron: fix dist url [#1282](https://github.com/mapbox/node-sqlite3/pull/1282)
- docs: Added json1 support note [#1303](https://github.com/mapbox/node-sqlite3/pull/1303)

## 4.1.1
- Electron v6.1 and v7 support [#1237](https://github.com/mapbox/node-sqlite3/pull/1237)
- Electron v7.1 support [#1254](https://github.com/mapbox/node-sqlite3/pull/1254)
Expand Down
8 changes: 8 additions & 0 deletions Dockerfile
Expand Up @@ -74,3 +74,11 @@ RUN echo "#log: ${project}: Building sources" \
&& find build/stage/ -type f \
&& sync

WORKDIR /usr/local/${project}/${project}
RUN echo "#log: ${project}: Installing sources" \
&& set -x \
&& install -d /usr/local/src/${project}/deploy/ \
&& install *.tgz /usr/local/src/${project}/deploy/ \
&& cp -rfva ./build/stage/ /usr/local/src/${project}/deploy/ \
&& find /usr/local/src/${project}/deploy/ -type f \
&& sync
15 changes: 9 additions & 6 deletions README.md
Expand Up @@ -7,10 +7,13 @@ Asynchronous, non-blocking [SQLite3](https://sqlite.org/) bindings for [Node.js]
[![Coverage Status](https://coveralls.io/repos/mapbox/node-sqlite3/badge.svg?branch=master&service=github)](https://coveralls.io/github/mapbox/node-sqlite3?branch=master)
[![Dependencies](https://david-dm.org/mapbox/node-sqlite3.svg)](https://david-dm.org/mapbox/node-sqlite3)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fnode-sqlite3.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmapbox%2Fnode-sqlite3?ref=badge_shield)
[![N-API v3 Badge](https://img.shields.io/badge/N--API-v3-green.svg)](https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api)

## Supported platforms

The `sqlite3` module works with Node.js v4.x, v6.x, v8.x, v10.x, v11.x and v12.x.
The `sqlite3` module works with:
* Node.js v11.x, v12.x, v13.x and v14.x.
* Electron v6.0.x, v6.1.x, v7.0.x, v7.1.x, v8.0.x, v8.1.x and v8.2.x

Binaries for most Node versions and platforms are provided by default via [node-pre-gyp](https://github.com/mapbox/node-pre-gyp).

Expand Down Expand Up @@ -49,10 +52,10 @@ db.close();
- Full Buffer/Blob support
- Extensive [debugging support](https://github.com/mapbox/node-sqlite3/wiki/Debugging)
- [Query serialization](https://github.com/mapbox/node-sqlite3/wiki/Control-Flow) API
- [Extension support](https://github.com/mapbox/node-sqlite3/wiki/Extensions)
- [Extension support](https://github.com/mapbox/node-sqlite3/wiki/Extensions), including bundled support for the [json1 extension](https://www.sqlite.org/json1.html).
- Big test suite
- Written in modern C++ and tested for memory leaks
- Bundles Sqlite3 3.26.0 as a fallback if the installing system doesn't include SQLite
- Bundles SQLite3 3.32.3 as a fallback if the installing system doesn't include SQLite

# API

Expand Down Expand Up @@ -181,11 +184,11 @@ Set the location where `make` installed it:

Running sqlite3 through [electron-rebuild](https://github.com/electron/electron-rebuild) does not preserve the sqlcipher extension, so some additional flags are needed to make this build Electron compatible. Your `npm install sqlite3 --build-from-source` command needs these additional flags (be sure to replace the target version with the current Electron version you are working with):

--runtime=electron --target=1.7.6 --dist-url=https://atom.io/download/electron
--runtime=electron --target=1.7.6 --dist-url=https://electronjs.org/headers

In the case of MacOS with Homebrew, the command should look like the following:

npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=`brew --prefix` --runtime=electron --target=1.7.6 --dist-url=https://atom.io/download/electron
npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=`brew --prefix` --runtime=electron --target=1.7.6 --dist-url=https://electronjs.org/headers

# Testing

Expand Down Expand Up @@ -218,7 +221,7 @@ Thanks to [Orlando Vazquez](https://github.com/orlandov),
[Eric Fredricksen](https://github.com/grumdrig) and
[Ryan Dahl](https://github.com/ry) for their SQLite bindings for node, and to mraleph on Freenode's #v8 for answering questions.

Development of this module is sponsored by [MapBox](https://mapbox.org/).
Development of this module is sponsored by [MapBox](https://mapbox.com/).

# License

Expand Down

0 comments on commit 18b9ba0

Please sign in to comment.