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

Commit 63c1b6a

Browse files
chore: deps
1 parent f40fa77 commit 63c1b6a

File tree

10 files changed

+67
-37
lines changed

10 files changed

+67
-37
lines changed

eslint.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import sharedConfig from '@naturalcycles/dev-lib/cfg/eslint.config.js'
33
export default [
44
...sharedConfig,
55
{
6-
rules: {
7-
'@typescript-eslint/consistent-type-imports': 2,
8-
},
6+
rules: {},
97
},
108
]

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"@naturalcycles/bench-lib": "^4",
1818
"@naturalcycles/dev-lib": "^18",
1919
"@types/node": "^22",
20-
"@vitest/coverage-v8": "^3",
2120
"tsx": "^4",
2221
"vitest": "^3"
2322
},

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const db = new CacheDB({
1313
logDownstream: true,
1414
})
1515

16-
describe('runCommonDBTest', () => runCommonDBTest(db))
16+
describe('runCommonDBTest', async () => {
17+
await runCommonDBTest(db)
18+
})
1719

18-
describe('runCommonDaoTest', () => runCommonDaoTest(db))
20+
describe('runCommonDaoTest', async () => {
21+
await runCommonDaoTest(db)
22+
})

src/adapter/file/file.db.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ const db = new FileDB({
77
plugin: new InMemoryPersistencePlugin(),
88
})
99

10-
describe('runCommonDBTest', () => runCommonDBTest(db))
10+
describe('runCommonDBTest', async () => {
11+
await runCommonDBTest(db)
12+
})
1113

12-
describe('runCommonDaoTest', () => runCommonDaoTest(db))
14+
describe('runCommonDaoTest', async () => {
15+
await runCommonDaoTest(db)
16+
})

src/adapter/file/localFile.persistence.plugin.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ const db = new FileDB({
99
}),
1010
})
1111

12-
describe('runCommonDBTest', () => runCommonDBTest(db))
12+
describe('runCommonDBTest', async () => {
13+
await runCommonDBTest(db)
14+
})
1315

14-
describe('runCommonDaoTest', () => runCommonDaoTest(db))
16+
describe('runCommonDaoTest', async () => {
17+
await runCommonDaoTest(db)
18+
})

src/adapter/inmemory/inMemory.db.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ import { InMemoryDB } from './inMemory.db.js'
99

1010
const db = new InMemoryDB()
1111

12-
describe('runCommonDBTest', () => runCommonDBTest(db))
12+
describe('runCommonDBTest', async () => {
13+
await runCommonDBTest(db)
14+
})
1315

14-
describe('runCommonDaoTest', () => runCommonDaoTest(db))
16+
describe('runCommonDaoTest', async () => {
17+
await runCommonDaoTest(db)
18+
})
1519

1620
test('persistence', async () => {
1721
const testItems = createTestItemsDBM(50)

src/adapter/inmemory/inMemoryKeyValueDB.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@ import { InMemoryKeyValueDB } from './inMemoryKeyValueDB.js'
44

55
const db = new InMemoryKeyValueDB()
66

7-
describe('runCommonKeyValueDBTest', () => runCommonKeyValueDBTest(db))
8-
describe('runCommonKeyValueDaoTest', () => runCommonKeyValueDaoTest(db))
7+
describe('runCommonKeyValueDBTest', async () => {
8+
await runCommonKeyValueDBTest(db)
9+
})
10+
11+
describe('runCommonKeyValueDaoTest', async () => {
12+
await runCommonKeyValueDaoTest(db)
13+
})

src/commondao/common.dao.test.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,21 +376,29 @@ test('modifications of immutable objects', async () => {
376376

377377
item1Saved.k1 = 'modifiedk1'
378378
// Ensure object cannot be modified with save
379-
await expect(immutableDao.save(item1Saved)).rejects.toThrow()
379+
await expect(immutableDao.save(item1Saved)).rejects.toThrow(`INSERT failed, entity exists`)
380380

381381
// Ensure objects be saved with saveBatch
382382
const bms = [item2!, item3!]
383383

384384
await expect(immutableDao.saveBatch(bms)).resolves.not.toThrow()
385385

386386
// Ensure Object can't be patched
387-
await expect(immutableDao.patchById(item1Saved.id, { k2: 'patchedk2' })).rejects.toThrow()
387+
await expect(immutableDao.patchById(item1Saved.id, { k2: 'patchedk2' })).rejects.toThrow(
388+
`entity exists`,
389+
)
388390

389391
// Ensure object can't be deleted
390-
await expect(immutableDao.deleteById(item1Saved.id)).rejects.toThrow()
391-
await expect(immutableDao.deleteByIds([item1Saved.id])).rejects.toThrow()
392+
await expect(immutableDao.deleteById(item1Saved.id)).rejects.toThrowErrorMatchingInlineSnapshot(
393+
`[AppError: OBJECT_IS_IMMUTABLE]`,
394+
)
395+
await expect(
396+
immutableDao.deleteByIds([item1Saved.id]),
397+
).rejects.toThrowErrorMatchingInlineSnapshot(`[AppError: OBJECT_IS_IMMUTABLE]`)
392398
const q = immutableDao.query().filter('id', '==', item1Saved.id)
393-
await expect(immutableDao.deleteByQuery(q)).rejects.toThrow()
399+
await expect(immutableDao.deleteByQuery(q)).rejects.toThrowErrorMatchingInlineSnapshot(
400+
`[AppError: OBJECT_IS_IMMUTABLE]`,
401+
)
394402

395403
// Ensure deletion is possible with override flag
396404
await expect(immutableDao.deleteByQuery(q, { allowMutability: true })).resolves.not.toThrow()

vitest.config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import { defineConfig } from 'vitest/config'
2-
import { sharedConfig } from '@naturalcycles/dev-lib/cfg/vitest.config.js'
1+
import { defineVitestConfig } from '@naturalcycles/dev-lib/cfg/vitest.config.js'
32

4-
export default defineConfig({
5-
test: {
6-
...sharedConfig,
7-
},
3+
export default defineVitestConfig({
4+
//
85
})

yarn.lock

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,9 @@
738738
benchmark "^2"
739739

740740
"@naturalcycles/dev-lib@^18":
741-
version "18.0.1"
742-
resolved "https://registry.yarnpkg.com/@naturalcycles/dev-lib/-/dev-lib-18.0.1.tgz#efa781525e11bc71ffac71d58c51a3c8fca5a963"
743-
integrity sha512-RzAbdaZpTpNsTwrWbXjRD4yxKAw0+16+XYjkzaoopq/AsBagVgU7Re+14zfd5drhScY+GNCPANGEzXa6ccLCwA==
741+
version "18.1.1"
742+
resolved "https://registry.yarnpkg.com/@naturalcycles/dev-lib/-/dev-lib-18.1.1.tgz#aec07627231b99d651d7c4eac9524bc93d09ae2d"
743+
integrity sha512-DOvkhrf0BiO+L+7eSbKZXmXGt+KM6VNpcD6y2GWYsfwbBZgRxg8F7G2kEAWTW7qHWlTOvQSO6hsv0+izysjyTw==
744744
dependencies:
745745
"@biomejs/biome" "^1"
746746
"@commitlint/cli" "^19"
@@ -751,6 +751,8 @@
751751
"@naturalcycles/nodejs-lib" "^14"
752752
"@stylistic/eslint-plugin" "^4"
753753
"@types/node" "^22"
754+
"@vitest/coverage-v8" "^3"
755+
"@vitest/eslint-plugin" "^1"
754756
eslint "^9"
755757
eslint-plugin-import-x "^4"
756758
eslint-plugin-jsdoc "^50"
@@ -777,9 +779,9 @@
777779
zod "^3"
778780

779781
"@naturalcycles/nodejs-lib@^14":
780-
version "14.0.1"
781-
resolved "https://registry.yarnpkg.com/@naturalcycles/nodejs-lib/-/nodejs-lib-14.0.1.tgz#ebef5e3c6e32c8972cd81cb36d2bcc72dddc03d6"
782-
integrity sha512-JH/Y0J2Mok+Dge2f22OqKBRV4nA+q7ekspj2gvtcgG+DZr3jhwdXror0KaGtDulNn1Ka+rDSbKazwW3xYcUT0g==
782+
version "14.0.2"
783+
resolved "https://registry.yarnpkg.com/@naturalcycles/nodejs-lib/-/nodejs-lib-14.0.2.tgz#ac8e81f537d16e11f3f05de9cb6132bc4186114c"
784+
integrity sha512-rBgZYr/sWrZfbr5n3dnGTz2dDc8y1gWlLAPEoDUTcZfm2tvykVK3JPb+0Z8koiV6TWsWZlZTmGf3x1T8m8y+LQ==
783785
dependencies:
784786
"@naturalcycles/js-lib" "^15"
785787
"@types/js-yaml" "^4"
@@ -1214,6 +1216,11 @@
12141216
test-exclude "^7.0.1"
12151217
tinyrainbow "^2.0.0"
12161218

1219+
"@vitest/eslint-plugin@^1":
1220+
version "1.1.43"
1221+
resolved "https://registry.yarnpkg.com/@vitest/eslint-plugin/-/eslint-plugin-1.1.43.tgz#00b43b5d173f3f9dc24a8f7c704c9beb5d791830"
1222+
integrity sha512-OLoUMO67Yg+kr7E6SjF5+Qvl2f6uNJ7ImQYnXT8WgnPiZE41ZQBsnzn70jehXrhFVadphHs2smk+yl0TFKLV5Q==
1223+
12171224
12181225
version "3.1.1"
12191226
resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-3.1.1.tgz#d64ddfdcf9e877d805e1eee67bd845bf0708c6c2"
@@ -1799,9 +1806,9 @@ [email protected]:
17991806
safe-buffer "^5.0.1"
18001807

18011808
electron-to-chromium@^1.5.73:
1802-
version "1.5.138"
1803-
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.138.tgz#319e775179bd0889ed96a04d4390d355fb315a44"
1804-
integrity sha512-FWlQc52z1dXqm+9cCJ2uyFgJkESd+16j6dBEjsgDNuHjBpuIzL8/lRc0uvh1k8RNI6waGo6tcy2DvwkTBJOLDg==
1809+
version "1.5.139"
1810+
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.139.tgz#56ae7d42439e2967a54badbadaeb12f748987f37"
1811+
integrity sha512-GGnRYOTdN5LYpwbIr0rwP/ZHOQSvAF6TG0LSzp28uCBb9JiXHJGmaaKw29qjNJc5bGnnp6kXJqRnGMQoELwi5w==
18051812

18061813
emoji-regex@^10.3.0:
18071814
version "10.4.0"
@@ -2170,9 +2177,9 @@ fastq@^1.6.0:
21702177
reusify "^1.0.4"
21712178

21722179
fdir@^6.4.3:
2173-
version "6.4.3"
2174-
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.3.tgz#011cdacf837eca9b811c89dbb902df714273db72"
2175-
integrity sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==
2180+
version "6.4.4"
2181+
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.4.tgz#1cfcf86f875a883e19a8fab53622cfe992e8d2f9"
2182+
integrity sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==
21762183

21772184
file-entry-cache@^8.0.0:
21782185
version "8.0.0"

0 commit comments

Comments
 (0)