fix: correct circular dep detection in pre-commit hook
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s

The generate-dependency-graph.js script was counting madge's
'Processed N files' info line as a circular chain. Fixed the
filter to only match lines starting with 'N)' pattern.
This commit is contained in:
2026-05-26 21:57:50 +02:00
parent 06c3fe4380
commit 2fa16c5749
3 changed files with 16 additions and 25 deletions
+2 -16
View File
@@ -1,18 +1,4 @@
# Circular Dependencies
Generated: $(date -u +"%Y-%m-%dT%H:%M:%S.%3NZ")
Found: 0 circular chain(s) — clean!
Generated: 2026-05-26T19:57:33.588Z
## Status
All 7 previously-known circular dependency chains have been resolved:
1. ✅ effects/discipline-effects.ts > stores/discipline-slice.ts > stores/combatStore.ts > stores/combat-actions.ts
- Fixed by: discipline-slice.ts uses callbacks instead of directly importing combatStore
2. ✅ utils/floor-utils.ts > utils/room-utils.ts > utils/enemy-utils.ts
- Fixed by: removed re-export of getDodgeChance from floor-utils.ts
3. ✅ utils/floor-utils.ts > utils/room-utils.ts
- Fixed by: same as above
4. ✅ stores/gameStore.ts > stores/gameActions.ts
- Fixed by: extracted GameCoordinatorState to gameStore.types.ts
5. ✅ stores/gameStore.ts > stores/gameLoopActions.ts
- Fixed by: extracted GameCoordinatorState to gameStore.types.ts
6. ✅ stores/gameStore.ts > stores/tick-pipeline.ts
- Fixed by: extracted GameCoordinatorState to gameStore.types.ts
No circular dependencies found. ✅
+8 -7
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-05-26T19:43:50.116Z",
"generated": "2026-05-26T19:57:31.715Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
},
@@ -489,7 +489,6 @@
"data/disciplines/enchanter.ts",
"data/disciplines/fabricator.ts",
"data/disciplines/invoker.ts",
"stores/combatStore.ts",
"types.ts",
"types/disciplines.ts",
"utils/discipline-math.ts",
@@ -498,7 +497,7 @@
"stores/gameActions.ts": [
"effects/discipline-effects.ts",
"stores/combatStore.ts",
"stores/gameStore.ts",
"stores/gameStore.types.ts",
"stores/manaStore.ts",
"stores/prestigeStore.ts",
"stores/uiStore.ts",
@@ -518,7 +517,7 @@
"constants.ts",
"effects/discipline-effects.ts",
"stores/combatStore.ts",
"stores/gameStore.ts",
"stores/gameStore.types.ts",
"stores/manaStore.ts",
"stores/prestigeStore.ts",
"stores/uiStore.ts",
@@ -538,6 +537,7 @@
"stores/discipline-slice.ts",
"stores/gameActions.ts",
"stores/gameLoopActions.ts",
"stores/gameStore.types.ts",
"stores/manaStore.ts",
"stores/prestigeStore.ts",
"stores/tick-pipeline.ts",
@@ -545,6 +545,7 @@
"utils/index.ts",
"utils/safe-persist.ts"
],
"stores/gameStore.types.ts": [],
"stores/index.ts": [
"constants.ts",
"stores/attunementStore.ts",
@@ -555,6 +556,7 @@
"stores/discipline-slice.ts",
"stores/gameHooks.ts",
"stores/gameStore.ts",
"stores/gameStore.types.ts",
"stores/manaStore.ts",
"stores/prestigeStore.ts",
"stores/uiStore.ts",
@@ -578,7 +580,7 @@
"stores/combat-state.types.ts",
"stores/craftingStore.types.ts",
"stores/discipline-slice.ts",
"stores/gameStore.ts",
"stores/gameStore.types.ts",
"stores/manaStore.ts",
"stores/prestigeStore.ts",
"stores/uiStore.ts"
@@ -645,8 +647,7 @@
],
"utils/floor-utils.ts": [
"constants.ts",
"data/guardian-encounters.ts",
"utils/room-utils.ts"
"data/guardian-encounters.ts"
],
"utils/formatting.ts": [],
"utils/index.ts": [