Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump better-sqlite3 version up to 8.3.0 #5

Merged
merged 2 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"async": "3.2.4",
"better-sqlite3": "7.6.2",
"better-sqlite3": "8.3.0",
"bfx-facs-base": "git+https://github.com/bitfinexcom/bfx-facs-base.git"
},
"engine": {
Expand Down
12 changes: 6 additions & 6 deletions test/base-worker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ chai.use(require('chai-fs'))
const { assert } = chai
const path = require('path')
const {
rmdirSync,
mkdirSync
} = require('fs')

const {
getTableCreationQuery,
getTableDeletionQuery
getTableDeletionQuery,
rmRfSync
} = require('./helpers')

const DB_WORKER_ACTIONS = require(
Expand Down Expand Up @@ -39,17 +39,17 @@ const tableData = [

describe('Base worker', () => {
before(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
mkdirSync(dbPathAbsolute, { recursive: true })
})

after(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
})

describe('Setup step', () => {
beforeEach(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
mkdirSync(dbPathAbsolute, { recursive: true })
})

Expand Down Expand Up @@ -134,7 +134,7 @@ describe('Base worker', () => {
let fac

before((done) => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
mkdirSync(dbPathAbsolute, { recursive: true })

fac = new Fac(caller, { dbPathAbsolute })
Expand Down
8 changes: 4 additions & 4 deletions test/extended-worker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
const { assert } = require('chai')
const path = require('path')
const {
rmdirSync,
mkdirSync
} = require('fs')

const {
getTableCreationQuery,
getTableDeletionQuery
getTableDeletionQuery,
rmRfSync
} = require('./helpers')

const BASE_DB_WORKER_ACTIONS = require(
Expand Down Expand Up @@ -42,12 +42,12 @@ const tableData = [

describe('Extended worker', () => {
before(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
mkdirSync(dbPathAbsolute, { recursive: true })
})

after(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
})

it('Setup step', (done) => {
Expand Down
4 changes: 3 additions & 1 deletion test/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

const getTableCreationQuery = require('./get-table-creation-query')
const getTableDeletionQuery = require('./get-table-deletion-query')
const { rmRfSync } = require('./utils')

module.exports = {
getTableCreationQuery,
getTableDeletionQuery
getTableDeletionQuery,
rmRfSync
}
12 changes: 12 additions & 0 deletions test/helpers/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

const fs = require('fs')

const rmRfSync = (path) => fs.rmSync(path, {
recursive: true,
force: true
})

module.exports = {
rmRfSync
}
8 changes: 4 additions & 4 deletions test/load-extended-worker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
const { assert } = require('chai')
const path = require('path')
const {
rmdirSync,
mkdirSync
} = require('fs')
const { promisify } = require('util')

const {
getTableCreationQuery,
getTableDeletionQuery
getTableDeletionQuery,
rmRfSync
} = require('./helpers')

const BASE_DB_WORKER_ACTIONS = require(
Expand Down Expand Up @@ -38,7 +38,7 @@ describe('Load extended worker', () => {
let fac

before(async () => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
mkdirSync(dbPathAbsolute, { recursive: true })

fac = new Fac(
Expand All @@ -55,7 +55,7 @@ describe('Load extended worker', () => {

after((done) => {
fac.stop(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
done()
})
})
Expand Down
8 changes: 4 additions & 4 deletions test/sync-queries.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
const { assert } = require('chai')
const path = require('path')
const {
rmdirSync,
mkdirSync
} = require('fs')

const {
getTableCreationQuery,
getTableDeletionQuery
getTableDeletionQuery,
rmRfSync
} = require('./helpers')

const DB_WORKER_ACTIONS = require(
Expand Down Expand Up @@ -37,12 +37,12 @@ const tableData = [

describe('Sync queries', () => {
before(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
mkdirSync(dbPathAbsolute, { recursive: true })
})

after(() => {
rmdirSync(dbPathAbsolute, { recursive: true })
rmRfSync(dbPathAbsolute)
})

it('Setup step', (done) => {
Expand Down