Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: extend mongodb compatibility to 6.x #473

Merged
merged 5 commits into from
Oct 14, 2023
Merged

chore: extend mongodb compatibility to 6.x #473

merged 5 commits into from
Oct 14, 2023

Conversation

saltire
Copy link
Contributor

@saltire saltire commented Aug 28, 2023

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Updates the mongodb dependency from v5.0.0 to v6.0.0.

I didn't see anything in the release notes to warrant changes to the code, so this PR just updates the MongoDB and Node versions, following the PR for v5.

  • Checklist:

  • [n/a] Added test cases

  • Updated changelog

@saltire
Copy link
Contributor Author

saltire commented Sep 1, 2023

@jdesboeufs @mingchuno

@saltire
Copy link
Contributor Author

saltire commented Sep 2, 2023

Added fix for failed build.

@saltire
Copy link
Contributor Author

saltire commented Sep 20, 2023

Looks like the build needs to be manually approved, any maintainer out there willing to run it? @jdesboeufs @mingchuno

@thuh-reflact
Copy link

Looks like the build needs to be manually approved, any maintainer out there willing to run it? @jdesboeufs @mingchuno

That would be great.... GOGOGO

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (d52dc41) 82.12% compared to head (60be051) 82.12%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #473   +/-   ##
=======================================
  Coverage   82.12%   82.12%           
=======================================
  Files           2        2           
  Lines         179      179           
  Branches       42       42           
=======================================
  Hits          147      147           
  Misses         21       21           
  Partials       11       11           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apydo
Copy link

apydo commented Sep 26, 2023

@MarkoCen, could you please approve it and merge ?

@jdesboeufs
Copy link
Owner

I will look at this.

@stefandesu stefandesu mentioned this pull request Sep 27, 2023
4 tasks
@krzysztof-cislo
Copy link

Any chance to merge this PR soon and create new release?

@jdesboeufs
Copy link
Owner

Since mongodb@6.0 introduces a big breaking change (findOneAndX not returning metadata by default), I'm not sure we should "force" having mongodb >= 6.0.

This module doesn't use specific mongodb@6.0 features. What do you think?

Copy link
Owner

@jdesboeufs jdesboeufs left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
I suggest some changes so we will be able to release a minor version quickly, and then we will release a major dropping old Node.js versions.

.github/workflows/sanity.yml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@saltire
Copy link
Contributor Author

saltire commented Oct 14, 2023

@jdesboeufs Thanks for reviewing! Implemented changes, please take a look.

@saltire
Copy link
Contributor Author

saltire commented Oct 14, 2023

Hmm do we have to drop Node 14 if we want to support mongodb v6?

@jdesboeufs
Copy link
Owner

jdesboeufs commented Oct 14, 2023

No but sanity workflow must be updated according to relaxed peer dependency.
I'm working on this!

Copy link
Owner

@jdesboeufs jdesboeufs left a comment

Choose a reason for hiding this comment

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

And to test against mongodb@6 I suggest you to add a new step in sanity.yml.
Something like this:

- run: yarn add mongodb@^6 && yarn test
  if: ${{ matrix.node-version !== '4.x' }}

package.json Outdated
@@ -58,7 +58,7 @@
},
"peerDependencies": {
"express-session": "^1.17.1",
"mongodb": "^5.1.0"
"mongodb": ">= 5.0.0 < 7"
Copy link
Owner

Choose a reason for hiding this comment

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

I made a mistake here

Suggested change
"mongodb": ">= 5.0.0 < 7"
"mongodb": ">= 5.1.0 < 7"

package.json Outdated
@@ -95,7 +95,7 @@
"gh-pages": "^3.1.0",
"husky": "4",
"lint-staged": "^10.5.4",
"mongodb": "^5.1.0",
"mongodb": "^6.0.0",
Copy link
Owner

Choose a reason for hiding this comment

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

Finally please let this part unchanged at the moment.

@jdesboeufs
Copy link
Owner

If you prefer I can finish. No problem with this :)

@saltire
Copy link
Contributor Author

saltire commented Oct 14, 2023

OK, updated. Not sure if the extra CI step is in the right place, let me know if it needs fixing.

.github/workflows/sanity.yml Outdated Show resolved Hide resolved
@jdesboeufs jdesboeufs changed the title chore: upgrade mongodb to 6.0.0 chore: extend mongodb compatibility to 6.x Oct 14, 2023
@jdesboeufs jdesboeufs merged commit c0e6255 into jdesboeufs:master Oct 14, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants