chore(idurar-erp-crm/backend): upgrade mongoose to latest 8.x (8.24.0)#711
Draft
augmentcode[bot] wants to merge 1 commit into
Draft
chore(idurar-erp-crm/backend): upgrade mongoose to latest 8.x (8.24.0)#711augmentcode[bot] wants to merge 1 commit into
augmentcode[bot] wants to merge 1 commit into
Conversation
Bumps mongoose from ^8.1.1 to ^8.24.0 in idurar-erp-crm/backend.
Adds an explicit mongoose.set('strictQuery', false) in the three entry points (server.js, setup/setup.js, setup/reset.js) to lock in the Mongoose 7+ default and avoid drift when newer majors flip behavior again.
No legacy connection options (useNewUrlParser, useUnifiedTopology, useCreateIndex, useFindAndModify) were present, so the connect() call is unchanged.
Author
|
👋 I've got this PR — here's what I'll handle for you:
Marking it ready and picking reviewers are your call — I'll leave both alone. Drop a comment anytime! |
Author
|
Started — view session to follow along. |
Author
|
All blocking gates are green on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades Mongoose to the latest 8.x in
idurar-erp-crm/backend:mongoose:^8.1.1→^8.24.0(resolved 8.24.0)mongoose.set('strictQuery', false)immediately before everymongoose.connect(...)call.Why
The project pinned a 17-month-old 8.1.1 range. Picking up the rest of the 8.x line brings bug fixes and MongoDB driver updates without crossing a major. Within 8.x there are no breaking changes that affect this codebase — the relevant ones (
Query#and()/or()/nor()argument validation,Model.findOneAndUpdatedefaults, etc.) only fire on invalid input the code does not produce.strictQuery / connection options
truetofalseand dropped the noisy 6.x deprecation warning. The project never set it explicitly, so it's been silently riding the default. To make the intent visible and immune to whatever Mongoose 9 chooses, every connect site now setsfalseexplicitly:src/server.jssrc/setup/setup.jssrc/setup/reset.jsuseNewUrlParser,useUnifiedTopology,useCreateIndex,useFindAndModifywere removed back in Mongoose 6. None of them appear in the codebase —mongoose.connect(process.env.DATABASE)is already the modern minimal form, so no further connect-option changes are needed.Verification
npm install mongoose@^8.24.0succeeds; lockfile updated.node -e "require('mongoose')"reports8.24.0.DATABASEURI exits cleanly withExpress running → On PORT : 8888and nostrictQuerydeprecation warning.Notes
github-app-apitool was available, so the PR shows as bot-created. Cosmos misconfiguration to fix on the operator side; no impact on the change itself.npm installsurfaced pre-existing warnings on unrelated packages (multer@1.4.4,shortid,html-pdf, etc.). Out of scope for this PR.Pull Request opened by Augment Code | View session