chore(deps): remove unused joi and sequelize dependencies#3444
chore(deps): remove unused joi and sequelize dependencies#3444PierreBrisorgueil merged 2 commits intomasterfrom
Conversation
Drop the sequelize package, delete dead files (lib/helpers/joi.js, lib/services/sequelize.js, tasks.model.sequelize.js), and clean up all references in config, jest, app bootstrap, and tests. Closes #3443
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 14 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis PR removes unused Joi and Sequelize dependencies from the codebase. It deletes Sequelize service and Joi helper files, removes Sequelize model files and related asset/config references, updates the bootstrap flow to exclude ORM initialization, and removes both Joi and Sequelize from package.json dependencies. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3444 +/- ##
==========================================
- Coverage 85.58% 85.58% -0.01%
==========================================
Files 113 113
Lines 2879 2878 -1
Branches 796 796
==========================================
- Hits 2464 2463 -1
Misses 329 329
Partials 86 86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Removes legacy/unused Sequelize + Joi-related code and references to reduce dependency footprint now that the stack is MongoDB + Zod only.
Changes:
- Remove
sequelizefrom dependencies (and prune related transitive packages from the lockfile). - Delete dead Sequelize/Joi helper/model files and strip remaining bootstrap/config/test references.
- Update asset/config/test expectations and development metadata to reflect Mongo-only support.
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Drops Sequelize from dependencies and removes Sequelize from package metadata. |
| package-lock.json | Prunes Sequelize and related transitive packages from the lockfile. |
| lib/app.js | Removes the (commented) Sequelize bootstrap path and stops returning orm. |
| lib/helpers/config.js | Stops generating files.sequelizeModels during config initialization. |
| config/assets.js | Removes the sequelizeModels glob from the assets map. |
| config/defaults/development.config.js | Removes Sequelize mention in app metadata and deletes commented ORM config block. |
| jest.config.js | Removes Jest exclusions that referenced deleted Sequelize/Joi files/patterns. |
| modules/core/tests/core.unit.tests.js | Updates expected assets keys to no longer include sequelizeModels. |
| modules/users/services/users.service.js | Updates an inline comment to reference Zod instead of Joi. |
| lib/services/sequelize.js | Deletes the unused (commented) Sequelize service file. |
| lib/helpers/joi.js | Deletes the deprecated Joi extension helper file. |
| modules/tasks/models/tasks.model.sequelize.js | Deletes the dead Sequelize model stub. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@lib/app.js`:
- Around line 41-43: The JSDoc for the bootstrap function uses "@return" instead
of the required "@returns"; update the JSDoc block for the bootstrap function in
lib/app.js to use "@returns {Object} db and app instances" (or equivalent) and
ensure the function's JSDoc header includes both required tags (e.g., "@param"
entries if any and the corrected "@returns") so it conforms to the repository
guideline; locate the doc block immediately above the bootstrap function
declaration to make the change.
In `@modules/core/tests/core.unit.tests.js`:
- Line 59: The test updated expected asset keys to remove 'sequelizeModels' but
the configuration loader still includes 'sequelizeModels' in the fileKeys list;
update the config loading logic by removing 'sequelizeModels' from the fileKeys
array and any associated processing paths so the loader no longer expects or
processes Sequelize assets (search for the symbol 'fileKeys' and remove
references to 'sequelizeModels'), and ensure no other functions or branches
reference 'sequelizeModels' (e.g., cleanup any handlers or conditionals that
mention 'sequelizeModels') so the test and runtime match.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9bb82b18-2aa3-418a-b59c-cebd0ada4f64
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (11)
config/assets.jsconfig/defaults/development.config.jsjest.config.jslib/app.jslib/helpers/config.jslib/helpers/joi.jslib/services/sequelize.jsmodules/core/tests/core.unit.tests.jsmodules/tasks/models/tasks.model.sequelize.jsmodules/users/services/users.service.jspackage.json
💤 Files with no reviewable changes (6)
- lib/helpers/config.js
- config/assets.js
- modules/tasks/models/tasks.model.sequelize.js
- jest.config.js
- lib/services/sequelize.js
- lib/helpers/joi.js
Summary
sequelizenpm package and deleted dead files (lib/helpers/joi.js,lib/services/sequelize.js,modules/tasks/models/tasks.model.sequelize.js). Cleaned up all references in config, jest exclusions, app bootstrap, and tests.Scope
lib/app.js,config/assets.js,config/defaults/development.config.js,lib/helpers/config.js,jest.config.js,modules/core/tests,modules/users/servicesnonelowValidation
npm run lintnpm testGuardrails check
.env*,secrets/**, keys, tokens)Notes for reviewers
Summary by CodeRabbit
Release Notes