Skip to content

Commit

Permalink
chore: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Aug 5, 2024
1 parent 380e126 commit a3042ff
Show file tree
Hide file tree
Showing 14 changed files with 536 additions and 302 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- { uses: actions/checkout@v4, with: { persist-credentials: false } }
- { uses: actions/setup-node@v4, with: { node-version: 'lts/*', cache: 'yarn' } }
- run: yarn --frozen-lockfile
- run: yarn build
- run: yarn dev-lib tsc
- name: test
run: |
curl -s -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: yarn --frozen-lockfile

- name: build
run: yarn build-prod
run: yarn build

- name: release
env:
Expand Down
5 changes: 1 addition & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
[ -n "$CI" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

yarn commitlint-def $1
# exit 1 # uncomment to debug
dev-lib commitlint $1
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/bin/sh
[ -n "$CI" ] && exit 0
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged-def
dev-lib lint-staged
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// prettier-ignore
module.exports = [
...require('@naturalcycles/dev-lib/cfg/eslint.config'),
]
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"name": "@naturalcycles/db-lib",
"scripts": {
"prepare": "husky"
"prepare": "husky",
"build": "dev-lib build",
"test": "dev-lib test",
"lint": "dev-lib lint",
"bt": "dev-lib bt",
"lbt": "dev-lib lbt"
},
"dependencies": {
"@naturalcycles/js-lib": "^14.116.0",
"@naturalcycles/nodejs-lib": "^13.1.1"
},
"devDependencies": {
"@naturalcycles/bench-lib": "^3.0.0",
"@naturalcycles/dev-lib": "^13.0.0",
"@types/node": "^20.2.1",
"@naturalcycles/dev-lib": "^15.4.1",
"@types/node": "^22.1.0",
"jest": "^29.0.0"
},
"files": [
Expand Down Expand Up @@ -38,7 +43,7 @@
"url": "https://github.com/NaturalCycles/db-lib"
},
"engines": {
"node": ">=18.12"
"node": ">=20.13"
},
"version": "8.22.0",
"description": "Lowest Common Denominator API to supported Databases",
Expand Down
2 changes: 0 additions & 2 deletions src/leak.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ test('should not leak memory', () => {
require('./testing')
require('./adapter/cachedb')
})

export {}
2 changes: 1 addition & 1 deletion src/pipeline/dbPipelineBackup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('dbPipelineSaveToNDJson', async () => {

await dbPipelineBackup({
db,
outputDirPath: `${tmpDir}`,
outputDirPath: tmpDir,
gzip: false,
})
})
3 changes: 3 additions & 0 deletions src/query/dbQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ export class DBQuery<ROW extends ObjectWithId> {
return this
}

/**
* Passing 0 means "no limit".
*/
limit(limit: number): this {
this._limitValue = limit
return this
Expand Down
1 change: 1 addition & 0 deletions src/testing/daoTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
testItemBMSchema,
} from './test.model'

// eslint-disable-next-line jest/no-export
export function runCommonDaoTest(db: CommonDB, quirks: CommonDBImplementationQuirks = {}): void {
const { support } = db
const dao = new CommonDao({
Expand Down
2 changes: 2 additions & 0 deletions src/testing/dbTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {
} from './test.model'
import { deepFreeze } from './test.util'

/* eslint-disable jest/no-export */

/**
* All options default to `false`.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/testing/keyValueDBTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { _range, _sortBy } from '@naturalcycles/js-lib'
import { CommonKeyValueDB, KeyValueDBTuple } from '../kv/commonKeyValueDB'
import { TEST_TABLE } from './test.model'

/* eslint-disable jest/no-export */

const testIds = _range(1, 4).map(n => `id${n}`)

const testEntries: KeyValueDBTuple[] = testIds.map(id => [id, Buffer.from(`${id}value`)])
Expand Down
2 changes: 2 additions & 0 deletions src/testing/keyValueDaoTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { _range, _sortBy } from '@naturalcycles/js-lib'
import { CommonKeyValueDao } from '../kv/commonKeyValueDao'
import { KeyValueDBTuple } from '../kv/commonKeyValueDB'

/* eslint-disable jest/no-export */

const testIds = _range(1, 4).map(n => `id${n}`)
const testEntries: KeyValueDBTuple[] = testIds.map(id => [id, Buffer.from(`${id}value`)])

Expand Down
Loading

0 comments on commit a3042ff

Please sign in to comment.