Skip to content

Commit

Permalink
fix: remove unused require('sqlite3')
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjake committed Feb 21, 2020
1 parent 50a1bd4 commit 7e5188d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,41 @@ on:
jobs:
build:
runs-on: ubuntu-latest

# https://github.com/actions/example-services/blob/master/.github/workflows/postgres-service.yml
services:
postgres:
image: postgres:11.5
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD:
POSTGRES_DB: leoric
ports:
# will assign a random free host port
- 5432/tcp
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm test
- name: Install PostgreSQL client & SQLite
run: |
sudo apt-get install -y postgresql-client sqlite3 libsqlite3-dev
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
env:
CI: true
# use localhost for the host here because we are running the job on the VM.
# If we were running the job on in a container this would be postgres
POSTGRES_HOST: localhost
POSTGRES_USER: postgres
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} # get randomly assigned published port

publish-npm:
needs: build
Expand Down
7 changes: 6 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
0.5.2 / 2020-02-21
==================

* Fix: drop the default and unused `require('sqlite3')`

0.5.1 / 2020-02-21
==================

* New: `connect({ client: '@journeyapps/sqlcipher' })`
* Fix: `connect({ client: '@journeyapps/sqlcipher' })`

0.5.0 / 2020-02-19
==================
Expand Down
1 change: 0 additions & 1 deletion lib/drivers/sqlite/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

const sqlite = require('sqlite3');
const strftime = require('strftime');

const AbstractDriver = require('../abstract');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leoric",
"version": "0.5.1",
"version": "0.5.2",
"description": "JavaScript Object-relational mapping alchemy",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 7e5188d

Please sign in to comment.