Backend unused code#1474
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes unused caching infrastructure and database dependencies from the backend package. The changes focus on eliminating code that is no longer referenced, specifically cache methods for Knex connections, tunnels, drivers, and table structures.
- Removed unused cache constants and methods from the backend caching layer
- Removed
ibm_dboptional dependency andnode-gypfrom backend package - Relocated
node-gypdependency to shared-code package whereibm_dbis actively used
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| backend/package.json | Removed ibm_db optional dependency, node-gyp dependency, and packageExtensions configuration that are no longer needed in backend |
| backend/src/helpers/constants/constants.ts | Removed cache configuration constants for tunnels, drivers, and table structures that are no longer used |
| backend/src/helpers/cache/cacher.ts | Removed unused cache instances and methods for Knex, tunnels, drivers, and table structures; simplified clearAllCache method |
| shared-code/package.json | Added node-gyp as direct dependency and updated version in packageExtensions for ibm_db |
| yarn.lock | Reflects the dependency changes from backend and shared-code package updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "mongodb": "^6.20.0", | ||
| "mysql2": "^3.15.3", | ||
| "nanoid": "^5.1.6", | ||
| "node-gyp": "^11.5.0", |
There was a problem hiding this comment.
Adding node-gyp as a direct dependency is redundant and may cause version conflicts. The node-gyp dependency is already managed through packageExtensions for ibm_db (lines 6-11), which is the package that actually needs it. Since ibm_db is listed as an optional dependency (line 44), adding node-gyp as a direct dependency creates unnecessary coupling and potential version management issues.
Consider removing this line and relying solely on the packageExtensions configuration to provide node-gyp to ibm_db.
| "node-gyp": "^11.5.0", |
No description provided.