55---
66Asynchronous, non-blocking [ SQLite3] ( https://sqlite.org/ ) bindings for [ Node.js] ( http://nodejs.org/ ) .
77
8- [ ![ Latest release] ( https://img.shields.io/github/release/gms1/node-sqlite3.svg )] ( https://www.npmjs.com/package/sqlite3 )
8+ [ ![ Latest release] ( https://img.shields.io/github/release/gms1/node-sqlite3.svg )] ( https://www.npmjs.com/package/@homeofthings/ sqlite3 )
99![ Build Status] ( https://github.com/gms1/node-sqlite3/workflows/CI/badge.svg?branch=ma )
1010[ ![ 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 )
1111[ ![ 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 )
@@ -24,13 +24,13 @@ Asynchronous, non-blocking [SQLite3](https://sqlite.org/) bindings for [Node.js]
2424
2525# Installing
2626
27- You can use [ ` npm ` ] ( https://github.com/npm/cli ) or [ ` yarn ` ] ( https://github.com/yarnpkg/yarn ) to install ` sqlite3 ` :
27+ You can use [ ` npm ` ] ( https://github.com/npm/cli ) or [ ` yarn ` ] ( https://github.com/yarnpkg/yarn ) to install ` @homeofthings/ sqlite3` :
2828
2929* (recommended) Latest published package:
3030``` bash
31- npm install sqlite3
31+ npm install @homeofthings/ sqlite3
3232# or
33- yarn add sqlite3
33+ yarn add @homeofthings/ sqlite3
3434```
3535* GitHub's ` main ` branch: ` npm install https://github.com/gms1/node-sqlite3/tarball/main `
3636
@@ -71,7 +71,7 @@ See the [API documentation](https://github.com/gms1/node-sqlite3/wiki/API) in th
7171** Note:** the module must be [ installed] ( #installing ) before use.
7272
7373``` js
74- const sqlite3 = require (' sqlite3' ).verbose ();
74+ const sqlite3 = require (' @homeofthings/ sqlite3' ).verbose ();
7575const db = new sqlite3.Database (' :memory:' );
7676
7777db .serialize (() => {
@@ -95,14 +95,6 @@ db.close();
9595
9696To skip searching for pre-compiled binaries, and force a build from source, use
9797
98- ``` bash
99- npm install --build-from-source
100- ```
101-
102- The sqlite3 module depends only on libsqlite3. However, by default, an internal/bundled copy of sqlite will be built and statically linked, so an externally installed sqlite3 is not required.
103-
104- If you wish to install against an external sqlite then you need to pass the ` --sqlite ` argument to ` npm ` wrapper:
105-
10698``` bash
10799npm install --build-from-source --sqlite=/usr/local
108100```
@@ -137,10 +129,10 @@ To build `sqlite3` for node-webkit:
137129
138130``` bash
139131NODE_WEBKIT_VERSION=" 0.8.6" # see latest version at https://github.com/rogerwang/node-webkit#downloads
140- npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=$( NODE_WEBKIT_VERSION)
132+ npm install @homeofthings/ sqlite3 --build-from-source --runtime=node-webkit --target_arch=ia32 --target=$( NODE_WEBKIT_VERSION)
141133```
142134
143- You can also run this command from within a ` sqlite3 ` checkout:
135+ You can also run this command from within a ` @homeofthings/ sqlite3` checkout:
144136
145137``` bash
146138npm install --build-from-source --runtime=node-webkit --target_arch=ia32 --target=$( NODE_WEBKIT_VERSION)
@@ -162,9 +154,9 @@ For instructions on building SQLCipher, see [Building SQLCipher for Node.js](htt
162154To run against SQLCipher, you need to compile ` sqlite3 ` from source by passing build options like:
163155
164156``` bash
165- npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=/usr/
157+ npm install @homeofthings/ sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=/usr/
166158
167- node -e ' require("sqlite3")'
159+ node -e ' require("@homeofthings/ sqlite3")'
168160```
169161
170162If your SQLCipher is installed in a custom location (if you compiled and installed it yourself), you'll need to set some environment variables:
@@ -176,9 +168,9 @@ Set the location where `brew` installed it:
176168``` bash
177169export LDFLAGS=" -L` brew --prefix` /opt/sqlcipher/lib"
178170export CPPFLAGS=" -I` brew --prefix` /opt/sqlcipher/include/sqlcipher"
179- npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=` brew --prefix`
171+ npm install @homeofthings/ sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=` brew --prefix`
180172
181- node -e ' require("sqlite3")'
173+ node -e ' require("@homeofthings/ sqlite3")'
182174```
183175
184176### On most Linuxes (including Raspberry Pi)
@@ -189,23 +181,23 @@ Set the location where `make` installed it:
189181export LDFLAGS=" -L/usr/local/lib"
190182export CPPFLAGS=" -I/usr/local/include -I/usr/local/include/sqlcipher"
191183export CXXFLAGS=" $CPPFLAGS "
192- npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=/usr/local --verbose
184+ npm install @homeofthings/ sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=/usr/local --verbose
193185
194- node -e ' require("sqlite3")'
186+ node -e ' require("@homeofthings/ sqlite3")'
195187```
196188
197189### Custom builds and Electron
198190
199- 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):
191+ 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 @homeofthings/ 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):
200192
201193``` bash
202- --runtime=electron --target=18.2.1 --dist-url=https://electronjs.org/headers
194+ npm install @homeofthings/sqlite3 --build-from-source --runtime=electron --target=18.2.1 --dist-url=https://electronjs.org/headers
203195```
204196
205197In the case of MacOS with Homebrew, the command should look like the following:
206198
207199``` bash
208- npm install sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=` brew --prefix` --runtime=electron --target=18.2.1 --dist-url=https://electronjs.org/headers
200+ npm install @homeofthings/ sqlite3 --build-from-source --sqlite_libname=sqlcipher --sqlite=` brew --prefix` --runtime=electron --target=18.2.1 --dist-url=https://electronjs.org/headers
209201```
210202
211203# Testing
0 commit comments