Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 218 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"description": "StarShop Backend API",
"dependencies": {
"@aws-sdk/client-s3": "^3.802.0",
"@nestjs/cache-manager": "^3.0.1",
"@nestjs/common": "^11.1.3",
"@nestjs/config": "^4.0.2",
"@nestjs/core": "^11.1.3",
Expand All @@ -50,10 +51,13 @@
"@types/bcryptjs": "^2.4.6",
"axios": "^1.7.9",
"bcryptjs": "^3.0.2",
"cache-manager": "^7.2.2",
"cache-manager-redis-yet": "^5.1.5",
Comment on lines +54 to +55
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

Critical: Incompatible cache-manager versions.

cache-manager ^7.2.2 is incompatible with cache-manager-redis-yet ^5.1.5. The latter is a legacy store adapter for cache-manager v5, while v7.x has migrated to Keyv-backed stores.

This will cause runtime failures when the Redis store attempts to register with cache-manager v7.

Based on learnings

Apply this diff to use compatible versions:

-    "cache-manager": "^7.2.2",
-    "cache-manager-redis-yet": "^5.1.5",
+    "cache-manager": "^5.7.6",
+    "cache-manager-redis-yet": "^5.1.5",

OR migrate to the modern Keyv-backed approach:

     "cache-manager": "^7.2.2",
-    "cache-manager-redis-yet": "^5.1.5",
+    "@keyv/redis": "^3.0.1",
+    "keyv": "^5.1.1",

Then update src/cache/cache.module.ts to use the Keyv Redis adapter instead of the legacy store.

πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"cache-manager": "^7.2.2",
"cache-manager-redis-yet": "^5.1.5",
// package.json, around lines 54–55
"cache-manager": "^5.7.6",
"cache-manager-redis-yet": "^5.1.5",
Suggested change
"cache-manager": "^7.2.2",
"cache-manager-redis-yet": "^5.1.5",
// package.json, around lines 54–55
"cache-manager": "^7.2.2",
"@keyv/redis": "^3.0.1",
"keyv": "^5.1.1",
πŸ€– Prompt for AI Agents
In package.json around lines 54-55, the project declares cache-manager ^7.2.2
and cache-manager-redis-yet ^5.1.5 which are incompatible; either replace the
redis adapter with a Keyv-backed store or align versions: Option A β€” change
package.json to use cache-manager ^5.x and keep cache-manager-redis-yet ^5.1.5
then run install and verify src/cache/cache.module.ts still registers the legacy
store; Option B (preferred) β€” remove cache-manager-redis-yet and add Keyv and
keyv-redis (and any Keyv typings), update package.json accordingly, then modify
src/cache/cache.module.ts to initialize Keyv with the Redis adapter (import
Keyv, import KeyvRedis, instantiate Keyv with the Redis adapter and connection
options) and replace cache-manager registration with the new Keyv-based cache
client, update any code that used cache-manager API to the Keyv API, run tests
and lint to ensure no runtime type errors.

"class-transformer": "^0.5.1",
"class-validator": "^0.14.2",
"cloudinary": "^1.41.3",
"dotenv": "^16.4.7",
"env-var": "^7.5.0",
"express": "^4.21.2",
"express-async-handler": "^1.2.0",
"express-rate-limit": "^7.5.0",
Expand Down
Loading