Skip to content

Commit

Permalink
fix: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Sep 4, 2023
1 parent d26d42d commit 130caaf
Show file tree
Hide file tree
Showing 13 changed files with 305 additions and 249 deletions.
3 changes: 1 addition & 2 deletions scripts/cannon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ yarn tsn cannon
/* eslint-disable unused-imports/no-unused-vars */
import { expressFunctionFactory, runCannon } from '@naturalcycles/bench-lib'
import { _omit } from '@naturalcycles/js-lib'
import { getValidationResult, stringId } from '@naturalcycles/nodejs-lib'
import { runScript } from '@naturalcycles/nodejs-lib'
import { getValidationResult, stringId, runScript } from '@naturalcycles/nodejs-lib'
import { CommonDao, InMemoryDB } from '../src'
import { createTestItemsBM, testItemBMSchema, testItemDBMSchema, TEST_TABLE } from '../src/testing'

Expand Down
3 changes: 1 addition & 2 deletions src/adapter/cachedb/cache.db.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { runCommonDaoTest } from '../../testing'
import { runCommonDBTest } from '../../testing'
import { runCommonDaoTest, runCommonDBTest } from '../../testing'
import { InMemoryDB } from '../inmemory/inMemory.db'
import { CacheDB } from './cache.db'

Expand Down
3 changes: 1 addition & 2 deletions src/adapter/file/file.db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import {
_stringMapEntries,
Saved,
} from '@naturalcycles/js-lib'
import { readableCreate, ReadableTyped } from '@naturalcycles/nodejs-lib'
import { dimGrey } from '@naturalcycles/nodejs-lib'
import { readableCreate, ReadableTyped, dimGrey } from '@naturalcycles/nodejs-lib'
import { BaseCommonDB, DBSaveBatchOperation, queryInMemory } from '../..'
import { CommonDB } from '../../common.db'
import {
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/file/localFile.persistence.plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'node:fs'
import { Readable } from 'node:stream'
import fsp from 'node:fs/promises'
import { Readable } from 'node:stream'
import { createGzip, createUnzip } from 'node:zlib'
import { pMap, ObjectWithId } from '@naturalcycles/js-lib'
import {
Expand Down
3 changes: 2 additions & 1 deletion src/adapter/inmemory/inMemory.db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ import {
_pipeline,
_emptyDir,
_ensureDir,
dimGrey,
yellow,
} from '@naturalcycles/nodejs-lib'
import { dimGrey, yellow } from '@naturalcycles/nodejs-lib'
import { CommonDB, DBIncrement, DBPatch, DBTransaction, queryInMemory } from '../..'
import {
CommonDBCreateOptions,
Expand Down
3 changes: 1 addition & 2 deletions src/adapter/inmemory/inMemoryKeyValueDB.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CommonKeyValueDao } from '../../kv/commonKeyValueDao'
import { TEST_TABLE } from '../../testing'
import { runCommonKeyValueDBTest } from '../../testing'
import { TEST_TABLE, runCommonKeyValueDBTest } from '../../testing'
import { runCommonKeyValueDaoTest } from '../../testing/keyValueDaoTest'
import { InMemoryKeyValueDB } from './inMemoryKeyValueDB'

Expand Down
2 changes: 1 addition & 1 deletion src/model.util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { stringId } from '@naturalcycles/nodejs-lib'
import { CreatedUpdated, CreatedUpdatedId } from '@naturalcycles/js-lib'
import { stringId } from '@naturalcycles/nodejs-lib'

export function createdUpdatedFields(
existingObject?: Partial<CreatedUpdated> | null,
Expand Down
5 changes: 4 additions & 1 deletion src/pipeline/dbPipelineBackup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ import {
_pathExistsSync,
_ensureFileSync,
_writeJson,
boldWhite,
dimWhite,
grey,
yellow,
} from '@naturalcycles/nodejs-lib'
import { boldWhite, dimWhite, grey, yellow } from '@naturalcycles/nodejs-lib'
import { CommonDB } from '../common.db'
import { DBQuery } from '../index'

Expand Down
5 changes: 4 additions & 1 deletion src/pipeline/dbPipelineCopy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import {
transformTap,
writableForEach,
_pipeline,
boldWhite,
dimWhite,
grey,
yellow,
} from '@naturalcycles/nodejs-lib'
import { boldWhite, dimWhite, grey, yellow } from '@naturalcycles/nodejs-lib'
import { CommonDB } from '../common.db'
import { CommonDBSaveOptions } from '../db.model'
import { DBQuery } from '../query/dbQuery'
Expand Down
5 changes: 4 additions & 1 deletion src/pipeline/dbPipelineRestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ import {
_pipeline,
_ensureDirSync,
_readJson,
boldWhite,
dimWhite,
grey,
yellow,
} from '@naturalcycles/nodejs-lib'
import { boldWhite, dimWhite, grey, yellow } from '@naturalcycles/nodejs-lib'
import { CommonDB } from '../common.db'
import { CommonDBSaveOptions } from '../index'

Expand Down
4 changes: 2 additions & 2 deletions src/testing/daoTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Readable } from 'node:stream'
import { pDelay, _deepCopy, _pick, _sortBy, _omit, localTime } from '@naturalcycles/js-lib'
import { pDelay, _deepCopy, _pick, _sortBy, _omit, localTimeNow } from '@naturalcycles/js-lib'
import { _pipeline, readableToArray, transformNoOp } from '@naturalcycles/nodejs-lib'
import { CommonDaoLogLevel, DBQuery } from '..'
import { CommonDB } from '../common.db'
Expand Down Expand Up @@ -289,7 +289,7 @@ export function runCommonDaoTest(
await dao.query().deleteByQuery()

// Test that id, created, updated are created
const now = localTime().unix()
const now = localTimeNow().unix()
await dao.runInTransaction([dao.tx.save(_omit(item1, ['id', 'created', 'updated']))])

const loaded = await dao.query().runQuery()
Expand Down
2 changes: 1 addition & 1 deletion src/testing/keyValueDaoTest.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { _range, _sortBy } from '@naturalcycles/js-lib'
import { readableToArray } from '@naturalcycles/nodejs-lib'
import { CommonKeyValueDao } from '../kv/commonKeyValueDao'
import { KeyValueDBTuple } from '../kv/commonKeyValueDB'
import { CommonKeyValueDao } from '../kv/commonKeyValueDao'

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 130caaf

Please sign in to comment.