Unverified Commit 1e273583 by Kewde

Merge remote-tracking branch 'refs/remotes/mapbox/master'

Conflicts:
	.travis.yml
	appveyor.yml
parents 5a79cad5 e06c977b
...@@ -20,3 +20,8 @@ test/tmp ...@@ -20,3 +20,8 @@ test/tmp
test/nw/app.nw test/nw/app.nw
.DS_Store .DS_Store
.idea .idea
.dtps
local.env
.mason
.eslintrc.js
setup.sh
\ No newline at end of file
...@@ -10,3 +10,8 @@ Makefile ...@@ -10,3 +10,8 @@ Makefile
scripts scripts
.travis.yml .travis.yml
examples examples
.dtps
local.env
.mason
.eslintrc.js
setup.sh
...@@ -2,6 +2,8 @@ sudo: false ...@@ -2,6 +2,8 @@ sudo: false
language: generic language: generic
dist: precise
git: git:
depth: 10 depth: 10
...@@ -13,53 +15,47 @@ addons: ...@@ -13,53 +15,47 @@ addons:
packages: packages:
- clang-3.5 - clang-3.5
# don't re-build for tags so that [publish binary] is not re-run
# https://github.com/travis-ci/travis-ci/issues/1532
branches:
except:
- /^v[0-9]/
matrix: matrix:
include: include:
# Linux # Linux
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="7" env: NODE_VERSION="9"
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5'] packages: [ 'clang-3.5']
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="6" env: NODE_VERSION="8"
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5'] packages: [ 'clang-3.5']
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="5" env: NODE_VERSION="7"
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5'] packages: [ 'clang-3.5']
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="4" env: NODE_VERSION="6"
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5'] packages: [ 'clang-3.5']
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="0.12" env: NODE_VERSION="5"
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5'] packages: [ 'clang-3.5']
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="0.10" env: NODE_VERSION="4"
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
...@@ -67,7 +63,7 @@ matrix: ...@@ -67,7 +63,7 @@ matrix:
# test building against external sqlite # test building against external sqlite
- os: linux - os: linux
compiler: clang compiler: clang
env: NODE_VERSION="0.10" EXTERNAL_SQLITE=true PUBLISHABLE=false env: NODE_VERSION="8" EXTERNAL_SQLITE=true PUBLISHABLE=false
addons: addons:
apt: apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ] sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
...@@ -78,22 +74,22 @@ matrix: ...@@ -78,22 +74,22 @@ matrix:
env: NODE_VERSION="5" COVERAGE=true PUBLISHABLE=false # node abi 47 env: NODE_VERSION="5" COVERAGE=true PUBLISHABLE=false # node abi 47
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="7" # node abi 51 env: NODE_VERSION="9" # node abi 58
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="6" # node abi 48 env: NODE_VERSION="8" # node abi 57
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="5" # node abi 47 env: NODE_VERSION="7" # node abi 51
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="4" # node abi 46 env: NODE_VERSION="6" # node abi 48
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="0.12" # node abi 14 env: NODE_VERSION="5" # node abi 47
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="0.10" # node abi 11 env: NODE_VERSION="4" # node abi 46
# electron Linux # electron Linux
- os: linux - os: linux
compiler: clang compiler: clang
......
# Changelog # Changelog
## 4.0.0
- Drop support for Node v0.10 and v.12
- Upgrade to node-pre-gyp@0.9.0
- Upgrade to nan@2.9.2
## 3.1.13
- Attempt to fix regression of #866
## 3.1.12
- Fixed to ensure the binaries do not rely on `GLIBC_2.14` and only `GLIBC_2.2.5`. This regressed in v3.1.11.
## 3.1.11
- Fixed building from source on alpine linux
## 3.1.10
- Removed `npm ls` from `prepublish` hook per mapbox/node-pre-gyp#291
- Upgraded node-pre-gyp to v0.6.37
- Removed accidentally committed large file
## 3.1.9
- Added support for node v8 and upgraded `nan`, `node-pre-gyp` deps.
## 3.1.8 ## 3.1.8
- Added support for node v7 (pre-compiled binaries available) - Added support for node v7 (pre-compiled binaries available)
......
...@@ -51,7 +51,7 @@ Note: NEVER republish binaries for an existing released version. ...@@ -51,7 +51,7 @@ Note: NEVER republish binaries for an existing released version.
An official release requires: An official release requires:
- Updating the CHANGELOG.md - Updating the CHANGELOG.md
- Create and push github tag like `git tag v3.1.1` -m "v3.1.1" && git push --tags` - Create and push github tag like `git tag v3.1.1 -m "v3.1.1" && git push --tags`
- Ensure you have a clean checkout (no extra files in your check that are not known by git). You need to be careful, for instance, to avoid a large accidental file being packaged by npm. You can get a view of what npm will publish by running `make testpack` - Ensure you have a clean checkout (no extra files in your check that are not known by git). You need to be careful, for instance, to avoid a large accidental file being packaged by npm. You can get a view of what npm will publish by running `make testpack`
- Fully rebuild and ensure install from binary works: `make clean && npm install --fallback-to-build=false` - Fully rebuild and ensure install from binary works: `make clean && npm install --fallback-to-build=false`
- Then publish the module to npm repositories by running `npm publish` - Then publish the module to npm repositories by running `npm publish`
...@@ -33,13 +33,8 @@ rebuild: ...@@ -33,13 +33,8 @@ rebuild:
@make clean @make clean
@make @make
ifndef only
test: test:
@PATH="./node_modules/mocha/bin:${PATH}" && NODE_PATH="./lib:$(NODE_PATH)" mocha -R spec npm test
else
test:
@PATH="./node_modules/mocha/bin:${PATH}" && NODE_PATH="./lib:$(NODE_PATH)" mocha -R spec test/${only}.test.js
endif
check: test check: test
......
...@@ -9,7 +9,7 @@ Asynchronous, non-blocking [SQLite3](http://sqlite.org/) bindings for [Node.js]( ...@@ -9,7 +9,7 @@ Asynchronous, non-blocking [SQLite3](http://sqlite.org/) bindings for [Node.js](
## Supported platforms ## Supported platforms
The `sqlite3` module works with Node.js v0.10.x, v0.12.x, v4.x, v5.x, v6.x and v7.x. The `sqlite3` module works with Node.js v4.x, v5.x, v6.x and v7.x.
Binaries for most Node versions and platforms are provided by default via [node-pre-gyp](https://github.com/mapbox/node-pre-gyp). Binaries for most Node versions and platforms are provided by default via [node-pre-gyp](https://github.com/mapbox/node-pre-gyp).
...@@ -156,6 +156,16 @@ Set the location where `make` installed it: ...@@ -156,6 +156,16 @@ Set the location where `make` installed it:
node -e 'require("sqlite3")' node -e 'require("sqlite3")'
### Custom builds and Electron
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
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
# Testing # Testing
[mocha](https://github.com/visionmedia/mocha) is required to run unit tests. [mocha](https://github.com/visionmedia/mocha) is required to run unit tests.
......
...@@ -4,59 +4,30 @@ environment: ...@@ -4,59 +4,30 @@ environment:
node_pre_gyp_secretAccessKey: node_pre_gyp_secretAccessKey:
secure: 1amwJJw9fu0j6dXnc5KsAQbSYf7Cjw/dapT6OZWABa6nc52grkKeLQ+DGaOfQz8i secure: 1amwJJw9fu0j6dXnc5KsAQbSYf7Cjw/dapT6OZWABa6nc52grkKeLQ+DGaOfQz8i
matrix: matrix:
- nodejs_version: 0.10
platform: x86
msvs_toolset: 12
- nodejs_version: 0.10
platform: x64
msvs_toolset: 12
- nodejs_version: 0.12
platform: x86
msvs_toolset: 12
- nodejs_version: 0.12
platform: x64
msvs_toolset: 12
- nodejs_version: 4 - nodejs_version: 4
platform: x64 platform: x64
msvs_toolset: 12
- nodejs_version: 4 - nodejs_version: 4
platform: x86 platform: x86
msvs_toolset: 12
- nodejs_version: 5 - nodejs_version: 5
platform: x64 platform: x64
msvs_toolset: 12
- nodejs_version: 5 - nodejs_version: 5
platform: x86 platform: x86
msvs_toolset: 12
- nodejs_version: 6 - nodejs_version: 6
platform: x64 platform: x64
msvs_toolset: 12
- nodejs_version: 6 - nodejs_version: 6
platform: x86 platform: x86
msvs_toolset: 12
- nodejs_version: 7 - nodejs_version: 7
platform: x64 platform: x64
msvs_toolset: 12
- nodejs_version: 7 - nodejs_version: 7
platform: x86 platform: x86
msvs_toolset: 12 - nodejs_version: 8
# custom visual studio 2015 builds
- nodejs_version: 0.10.40
platform: x86
msvs_toolset: 14
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
- nodejs_version: 0.10.40
platform: x64 platform: x64
msvs_toolset: 14 - nodejs_version: 8
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
- nodejs_version: 0.12.7
platform: x86 platform: x86
msvs_toolset: 14 - nodejs_version: 9
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140
- nodejs_version: 0.12.7
platform: x64 platform: x64
msvs_toolset: 14 - nodejs_version: 9
TOOLSET_ARGS: --dist-url=https://s3.amazonaws.com/mapbox/node-cpp11 --toolset=v140 platform: x86
# electron # electron
- nodejs_version: 6 - nodejs_version: 6
platform: x64 platform: x64
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
} }
] ]
], ],
"cflags": [ "-include ../src/gcc-preinclude.h" ],
"sources": [ "sources": [
"src/database.cc", "src/database.cc",
"src/node_sqlite3.cc", "src/node_sqlite3.cc",
......
...@@ -71,7 +71,6 @@ ...@@ -71,7 +71,6 @@
'dependencies': [ 'dependencies': [
'action_before_build' 'action_before_build'
], ],
'cflags': [ '-include ../src/gcc-preinclude.h' ],
'sources': [ 'sources': [
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c' '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
], ],
...@@ -87,8 +86,7 @@ ...@@ -87,8 +86,7 @@
], ],
}, },
'cflags_cc': [ 'cflags_cc': [
'-Wno-unused-value', '-Wno-unused-value'
'-include ../src/gcc-preinclude.h'
], ],
'defines': [ 'defines': [
'_REENTRANT=1', '_REENTRANT=1',
......
{ {
"name": "sqlite3", "name": "sqlite3",
"description": "Asynchronous, non-blocking SQLite3 bindings", "description": "Asynchronous, non-blocking SQLite3 bindings",
"version": "3.1.8", "version": "4.0.0",
"homepage": "http://github.com/mapbox/node-sqlite3", "homepage": "http://github.com/mapbox/node-sqlite3",
"author": { "author": {
"name": "MapBox", "name": "MapBox",
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
"url": "git://github.com/mapbox/node-sqlite3.git" "url": "git://github.com/mapbox/node-sqlite3.git"
}, },
"dependencies": { "dependencies": {
"nan": "~2.4.0", "nan": "~2.9.2",
"node-pre-gyp": "~0.6.32" "node-pre-gyp": "~0.9.0"
}, },
"bundledDependencies": [ "bundledDependencies": [
"node-pre-gyp" "node-pre-gyp"
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"mocha": "3.x" "mocha": "3.x"
}, },
"scripts": { "scripts": {
"prepublish": "npm ls", "prepublishOnly": "npm ls",
"install": "node-pre-gyp install --fallback-to-build", "install": "node-pre-gyp install --fallback-to-build",
"pretest": "node test/support/createdb.js", "pretest": "node test/support/createdb.js",
"test": "mocha -R spec --timeout 480000" "test": "mocha -R spec --timeout 480000"
......
...@@ -4,12 +4,17 @@ SET EL=0 ...@@ -4,12 +4,17 @@ SET EL=0
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 12 && SET msvs_toolset=12
SET NODE_MAJOR=%nodejs_version:~0,1%
IF %NODE_MAJOR% GTR 4 ECHO detected node v5, forcing msvs_toolset 14 && SET msvs_toolset=14
SET PATH=%CD%;%PATH% SET PATH=%CD%;%PATH%
SET msvs_version=2013 SET msvs_version=2013
IF "%msvs_toolset%"=="14" SET msvs_version=2015 IF "%msvs_toolset%"=="14" SET msvs_version=2015
IF NOT "%NODE_RUNTIME%"=="" SET "TOOLSET_ARGS=%TOOLSET_ARGS% --runtime=%NODE_RUNTIME%" IF NOT "%NODE_RUNTIME%"=="" SET "TOOLSET_ARGS=%TOOLSET_ARGS% --runtime=%NODE_RUNTIME%"
IF NOT "%NODE_RUNTIME_VERSION%"=="" SET "TOOLSET_ARGS=%TOOLSET_ARGS% --target=%NODE_RUNTIME_VERSION%" IF NOT "%NODE_RUNTIME_VERSION%"=="" SET "TOOLSET_ARGS=%TOOLSET_ARGS% --target=%NODE_RUNTIME_VERSION%"
ECHO APPVEYOR^: %APPVEYOR% ECHO APPVEYOR^: %APPVEYOR%
ECHO nodejs_version^: %nodejs_version% ECHO nodejs_version^: %nodejs_version%
ECHO platform^: %platform% ECHO platform^: %platform%
...@@ -44,22 +49,15 @@ IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x6 ...@@ -44,22 +49,15 @@ IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x6
IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86 IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET NODE_MAJOR=%nodejs_version:~0,1%
ECHO node major version^: %NODE_MAJOR% ECHO node major version^: %NODE_MAJOR%
IF %NODE_MAJOR% GTR 0 ECHO node version greater than zero, not updating npm && GOTO SKIP_APPVEYOR_INSTALL IF %NODE_MAJOR% GTR 0 ECHO node version greater than zero, not updating npm && GOTO SKIP_APPVEYOR_INSTALL
powershell Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force powershell Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CALL npm install --global --production npm-windows-upgrade
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
REM https://ci.appveyor.com/project/Mapbox/node-sqlite3/build/1.0.500/job/n2y9fo4eg316db56#L289
REM error C2373: '__pfnDliNotifyHook2': redefinition; different type modifiers
REM at least 2.15.9 is needed: https://github.com/nodejs/node-gyp/issues/972#issuecomment-231055109
CALL npm-windows-upgrade --npm-version 2.15.9 --no-dns-check --no-prompt
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
:SKIP_APPVEYOR_INSTALL :SKIP_APPVEYOR_INSTALL
IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED
IF %NODE_MAJOR% GTR 4 GOTO NODE_INSTALLED
::custom node for VS2015 ::custom node for VS2015
...@@ -119,8 +117,11 @@ IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SE ...@@ -119,8 +117,11 @@ IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SE
ECHO ===== where npm puts stuff END ============ ECHO ===== where npm puts stuff END ============
ECHO installing node-gyp IF "%nodejs_version:~0,1%"=="0" CALL npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
CALL npm install -g node-gyp IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="4" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="5" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
......
...@@ -10,9 +10,9 @@ NPM_BIN_DIR="$(npm bin -g 2>/dev/null)" ...@@ -10,9 +10,9 @@ NPM_BIN_DIR="$(npm bin -g 2>/dev/null)"
function publish() { function publish() {
if [[ ${PUBLISHABLE:-false} == true ]] && [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then if [[ ${PUBLISHABLE:-false} == true ]] && [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then
node-pre-gyp package node-pre-gyp package $GYP_ARGS
node-pre-gyp publish node-pre-gyp publish $GYP_ARGS
node-pre-gyp info node-pre-gyp info $GYP_ARGS
fi fi
} }
......
...@@ -19,7 +19,10 @@ if [[ ${COVERAGE} == true ]]; then ...@@ -19,7 +19,10 @@ if [[ ${COVERAGE} == true ]]; then
npm test npm test
./py-local/bin/cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude docs --exclude build/Release/obj/gen --exclude deps > /dev/null ./py-local/bin/cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude docs --exclude build/Release/obj/gen --exclude deps > /dev/null
else else
npm install --build-from-source --clang=1 echo "building binaries for publishing"
CFLAGS="${CFLAGS:-} -include $(pwd)/src/gcc-preinclude.h" CXXFLAGS="${CXXFLAGS:-} -include $(pwd)/src/gcc-preinclude.h" V=1 npm install --build-from-source --clang=1
nm lib/binding/*/node_sqlite3.node | grep "GLIBCXX_" | c++filt || true
nm lib/binding/*/node_sqlite3.node | grep "GLIBC_" | c++filt || true
npm test npm test
fi fi
...@@ -27,6 +30,7 @@ fi ...@@ -27,6 +30,7 @@ fi
publish publish
# now test building against shared sqlite # now test building against shared sqlite
echo "building from source to test against external libsqlite3"
export NODE_SQLITE3_JSON1=no export NODE_SQLITE3_JSON1=no
if [[ $(uname -s) == 'Darwin' ]]; then if [[ $(uname -s) == 'Darwin' ]]; then
brew install sqlite brew install sqlite
......
...@@ -130,8 +130,8 @@ NAN_METHOD(Database::New) { ...@@ -130,8 +130,8 @@ NAN_METHOD(Database::New) {
Database* db = new Database(); Database* db = new Database();
db->Wrap(info.This()); db->Wrap(info.This());
info.This()->ForceSet(Nan::New("filename").ToLocalChecked(), info[0].As<String>(), ReadOnly); Nan::ForceSet(info.This(), Nan::New("filename").ToLocalChecked(), info[0].As<String>(), ReadOnly);
info.This()->ForceSet(Nan::New("mode").ToLocalChecked(), Nan::New(mode), ReadOnly); Nan::ForceSet(info.This(), Nan::New("mode").ToLocalChecked(), Nan::New(mode), ReadOnly);
// Start opening the database. // Start opening the database.
OpenBaton* baton = new OpenBaton(db, callback, *filename, mode); OpenBaton* baton = new OpenBaton(db, callback, *filename, mode);
......
// https://rjpower9000.wordpress.com/2012/04/09/fun-with-shared-libraries-version-glibc_2-14-not-found/ // http://web.archive.org/web/20140401031018/http://rjpower9000.wordpress.com:80/2012/04/09/fun-with-shared-libraries-version-glibc_2-14-not-found/
#if defined(__linux__) && defined(__x86_64__) #if defined(__linux__) && defined(__x86_64__)
__asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); __asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
......
...@@ -100,7 +100,7 @@ NAN_METHOD(Statement::New) { ...@@ -100,7 +100,7 @@ NAN_METHOD(Statement::New) {
Database* db = Nan::ObjectWrap::Unwrap<Database>(info[0].As<Object>()); Database* db = Nan::ObjectWrap::Unwrap<Database>(info[0].As<Object>());
Local<String> sql = Local<String>::Cast(info[1]); Local<String> sql = Local<String>::Cast(info[1]);
info.This()->ForceSet(Nan::New("sql").ToLocalChecked(), sql, ReadOnly); Nan::ForceSet(info.This(),Nan::New("sql").ToLocalChecked(), sql, ReadOnly);
Statement* stmt = new Statement(db); Statement* stmt = new Statement(db);
stmt->Wrap(info.This()); stmt->Wrap(info.This());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment