Skip to content

Commit c45aeb4

Browse files
committed
changed npm package to @HomeOfThings scope
1 parent 40acd70 commit c45aeb4

4 files changed

Lines changed: 25 additions & 33 deletions

File tree

README.md

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
---
66
Asynchronous, 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();
7575
const db = new sqlite3.Database(':memory:');
7676

7777
db.serialize(() => {
@@ -95,14 +95,6 @@ db.close();
9595

9696
To 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
10799
npm install --build-from-source --sqlite=/usr/local
108100
```
@@ -137,10 +129,10 @@ To build `sqlite3` for node-webkit:
137129

138130
```bash
139131
NODE_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
146138
npm 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
162154
To 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

170162
If 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
177169
export LDFLAGS="-L`brew --prefix`/opt/sqlcipher/lib"
178170
export 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:
189181
export LDFLAGS="-L/usr/local/lib"
190182
export CPPFLAGS="-I/usr/local/include -I/usr/local/include/sqlcipher"
191183
export 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

205197
In 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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "sqlite3",
2+
"name": "@homeofthings/sqlite3",
33
"description": "Asynchronous, non-blocking SQLite3 bindings",
44
"version": "6.0.1",
55
"homepage": "https://github.com/gms1/node-sqlite3",

test/nw/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ NODE_WEBKIT_VERSION=0.8.4
22

33
all: app.nw
44

5-
node_modules/sqlite3:
6-
npm install https://github.com/mapbox/node-sqlite3/tarball/main --build-from-source --runtime=node-webkit --target_arch=ia32 --target=$(NODE_WEBKIT_VERSION)
5+
node_modules/@homeofthings/sqlite3:
6+
npm install https://github.com/gms1/node-sqlite3/tarball/main --build-from-source --runtime=node-webkit --target_arch=ia32 --target=$(NODE_WEBKIT_VERSION)
77

88
rebuild:
9-
cd node_modules/sqlite3 && ./node_modules/.bin/node-pre-gyp rebuild --runtime=node-webkit --target_arch=ia32 --target=$(NODE_WEBKIT_VERSION)
9+
cd node_modules/@homeofthings/sqlite3 && ./node_modules/.bin/node-pre-gyp rebuild --runtime=node-webkit --target_arch=ia32 --target=$(NODE_WEBKIT_VERSION)
1010

1111
node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip:
1212
wget https://s3.amazonaws.com/node-webkit/v$(NODE_WEBKIT_VERSION)/node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip
1313

1414
./node-webkit.app: node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip
1515
unzip -o node-webkit-v$(NODE_WEBKIT_VERSION)-osx-ia32.zip
1616

17-
app.nw: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3
17+
app.nw: ./node-webkit.app Makefile package.json index.html node_modules/@homeofthings/sqlite3
1818
zip app.nw index.html package.json node_modules
1919

2020
test: ./node-webkit.app app.nw
2121
./node-webkit.app/Contents/MacOS/node-webkit app.nw
2222

23-
package: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3
23+
package: ./node-webkit.app Makefile package.json index.html node_modules/@homeofthings/sqlite3
2424
rm -rf node-sqlite-test.app
2525
cp -r ./node-webkit.app node-sqlite-test.app
2626
mkdir ./node-sqlite-test.app/Contents/Resources/app.nw/
@@ -30,7 +30,7 @@ package: ./node-webkit.app Makefile package.json index.html node_modules/sqlite3
3030
./node-sqlite-test.app/Contents/MacOS/node-webkit
3131

3232
clean:
33-
rm -rf ./node_modules/sqlite3
33+
rm -rf ./node_modules/@homeofthings/sqlite3
3434
rm -f ./app.nw
3535
rm -rf node-sqlite-test.app
3636
rm -f credits.html

test/nw/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
<h1>Hello World!</h1>
88
Using node-sqlite3:
99
<script>
10-
var sqlite = require('sqlite3');
10+
var sqlite = require('@homeofthings/sqlite3');
1111
document.write(sqlite.VERSION);
1212
</script>.
1313
</body>
14-
</html>
14+
</html>

0 commit comments

Comments
 (0)