Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit 86aa4bd

Browse files
fix: deps, enable consistent-type-imports
1 parent d3cbbf5 commit 86aa4bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+938
-1024
lines changed

eslint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
// prettier-ignore
22
module.exports = [
33
...require('@naturalcycles/dev-lib/cfg/eslint.config'),
4+
{
5+
rules: {
6+
'@typescript-eslint/consistent-type-imports': 2,
7+
},
8+
},
49
]

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
},
1515
"devDependencies": {
1616
"@naturalcycles/bench-lib": "^3",
17-
"@naturalcycles/dev-lib": "^16",
17+
"@naturalcycles/dev-lib": "^17",
1818
"@types/node": "^22",
1919
"@vitest/coverage-v8": "^3",
20+
"tsx": "^4",
2021
"vitest": "^3"
2122
},
2223
"files": [

scripts/cannon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
3-
yarn tsn cannon
3+
yarn tsx scripts/cannon.ts
44
55
*/
66

scripts/ndjsonTest.script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
3-
DEBUG=nc* yarn tsn ndjsonTest.script.ts
3+
yarn tsx scripts/ndjsonTest.script.ts
44
55
*/
66

scripts/vitest.script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
3-
yarn tsn vitest.script.ts
3+
yarn tsx scripts/vitest.script.ts
44
55
*/
66

src/adapter/cachedb/cache.db.model.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { CommonLogger, ObjectWithId } from '@naturalcycles/js-lib'
2-
import { CommonDB } from '../../common.db'
3-
import {
1+
import type { CommonLogger, ObjectWithId } from '@naturalcycles/js-lib'
2+
import type { CommonDB } from '../../common.db'
3+
import type {
44
CommonDBCreateOptions,
55
CommonDBOptions,
66
CommonDBSaveOptions,

src/adapter/cachedb/cache.db.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import { Readable } from 'node:stream'
2-
import {
3-
_isTruthy,
2+
import type {
43
JsonSchemaObject,
54
JsonSchemaRootObject,
65
ObjectWithId,
76
StringMap,
87
} from '@naturalcycles/js-lib'
9-
import { ReadableTyped } from '@naturalcycles/nodejs-lib'
8+
import { _isTruthy } from '@naturalcycles/js-lib'
9+
import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
1010
import { BaseCommonDB } from '../../base.common.db'
11-
import { CommonDB, commonDBFullSupport, CommonDBSupport } from '../../common.db'
12-
import { RunQueryResult } from '../../db.model'
13-
import { DBQuery } from '../../query/dbQuery'
14-
import {
11+
import type { CommonDB, CommonDBSupport } from '../../common.db'
12+
import { commonDBFullSupport } from '../../common.db'
13+
import type { RunQueryResult } from '../../db.model'
14+
import type { DBQuery } from '../../query/dbQuery'
15+
import type {
1516
CacheDBCfg,
1617
CacheDBCreateOptions,
1718
CacheDBOptions,

src/adapter/cachedb/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CacheDB } from './cache.db'
2-
import {
2+
import type {
33
CacheDBCfg,
44
CacheDBCreateOptions,
55
CacheDBOptions,

src/adapter/file/file.db.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { CommonLogger, ObjectWithId } from '@naturalcycles/js-lib'
2-
import { DBSaveBatchOperation } from '../../db.model'
1+
import type { CommonLogger, ObjectWithId } from '@naturalcycles/js-lib'
2+
import type { DBSaveBatchOperation } from '../../db.model'
33
import type { DBQueryOrder } from '../../query/dbQuery'
44

55
export interface FileDBPersistencePlugin {

src/adapter/file/file.db.ts

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { JsonSchemaRootObject, ObjectWithId, UnixTimestampMillis } from '@naturalcycles/js-lib'
12
import {
23
_assert,
34
_by,
@@ -8,28 +9,21 @@ import {
89
_sortObjectDeep,
910
_stringMapValues,
1011
generateJsonSchemaFromData,
11-
JsonSchemaRootObject,
1212
localTime,
13-
ObjectWithId,
14-
UnixTimestampMillis,
1513
} from '@naturalcycles/js-lib'
16-
import { dimGrey, readableCreate, ReadableTyped } from '@naturalcycles/nodejs-lib'
17-
import {
18-
BaseCommonDB,
19-
commonDBFullSupport,
20-
CommonDBSupport,
21-
DBSaveBatchOperation,
22-
queryInMemory,
23-
} from '../..'
24-
import { CommonDB } from '../../common.db'
25-
import {
14+
import type { ReadableTyped } from '@naturalcycles/nodejs-lib'
15+
import { dimGrey, readableCreate } from '@naturalcycles/nodejs-lib'
16+
import type { CommonDBSupport, DBSaveBatchOperation } from '../..'
17+
import { BaseCommonDB, commonDBFullSupport, queryInMemory } from '../..'
18+
import type { CommonDB } from '../../common.db'
19+
import type {
2620
CommonDBOptions,
2721
CommonDBSaveOptions,
2822
CommonDBStreamOptions,
2923
RunQueryResult,
3024
} from '../../db.model'
31-
import { DBQuery } from '../../query/dbQuery'
32-
import { FileDBCfg } from './file.db.model'
25+
import type { DBQuery } from '../../query/dbQuery'
26+
import type { FileDBCfg } from './file.db.model'
3327

3428
/**
3529
* Provides barebone implementation for "whole file" based CommonDB.

0 commit comments

Comments
 (0)