@kubun/db 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/db.js +4 -4
- package/package.json +6 -6
package/lib/db.js
CHANGED
|
@@ -107,9 +107,9 @@ export class KubunDB {
|
|
|
107
107
|
// (revert first, then drop the stale cache). Hooks are isolated/logged,
|
|
108
108
|
// never re-thrown; the original error is preserved so callers (e.g. the
|
|
109
109
|
// engine's `MutateGraphWriteRollback` sentinel) still observe it.
|
|
110
|
-
for(
|
|
110
|
+
for (const [index, hook] of rollbackHooks.entries()){
|
|
111
111
|
try {
|
|
112
|
-
|
|
112
|
+
hook();
|
|
113
113
|
} catch (error) {
|
|
114
114
|
this.#logger.error('rollback hook {index}/{count} failed', {
|
|
115
115
|
index,
|
|
@@ -124,9 +124,9 @@ export class KubunDB {
|
|
|
124
124
|
// effects (event emission, cache invalidation). A throwing hook must not
|
|
125
125
|
// skip the remaining hooks or make the caller observe a durable write as a
|
|
126
126
|
// failure, so each hook is isolated and its error logged, never re-thrown.
|
|
127
|
-
for(
|
|
127
|
+
for (const [index, hook] of commitHooks.entries()){
|
|
128
128
|
try {
|
|
129
|
-
|
|
129
|
+
hook();
|
|
130
130
|
} catch (error) {
|
|
131
131
|
this.#logger.error('commit hook {index}/{count} failed', {
|
|
132
132
|
index,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubun/db",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"license": "see LICENSE.md",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"LICENSE.md"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@kubun/db-adapter": "^0.
|
|
19
|
-
"@kubun/logger": "^0.
|
|
18
|
+
"@kubun/db-adapter": "^0.17.0",
|
|
19
|
+
"@kubun/logger": "^0.17.0",
|
|
20
20
|
"kysely": "^0.29.5"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@kubun/db-better-sqlite": "^0.
|
|
23
|
+
"@kubun/db-better-sqlite": "^0.17.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"scripts": {
|
|
29
29
|
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:types",
|
|
30
30
|
"build:clean": "del lib",
|
|
31
|
-
"build:js": "swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
|
|
32
|
-
"build:types": "tsc --emitDeclarationOnly --skipLibCheck",
|
|
31
|
+
"build:js": "del 'lib/**/*.js' && swc src -d ./lib --config-file ../../node_modules/@kigu/dev/swc.json --strip-leading-paths",
|
|
32
|
+
"build:types": "del 'lib/**/*.d.ts' 'lib/**/*.d.ts.map' && tsc --emitDeclarationOnly --skipLibCheck",
|
|
33
33
|
"build:types:ci": "tsc --emitDeclarationOnly --declarationMap false",
|
|
34
34
|
"test": "pnpm run test:types && pnpm run test:unit",
|
|
35
35
|
"test:types": "tsc --noEmit -p tsconfig.test.json",
|