Skip to content

chore(NODE-7670): update dependencies - #5034

Open
PavelSafronov wants to merge 3 commits into
mainfrom
node-7670-update-dependencies
Open

chore(NODE-7670): update dependencies#5034
PavelSafronov wants to merge 3 commits into
mainfrom
node-7670-update-dependencies

Conversation

@PavelSafronov

@PavelSafronov PavelSafronov commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

Summary of Changes

Quarterly dependency update.

Covers:

  1. ci(deps): bump the prod-dependencies group across 1 directory with 3 updates #5031ci(deps): bump the prod-dependencies group across 1 directory with 3 updates
  2. ci(deps-dev): bump the development-dependencies group across 1 directory with 9 updates #5023ci(deps-dev): bump the development-dependencies group across 1 directory with 9 updates (except prettier, see below)
  3. chore(deps): bump actions/checkout from 6 to 7 #4985chore(deps): bump actions/checkout from 6 to 7
Production dependencies (3)
Package From To
@mongodb-js/saslprep ^1.4.11 ^1.5.0
bson ^7.2.0 ^7.3.2
mongodb-connection-string-url ^7.0.1 ^7.0.2

No peer dependency ranges were changed.

Development dependencies (17)
Package From To
@aws-sdk/credential-providers ^3.876.0 ^3.1117.0
@microsoft/api-extractor ^7.58.7 ^7.59.0
@types/chai-subset ^1.3.5 ^1.3.6
@types/mocha ^10.0.9 ^10.0.10
@types/node ^22.15.3 ^22.20.1
@types/semver ^7.7.0 ^7.8.0
@typescript-eslint/eslint-plugin ^8.60.1 ^8.68.0
@typescript-eslint/parser ^8.31.1 ^8.68.0
esbuild ^0.28.0 ^0.28.2
eslint ^9.39.1 ^9.39.5
eslint-plugin-mocha ^10.4.1 ^10.5.0
js-yaml ^4.2.0 ^4.3.1
mocha ^11.7.6 ^11.8.0
mongodb-client-encryption ^7.2.0 ^7.2.1
semver ^7.7.2 ^7.8.5
socks ^2.8.7 ^2.8.9
yargs ^18.0.0 ^18.1.0
GitHub Actions

actions/checkout v6 -> v7 across 13 call sites in 11 workflows. The only behavioral
change in v7 is that it blocks checking out fork PRs for pull_request_target and
workflow_run; this repo uses neither trigger, so the change is a no-op for us.

Dependabot config fixes

Five ignore rules in .github/dependabot.yml no longer matched their stated intent:

  • chai was pinned at >=5.0.0 but we are already on chai 5 (NODE-7473 closed), so
    all chai updates including patches were blocked. Now >=6.0.0.
  • sinon-chai had the same problem at >=4.0.0 while we are on ^4.0.1. Now >=5.0.0.
  • @types/chai is no longer a direct dependency (only transitive via
    @types/chai-subset), so the rule was dead. Removed.
  • mocha-plugin-eslint does not exist in our dependency tree — the real package is
    eslint-plugin-mocha. The rule never took effect, which is why dependabot was able to
    open chore(deps-dev): bump eslint-plugin-mocha from 10.5.0 to 11.3.0 #4812 bumping it to 11.3.0. Renamed and scoped to >=11.0.0, referencing
    NODE-7616 / NODE-7615.
  • sinon was set to ["18.x"], which ignores the 18 line and allows 19+ — the inverse
    of the comment's intent. Now >=19.0.0, keeping NODE-3773 blocked.

Also added an ignore rule for github/codeql-action under the github-actions
ecosystem. We track the floating v4 tag on GitHub's own
recommendation, so patch-level pins like #5014 should not be proposed. Major updates are still
surfaced. This supersedes #5014, which can be closed with a plain
close once this lands — no @dependabot ignore command needed, which avoids leaving
hidden ignore state in Dependabot's central store.

Notes for Reviewers

prettier is deliberately held at 3.6.2. The dev-dependency group PR includes
prettier 3.6.2 -> 3.9.6, which reformats the codebase: 92 prettier/prettier errors
across src/operations/list_collections.ts, src/sdam/monitor.ts, src/sdam/topology.ts,
src/sort.ts, src/utils.ts, and test/tools/unified-spec-runner/schema.ts, mostly
union-type wrapping. Per the ticket AC, reformatting must be a separate PR and only if the
team agrees it is worth it. Holding prettier back makes lint clean.

Descoped, tracked elsewhere:

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

Quarterly dependency refresh for the driver on main (subtask of NODE-7669).

- 3 production and 17 development dependencies updated to the latest
  semver-compatible versions. No peer dependency ranges changed.
- actions/checkout v6 -> v7 across 13 call sites. The only behavioral change
  in v7 blocks fork-PR checkout for pull_request_target and workflow_run;
  this repo uses neither trigger.
- prettier held at ^3.6.2. 3.9.6 reformats the codebase (92 prettier/prettier
  errors across 6 files), which the AC requires be done in a separate PR only
  if the team agrees it is worthwhile.
- Fixed five dependabot ignore rules that no longer matched their stated
  intent: chai and sinon-chai were pinned at versions we already ship, so all
  updates including patches were blocked; @types/chai is no longer a direct
  dependency; mocha-plugin-eslint named a package absent from our tree (the
  real one is eslint-plugin-mocha), so the rule never took effect; and sinon
  used "18.x", which ignores the 18 line and allows 19+, inverting the intent
  recorded in its comment.
- Added a github-actions ignore rule for github/codeql-action so we keep
  tracking the floating v4 tag per GitHub's recommendation instead of being
  pinned to an exact patch.

Supersedes #5031, #5023 (except prettier), #4985 and #5014.
@PavelSafronov
PavelSafronov marked this pull request as ready for review August 25, 2026 18:28
@PavelSafronov
PavelSafronov requested a review from a team as a code owner August 25, 2026 18:28
Copilot AI lite review requested due to automatic review settings August 25, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Quarterly dependency refresh for the MongoDB Node.js driver, updating a small set of production/runtime dependencies plus several dev-tooling dependencies, and aligning GitHub automation (workflows + Dependabot rules) with the intended maintenance strategy.

Changes:

  • Bumped runtime dependencies: @mongodb-js/saslprep, bson, and mongodb-connection-string-url.
  • Bumped dev dependencies (lint/build/test tooling and helpers), while pinning prettier to 3.6.2 to avoid repo-wide reformat churn.
  • Updated GitHub Actions workflow checkouts to actions/checkout@v7 and fixed/clarified Dependabot ignore rules (including ignoring github/codeql-action 4.x patch pins while still surfacing major updates).

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updates runtime + dev dependency versions; pins prettier to 3.6.2.
package-lock.json Regenerated lockfile to reflect updated dependency graph and resolved versions.
.github/workflows/sbom.yml Updates checkout action to v7 for SBOM workflow.
.github/workflows/release.yml Updates checkout action to v7 in release workflows.
.github/workflows/release-nightly.yml Updates checkout action to v7 in nightly release workflow.
.github/workflows/release-alpha.yml Updates checkout action to v7 in alpha release workflow.
.github/workflows/release-5.x.yml Updates checkout action to v7 in 5.x release workflow.
.github/workflows/release_notes.yml Updates checkout action to v7 in release notes workflow.
.github/workflows/npm-publish.yml Updates checkout action to v7 in publish workflow.
.github/workflows/dependencies.yml Updates checkout action to v7 in dependency-check workflow.
.github/workflows/codeql.yml Updates checkout action to v7 in CodeQL workflow.
.github/workflows/build_docs.yml Updates checkout action to v7 in docs build workflow.
.github/workflows/build_and_commit_docs.yml Updates checkout action to v7 in docs build+commit workflow.
.github/dependabot.yml Fixes/clarifies ignore rules; adds github/codeql-action 4.x ignore under github-actions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@johnmtll johnmtll self-assigned this Aug 25, 2026
@johnmtll johnmtll added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Aug 25, 2026
Comment thread .github/dependabot.yml Outdated
Comment on lines 32 to 33
# sinon-chai 5.x+ is not yet evaluated against our chai version.
- dependency-name: "sinon-chai"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"not yet evaluated against our current chai version"

This comment is a little misleading I think. There is no release of sinon-chai v5. I suggest we remove this rule. If this is intended to guard against incompatibility we can discover that when they release v5 and dependabot opens a PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup, oversight, removed.

Comment thread .github/dependabot.yml Outdated
Comment on lines 29 to 30
# NODE-7473 moved us to chai 5; chai 6 is not yet evaluated.
- dependency-name: "chai"

@johnmtll johnmtll Aug 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

chai 6 is not yet evaluated

This seems like a strange ignore. 'Not yet evaluated' implies that there will be an effort at some point to do so, and a dedicated ticket is the prompt to do so if we're ignoring. Ideally shouldn't we discover whether or not going from v5->v6 in a dependency update cycle actually introduces enough complexity to warrant a dedicated ticket? With this rule we'll need to proactively evaluate it, whereas a future dependabot PR will prompt that evaluation within scope of a future dependency update cycle ticket. I suggest we remove this rule.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed, next month we should get a dependabot update for chai 6, can start investigating the upgrade then.

Comment thread .github/dependabot.yml
Comment on lines +16 to +23
ignore:
# We intentionally track the floating v4 tag so CodeQL CLI updates and
# server-side flag changes are picked up automatically. Pinning to an exact
# patch makes this a recurring manual chore and risks breaking when a
# server-side flag is removed. Major bumps are still surfaced; update this
# range when we move to v5.
- dependency-name: "github/codeql-action"
versions: ["4.x"]

@johnmtll johnmtll Aug 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This reasoning regresses when https://jira.mongodb.org/browse/NODE-7720 is worked. Assuming we're being unversal with the rule and even applying it to first-party action providers. Can we get a comment on here calling out that this ignore rule should be removed when that task is actioned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment updated, now references NODE-7721, which will need to delete the codeql rule.

- Remove the chai and sinon-chai ignore rules. sinon-chai has no v5 release, so
  that rule guarded a version that does not exist. chai 6 has no tracking ticket,
  so ignoring it deferred the decision with nothing to surface it again; letting
  dependabot open the major-bump PR is what prompts evaluation during a future
  dependency update cycle, per our practice of handling majors in those cycles.
- Note on the github/codeql-action rule that it must be removed when NODE-7721
  pins our actions to commit SHAs. That work makes tag mutability the thing we
  are defending against rather than something we rely on, and dependabot needs to
  stay free to advance the pinned SHA.

This leaves every remaining versioned ignore rule pointing at a ticket that will
surface the decision again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants