Skip to content

Commit 7691d99

Browse files
authored
Merge pull request TryGhost#3 from gristlabs/marshalling_merge
merge from upstream to add backup api
2 parents fd7db7d + 5173480 commit 7691d99

26 files changed

+1234
-29
lines changed

.dockerignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#.dockerignore
2+
*~
3+
Dockerfile
4+
.git/
5+
6+
#.gitignore
7+
*.dylib
8+
*.so
9+
*.o
10+
*.lo
11+
*.Makefile
12+
*.target.gyp.mk
13+
lib/binding
14+
build
15+
out
16+
Release
17+
Debug
18+
node_modules
19+
.deps
20+
Makefile.gyp
21+
gyp-mac-tool
22+
.dirstamp
23+
npm-debug.log
24+
test/support/big.db
25+
test/tmp
26+
test/nw/app.nw
27+
.DS_Store
28+
.idea
29+
.dtps
30+
local.env
31+
.mason
32+
.eslintrc.js
33+
setup.sh

.travis.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ addons:
1818
matrix:
1919
include:
2020
# Linux
21+
- os: linux
22+
compiler: clang
23+
env: NODE_VERSION="11"
24+
addons:
25+
apt:
26+
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
27+
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
2128
- os: linux
2229
compiler: clang
2330
env: NODE_VERSION="10"
@@ -76,6 +83,9 @@ matrix:
7683
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
7784
packages: [ 'clang-3.5','libsqlite3-dev']
7885
# OS X
86+
- os: osx
87+
compiler: clang
88+
env: NODE_VERSION="11" # node abi 67
7989
- os: osx
8090
compiler: clang
8191
env: NODE_VERSION="10" # node abi 64
@@ -100,7 +110,15 @@ matrix:
100110
# electron Linux
101111
- os: linux
102112
compiler: clang
103-
env: NODE_VERSION="6" ELECTRON_VERSION="3.0.0-beta.1"
113+
env: NODE_VERSION="6" ELECTRON_VERSION="4.0.0"
114+
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
115+
addons:
116+
apt:
117+
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
118+
packages: [ 'clang-3.5', 'libstdc++-4.9-dev']
119+
- os: linux
120+
compiler: clang
121+
env: NODE_VERSION="6" ELECTRON_VERSION="3.0.6"
104122
dist: trusty # needed for libc6 / 'version `GLIBC_2.17` not found' error on precise
105123
addons:
106124
apt:
@@ -143,6 +161,12 @@ matrix:
143161
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
144162
packages: [ 'clang-3.5']
145163
# electron MacOs
164+
- os: osx
165+
compiler: clang
166+
env: NODE_VERSION="6" ELECTRON_VERSION="4.0.0"
167+
- os: osx
168+
compiler: clang
169+
env: NODE_VERSION="6" ELECTRON_VERSION="3.0.6"
146170
- os: osx
147171
compiler: clang
148172
env: NODE_VERSION="6" ELECTRON_VERSION="2.0.1"

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
4+
## 4.0.5
5+
- **SECURITY:** Upgrade SQLite to 3.26.0 [#1088](https://github.com/mapbox/node-sqlite3/pull/1088)
6+
- add constants for file open (shared databases) [#1078](https://github.com/mapbox/node-sqlite3/pull/1078)
7+
- Allow specifying the python to use [#1089](https://github.com/mapbox/node-sqlite3/pull/1089)
8+
9+
## 4.0.4
10+
- Add NodeJS 11 support [#1072](https://github.com/mapbox/node-sqlite3/pull/1072)
11+
- Add electron osx 3.0.0 support [#1071](https://github.com/mapbox/node-sqlite3/pull/1071)
12+
313
## 4.0.3
414

515
- Increase electron/osx binary coverage [#1041](https://github.com/mapbox/node-sqlite3/pull/1041) (@kewde)

Dockerfile

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/bin/echo docker build . -f
2+
# -*- coding: utf-8 -*-
3+
#{
4+
# ISC License
5+
# Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
6+
# Copyright (c) 1995-2003 by Internet Software Consortium
7+
# Permission to use, copy, modify, and /or distribute this software
8+
# for any purpose with or without fee is hereby granted,
9+
# provided that the above copyright notice
10+
# and this permission notice appear in all copies.
11+
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
12+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
13+
# OF MERCHANTABILITY AND FITNESS.
14+
# IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
15+
# OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
17+
# WHETHER IN AN ACTION OF CONTRACT,
18+
# NEGLIGENCE OR OTHER TORTIOUS ACTION,
19+
# ARISING OUT OF OR IN CONNECTION WITH THE USE
20+
# OR PERFORMANCE OF THIS SOFTWARE.
21+
#}
22+
23+
FROM ubuntu:latest
24+
MAINTAINER Philippe Coval ([email protected])
25+
26+
ENV DEBIAN_FRONTEND noninteractive
27+
ENV LC_ALL en_US.UTF-8
28+
ENV LANG ${LC_ALL}
29+
30+
RUN echo "#log: Configuring locales" \
31+
&& set -x \
32+
&& apt-get update -y \
33+
&& apt-get install -y locales \
34+
&& echo "${LC_ALL} UTF-8" | tee /etc/locale.gen \
35+
&& locale-gen ${LC_ALL} \
36+
&& dpkg-reconfigure locales \
37+
&& sync
38+
39+
ENV project node-sqlite3
40+
41+
RUN echo "#log: ${project}: Setup system" \
42+
&& set -x \
43+
&& apt-get update -y \
44+
&& apt-get install -y \
45+
curl \
46+
sudo \
47+
build-essential \
48+
python \
49+
&& apt-get clean \
50+
&& NVM_VERSION="v0.33.8" \
51+
&& NODE_VERSION="--lts=carbon" \
52+
&& curl -o- https://github.com/raw/creationix/nvm/${NVM_VERSION}/install.sh | bash \
53+
&& which nvm || . ~/.bashrc \
54+
&& nvm install ${NODE_VERSION} \
55+
&& nvm use ${NODE_VERSION} \
56+
&& sync
57+
58+
ADD . /usr/local/${project}/${project}
59+
WORKDIR /usr/local/${project}/${project}
60+
RUN echo "#log: ${project}: Preparing sources" \
61+
&& set -x \
62+
&& which npm || . ~/.bashrc \
63+
&& npm install || cat npm-debug.log \
64+
&& npm install \
65+
&& npm install --unsafe-perm --build-from-source \
66+
&& sync
67+
68+
WORKDIR /usr/local/${project}/${project}
69+
RUN echo "#log: ${project}: Building sources" \
70+
&& set -x \
71+
&& which npm || . ~/.bashrc \
72+
&& npm run pack \
73+
&& npm pack \
74+
&& find build/stage/ -type f \
75+
&& sync
76+

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ db.close();
5252
- [Extension support](https://github.com/mapbox/node-sqlite3/wiki/Extensions)
5353
- Big test suite
5454
- Written in modern C++ and tested for memory leaks
55-
- Bundles Sqlite3 3.15.0 as a fallback if the installing system doesn't include SQLite
55+
- Bundles Sqlite3 3.26.0 as a fallback if the installing system doesn't include SQLite
5656

5757
# API
5858

@@ -90,6 +90,15 @@ Note, if building against homebrew-installed sqlite on OS X you can do:
9090

9191
npm install --build-from-source --sqlite=/usr/local/opt/sqlite/
9292

93+
By default the node-gyp install will use `python` as part of the installation. A
94+
different python executable can be specified on the command line.
95+
96+
npm install --build-from-source --python=/usr/bin/python2
97+
98+
This uses the npm_config_python config, so values in .npmrc will be honoured:
99+
100+
python=/usr/bin/python2
101+
93102
## Building for node-webkit
94103

95104
Because of ABI differences, `sqlite3` must be built in a custom to be used with [node-webkit](https://github.com/rogerwang/node-webkit).

appveyor.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,30 @@ environment:
3030
platform: x64
3131
- nodejs_version: 10
3232
platform: x86
33+
- nodejs_version: 11
34+
platform: x64
35+
- nodejs_version: 11
36+
platform: x86
3337
# electron
3438
- nodejs_version: 10
3539
platform: x64
3640
NODE_RUNTIME: electron
37-
NODE_RUNTIME_VERSION: 3.0.0-beta.1
41+
NODE_RUNTIME_VERSION: 4.0.0
3842
TOOLSET_ARGS: --dist-url=https://atom.io/download/electron
3943
- nodejs_version: 10
4044
platform: x86
4145
NODE_RUNTIME: electron
42-
NODE_RUNTIME_VERSION: 3.0.0-beta.1
46+
NODE_RUNTIME_VERSION: 4.0.0
47+
TOOLSET_ARGS: --dist-url=https://atom.io/download/electron
48+
- nodejs_version: 10
49+
platform: x64
50+
NODE_RUNTIME: electron
51+
NODE_RUNTIME_VERSION: 3.0.6
52+
TOOLSET_ARGS: --dist-url=https://atom.io/download/electron
53+
- nodejs_version: 10
54+
platform: x86
55+
NODE_RUNTIME: electron
56+
NODE_RUNTIME_VERSION: 3.0.6
4357
TOOLSET_ARGS: --dist-url=https://atom.io/download/electron
4458
- nodejs_version: 8
4559
platform: x64
@@ -98,6 +112,7 @@ environment:
98112

99113
os: Visual Studio 2015
100114

115+
101116
install:
102117
- scripts\build-appveyor.bat
103118

binding.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
]
3333
],
3434
"sources": [
35+
"src/backup.cc",
3536
"src/database.cc",
3637
"src/marshal.cc",
3738
"src/node_sqlite3.cc",

deps/common-sqlite.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
'variables': {
3-
'sqlite_version%':'3240000',
3+
'sqlite_version%':'3260000',
44
"toolset%":'',
55
},
66
'target_defaults': {

deps/sqlite-autoconf-3240000.tar.gz

-2.57 MB
Binary file not shown.

deps/sqlite-autoconf-3260000.tar.gz

2.65 MB
Binary file not shown.

0 commit comments

Comments
 (0)