Repository navigation
refactor: Replace deprecated mongodb-runner with @mongodb-js/mongodb-runner 8.4.3 - #966
Conversation
|
🚀 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
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. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Replace the runner dependency package.json |
Adds @mongodb-js/mongodb-runner 8.4.3 and removes mongodb-runner 6.8.3 from development dependencies. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Possibly related PRs
- parse-community/parse-server-example#915: Updates the
mongodb-runnerdevelopment dependency to version 6.8.3, the version replaced here. - parse-community/parse-server-example#856: Updates the same development dependency and its downloader requirement.
- parse-community/parse-server-example#826: Updates the same development dependency in
package.jsonandpackage-lock.json.
Merge Risk: 
Minimal · up to 658c4
-
The dependency replacement is ready to merge with no identified behavioral or operational risk.
Pre-merge checks: 
6
-
Full details: Security Check
-
Explanation
PASS. The PR changes only dependency manifests. It removes
mongodb-runner6.8.3 anddecompress4.2.1, and adds@mongodb-js/mongodb-runner8.4.3 with@mongodb-js/mongodb-downloader3.0.5,@xhmikosr/decompress11.1.4, andtar7.5.22. The new packages are marked development-only, use registry URLs with integrity hashes, and introduce no install scripts or source-code security patterns. The diff contains no application-code changes.
-
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.
Replaces the deprecated development dependency
mongodb-runner6.8.3 with its successor@mongodb-js/mongodb-runner8.4.3 (exact pin, latest release). The test scripts, the workflows andenginesare unchanged.mongodb-runneris deprecated on npm ("This package is not maintained anymore. Please use @mongodb-js/mongodb-runner instead"). It installsdecompress4.2.1 through@mongodb-js/mongodb-downloader1.1.16, anddecompresshas no patched release.@mongodb-js/mongodb-runner8.4.3 uses@mongodb-js/mongodb-downloader3.0.5, which replaceddecompresswith the maintained fork@xhmikosr/decompress. No copy ofdecompressremains in the lock file.Security
This resolves the following Dependabot alerts. They all concern a development dependency.
decompressremoved;@xhmikosr/decompress11.1.4 is the first patched 11.x releasedecompressremoved;@xhmikosr/decompress11.1.4 is newer than the first patched 11.x release 11.1.3decompressremoveddecompressremovedtarfrom 7.5.20 to 7.5.22, which is outside the range of the auto-dismissed alert 414 (GHSA-r292-9mhp-454m,tar<= 7.5.20).npm audit: 24 → 20 findings (critical 1 → 0, high 11 → 10, moderate 12 → 10). The removed findings aredecompress,tar,@mongodb-js/mongodb-downloaderandmongodb-runner. There are no new findings..tgzarchives for Linux and macOS withtar, and use the decompress library only for other formats, such as the Windows.zipbuilds. The vulnerable extraction code was therefore not reached in CI.Production and Docker impact
One production lock entry changes, without any code change:
@mongodb-js/saslprep1.4.12 → 1.6.1. Parse Server's ownmongodbdriver 7.1.0 (^1.3.0) uses this hoisted copy, and the new runner requires^1.6.1, so npm keeps a single copy at 1.6.1. The publisheddistfiles of 1.4.12 and 1.6.1 are byte-identical; onlypackage.jsonmetadata differs (version, repository URL format, development dependencies). Every deployment that installs from the lock file gets 1.6.1.end-of-streamstays at 1.4.4. Its only development dependent,tar-stream1.6.2, is gone, so its lock flag changes fromdevOptionaltooptional. It is still an optional dependency ofduplexifyand is still installed with--omit=dev, so what gets installed does not change.No other production entry changes.
The Docker image contains the development dependencies: the builder stage runs a full
npm install, and the final stage copies its wholenode_modules. After this PR,decompress4.2.1 is no longer in the image, and the new runner tree, including@aws-sdk/client-s3, is. None of it runs, since the image's command isnode index.js.Changes
Test scripts
pretestandposttestare unchanged. The new package installs the samemongodb-runnerbinary.--versionstill selects the MongoDB server version. Both 6.8.3 and 8.4.3 disable the built-in version flag ofyargs(.version(false)) and define--versionas a string option ("MongoDB server version to use").pretestscript, both versions parse to the commandstart, the topologystandalone, the version7.0.1and themongodarguments--port 27017.posttestparses tostopwith--allin both. This was checked with each runner's own CLI, with its start and stop functions intercepted so that no server was started.mongodb-download-url1.8.14 to@mongodb-js/mongodb-artifact-url2.0.4. Its version list and Linux distribution detection code are byte-identical. Its only logic changes concernlatest-alphabuilds and Linux arm64 detection.mongodb-linux-x86_64-ubuntu2204-7.0.1.tgz), macOS and Windows..tgzarchive withtarinto a directory with the same name. New between 1.1.16 and 3.0.5: a failed HTTP response raises an error instead of a failed extraction, and the debug output shows the download progress.Node.js versions
engines.node(>=18.20.4 <19.0.0 || >=20.18.0 <21.0.0 || >=22.12.0 <23.0.0) is unchanged. The runner is a development dependency and does not run in deployments.^20.19.0 || ^22.12.0 || >=23(yargs18.2.0) and>=20.19.0(the runner'smongodb7.5.0). The current 6.8.3 tree has the same requirements (yargs18.0.0 and the samemongodb7.5.0), so this PR does not raise them. Node.js 18 and 20.18, whichengines.nodeallows, could not run the test scripts before either.require(esm), which Node.js enables by default from 20.19.0 and 22.12.0. As before, the CLI loads the ESM-onlyyargs18 withrequire(). In addition, the downloader 3.0.5 loads the ESM-only@xhmikosr/decompress11.1.4 with a top-levelrequire().npm test.Lock file
All added and removed entries are development-only, and no added entry has an install script. Every changed entry belongs to the dependency tree of the removed or the added runner. Every version change is required by a range in the new tree, except the two listed under "Not required by a range".
mongodb-runner6.8.3 and its ownyargs18.0.0 treedecompress4.2.1, withdecompress-tar,decompress-tarbz2,decompress-targz,decompress-unzipand their helpersmongodb-download-url1.8.14@mongodb-js/mongodb-runner8.4.3 with its ownyargs18.2.0 tree@xhmikosr/decompress11.1.4 and its plugins, with the dependencies offile-type21,tar-stream3 andstrip-dirs3@mongodb-js/mongodb-artifact-url2.0.4@aws-sdk/client-s33.1158.0, which the 3.x downloader uses fors3://URLs, with 16 other@aws-sdk/*packages, 6@smithy/*packages,@aws/lambda-invoke-storeandbowser@peculiar/asn1-asym-keyand@peculiar/asn1-x509-post-quantum2.11.1, new dependencies of@peculiar/x5092.2.0@mongodb-js/mongodb-downloader1.1.16 → 3.0.5@mongodb-js/oidc-mock-provider0.13.13 → 0.13.20, with its nestedyargs18.0.0 → 18.2.0 andstring-width7.2.0 → 8.3.0@peculiar/x5092.0.0 → 2.2.0 and the@peculiar/asn1-*packages 2.8.0 → 2.11.1file-type5.2.0 → 21.3.4,seek-bzip1.0.6 → 2.0.0 (itscommander2.20.3 → 6.2.1),strip-dirs2.1.0 → 3.0.0,tar-stream1.6.2 → 3.1.7,yauzl2.10.0 → 3.4.0tar7.5.20 → 7.5.22@mongodb-js/saslprep1.4.12 → 1.6.1 (production entry, see above)get-east-asian-width1.4.0 → 1.7.0: required by the newstring-width8.3.0 (^1.5.0); thestring-widthofsemantic-release(^1.0.0) uses it as well--prefer-dedupeproduce the same versions. Both are development-only.asn1js3.0.10 → 3.1.0. Its direct parents, the@peculiar/asn1-*packages, were updated from 2.8.0 or newly added at 2.11.1, and all of them accept^3.0.10.asn1js3.1.0 then requirespvutils1.1.5 → 1.2.0.ansi-regex6.2.2 → 6.4.0 under@mongodb-js/oidc-mock-provider. Its direct parent,strip-ansi7.2.0, is unchanged and requires^6.2.2. Only its ancestors changed:@mongodb-js/oidc-mock-provider0.13.13 → 0.13.20, with its nestedyargs18.0.0 → 18.2.0 andstring-width7.2.0 → 8.3.0.get-stream9.0.1, which@xhmikosr/decompress-unzipneeds, is now hoisted. The nested copy of the same version under@semantic-release/npmis deduplicated into it.mongodb7.5.0, Parse Server'smongodb7.1.0,bson7.3.1 andmongodb-connection-string-url7.0.2.@mongodb-js/mongodb-runner(formerlymongodb-runner) 6.8.3 → 8.4.3mongodb-js/devtools-shared publishes no release notes for this package, so these entries come from the commit history of
packages/mongodb-runner. Versions not listed contain only dependency or release tooling updates.mongodbdriver 7.5 or later.MONGODB_RUNNER_DOWNLOAD_DIRenvironment variable as a fallback download directory.@mongodb-js/mongodb-runner.@mongodb-js/mongodb-downloaderto 2.0.0. The runner's CLI and API are unchanged.mongodb^7.6.0,mongodb-connection-string-url^7.0.2,yargs^18.2.0and@peculiar/x509^2.1.0. Its@mongodb-js/mongodb-downloader2.0.3 raisestarto^7.5.22.@mongodb-js/mongodb-downloader3, which supportss3://download URLs.mongodbdriver range to^7.5.0for MongoDB 4.2 compatibility.--auth, and cleans up after a failed start.mongodbdriver to~7.5.0.--jsonoutput tostartandls. The default output is unchanged.--slsDirto locate the DSC directory.@mongodb-js/mongodb-downloader3.0.3, which replacesdecompresswith@xhmikosr/decompress.@mongodb-js/mongodb-downloader3.0.5. It resolves download URLs with@mongodb-js/mongodb-artifact-url, the renamedmongodb-download-url.@mongodb-js/mongodb-downloader1.1.16 → 3.0.5--downloadUrl.tarto^7.5.22.s3://URLs through the AWS SDK.http(s)://URLs still usenode-fetch.decompresswith@xhmikosr/decompress.@mongodb-js/mongodb-artifact-url2, the renamedmongodb-download-url.Main upstream changes: mongodb-js/devtools-shared#856 (download directory variable), mongodb-js/devtools-shared#896 (dependency ranges), mongodb-js/devtools-shared#900 (
s3://downloads), mongodb-js/devtools-shared#909 (cleanup after a failed start), mongodb-js/devtools-shared#927 (@xhmikosr/decompress) and mongodb-js/devtools-shared#932 (@mongodb-js/mongodb-artifact-url).Breaking Changes
None. The runner is a development dependency, and the test scripts work unchanged.
Code Changes Required
None. Only
package.jsonandpackage-lock.jsonchange.Verification
npm ci --ignore-scriptssucceeds with the new lock file (Node.js 22.19.0).npx mongodb-runner start --helplists--versionas "MongoDB server version to use".npm test.Summary by CodeRabbit