Skip to content

refactor: Replace deprecated mongodb-runner with @mongodb-js/mongodb-runner 8.4.3 - #631

Merged
mtrezza merged 2 commits into
parse-community:masterfrom
mtrezza:refactor/mongodb-runner-8.4.3
Oct 27, 2026
Merged

mtrezza merged 2 commits into
parse-community:masterfrom
mtrezza:refactor/mongodb-runner-8.4.3

Conversation

@mtrezza

@mtrezza mtrezza commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Replaces the deprecated devDependency mongodb-runner 6.7.3 with its maintained successor @mongodb-js/mongodb-runner 8.4.3 (exact pin). The old package is deprecated on npm with "This package is not maintained anymore. Please use @mongodb-js/mongodb-runner instead".

Security

mongodb-runner 6.7.3 pulls in decompress 4.2.1 via @mongodb-js/mongodb-downloader 1.1.9. There is no patched decompress release. This change resolves these Dependabot alerts (dev-only, no production impact):

Alert Advisory Severity Summary
363 GHSA-mp2f-45pm-3cg9 Critical Archive extraction can create files and links outside of the target directory
406 GHSA-hrh2-vp3x-79xf Critical Path traversal via symlink chain
378 GHSA-h39j-r5qq-r9mm Moderate Arbitrary file write via archive extraction (Zip Slip)
396 GHSA-jwp9-9v96-94mx Moderate Arbitrary hardlink creation during archive extraction
  • @mongodb-js/mongodb-runner 8.4.3 uses @mongodb-js/mongodb-downloader 3.0.5, which replaced decompress with the maintained @xhmikosr/decompress (fix(mongodb-downloader): replace decompress with maintained @xhmikosr/decompress mongodb-js/devtools-shared#927).
  • The lock file resolves @xhmikosr/decompress 11.1.4. GHSA-mp2f-45pm-3cg9 (alert 363) is fixed since @xhmikosr/decompress 11.1.3 and GHSA-hrh2-vp3x-79xf (alert 406) since 11.1.4, so 11.1.4 is the first version that fixes both. No decompress entry remains in the lock file.
  • npm audit: 25 → 22 findings, critical 1 → 0, no new findings.
  • The downloader only calls the decompress library for non-tar archives (.zip, the Windows MongoDB builds). On Linux and macOS, including CI, the MongoDB .tgz archive is extracted with tar in both the old and new version, so the vulnerable extraction code was not reached in CI.

Changes

Dependency swap (package.json, package-lock.json)

  • The new package provides the same mongodb-runner bin, so the test:mongodb:runnerstart and test:mongodb:runnerstop scripts are unchanged:
    • -t is still the alias of --topology, and stop --all is unchanged.
    • Arguments after -- are still passed to mongod; --port 27017 replaces the default --port 0.
  • The default MongoDB server version (*, the latest stable release) resolves the same way. The URL resolver was renamed from mongodb-download-url to @mongodb-js/mongodb-artifact-url (chore: rename mongodb-build-info, mongodb-ns, mongodb-redact and mongodb-download-url (to mongodb-artifact-url) to @mongodb-js scope COMPASS-11197 mongodb-js/devtools-shared#932). Its only logic changes concern latest-alpha builds and Linux arm64 detection.
  • Parse Server's own mongodb driver is unchanged (7.1.0). The runner gets its own nested mongodb 7.5.0.
  • The downloader's new @aws-sdk/client-s3 dependency is satisfied by the existing @aws-sdk/client-s3 3.1151.0, which is unchanged.
  • Shared transitive packages bumped within their existing ranges (dev-only):
    • @mongodb-js/saslprep 1.4.6 → 1.6.1: no runtime code change (type declaration and package metadata only).
    • mongodb-connection-string-url 7.0.1 → 7.0.2: error messages no longer include the connection string, and connection strings with an @ after the host list are rejected. The test connection string mongodb://127.0.0.1:27017/s3-adapter is unaffected.
    • graceful-fs 4.2.6 → 4.2.11: EMFILE/ENFILE retry queue with backoff and a 60 s timeout, guards for missing fs functions, Windows rename retry on EBUSY.
    • get-east-asian-width 1.4.0 → 1.7.0: internal function rename with a compatibility alias, lookup data moved to a separate file.

CI (.github/workflows/ci.yml)

  • The Parse Server 8, Node.js 20 job moves from Node.js 20.18.0 to 20.19.0. This is functionally required:
    • The new runner depends on yargs 18, which is ESM-only ("type": "module", exports only index.mjs). The runner's CommonJS CLI loads it with require("yargs").
    • @mongodb-js/mongodb-downloader 3.0.5 loads the ESM-only @xhmikosr/decompress 11.1.4 ("type": "module", no CommonJS export, engines >=20) with a top-level require() in dist/index.js. The runner loads the downloader when the CLI starts, so this applies on every platform, not only when a .zip archive is extracted.
    • Both rely on require(esm), which Node.js enables by default only from 20.19.0 and 22.12.0. On 20.18.0, mongodb-runner start in pretest would fail with ERR_REQUIRE_ESM.
    • The runner's mongodb 7.5.0 dependency also requires Node.js >= 20.19.0.
  • All other test jobs already run on Node.js 20.19.0, 22.12.0 or 24.11.0, which satisfy the requirement.
  • The Lint job only runs npm ci and npm run lint and does not execute the runner. The release workflow uses Node.js 24.
  • engines.node in package.json is unchanged. The runner is a devDependency and does not affect consumers.

mongodb-runner 6.7.3 → @mongodb-js/mongodb-runner 8.4.3 (mongodb-js/devtools-shared, packages/mongodb-runner)

Breaking Changes

None

Code Changes Required

None in source code or test scripts. CI: the Node.js version of the Parse Server 8, Node.js 20 job is raised to 20.19.0, as described above.

Verification

  • npm ci --ignore-scripts succeeds with the new lock file.
  • npx mongodb-runner --help works (Node.js 22.19.0).
  • Argument parsing of start -t standalone -- --port 27017 and stop --all verified with the installed yargs 18.2.0.
  • MongoDB start and stop are exercised by the CI test jobs.

Summary by CodeRabbit

  • Chores
    • Updated the automated test environment to use Node.js 20.19.0.
    • Refreshed the MongoDB testing tools and their supporting dependencies. These maintenance updates do not change user-facing functionality.

@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a8c249b3-342e-4685-80f7-dd3576f4dd84
Commits

Reviewing files that changed from the base of the PR and between ea4adac and d1ec7e7.

Files selected for processing: 3
  • .github/workflows/ci.yml
  • package-lock.json
  • package.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Walkthrough

The pull request replaces the MongoDB test runner development dependency and updates its lockfile dependency records. It also changes the Parse Server 8 / Node.js 20 CI matrix entry to Node.js 20.19.0.

Changes: Test tooling and CI

Layer / File(s) Summary
MongoDB runner dependency update
package.json, package-lock.json
The development dependency changes from mongodb-runner 6.7.3 to @mongodb-js/mongodb-runner 8.4.3. The lockfile updates the MongoDB runner tooling records.
Related lockfile dependency updates
package-lock.json
The lockfile adds, removes, and updates transitive packages, including file-type, decompression, tokenizer, stream, and ASN.1 packages.
CI Node.js matrix version
.github/workflows/ci.yml
The Parse Server 8 / Node.js 20 matrix entry changes from Node.js 20.18.0 to 20.19.0.

Priority: Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Merge Risk: Minimal · up to d1ec7

The dependency and CI updates appear ready to merge after normal checks.

Pre-merge checks: Passed 6
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title begins with the allowed refactor: prefix. It clearly describes replacing mongodb-runner with @mongodb-js/mongodb-runner 8.4.3, and the first word after the prefix is capitalized.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Check Passed No security vulnerability is introduced by the pull request. The diff changes only development dependencies, the lockfile, and one CI Node.js version. All 106 changed lockfile package entries are deve…
Engage In Review Feedback Passed No review feedback comments were returned, and the current review produced zero actionable findings. Therefore, there is no feedback that the contributor ignored or resolved without prior engagement.
Full details: Security Check

Explanation

No security vulnerability is introduced by the pull request. The diff changes only development dependencies, the lockfile, and one CI Node.js version. All 106 changed lockfile package entries are development-only. The old decompress package and its four archive-extraction advisories are removed. A direct npm audit --package-lock-only comparison reports 25 to 22 findings and 1 to 0 critical findings, with no new advisory in the updated dependency tree.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.77%. Comparing base (ea4adac) to head (d1ec7e7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #631   +/-   ##
=======================================
  Coverage   97.77%   97.77%           
=======================================
  Files           2        2           
  Lines         225      225           
=======================================
  Hits          220      220           
  Misses          5        5           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mtrezza
mtrezza merged commit 63048b7 into parse-community:master Oct 27, 2026
13 checks passed
@mtrezza
mtrezza deleted the refactor/mongodb-runner-8.4.3 branch October 27, 2026 21:19
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.

1 participant