Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
get-mongodb-version
Advanced tools
Lookup download URL's for MongoDB versions.
# For general utility, install globally
npm install -g get-mongodb-version
# If including in another module, install locally
npm install get-mongodb-version
Usage: get-mongodb-version
Get the MongoDB version for a path or uri.
Usage:
get-mongodb-version
# /usr/bin/env mongod --version
get-mongodb-version /usr/local/bin/mongod
# /usr/local/bin/mongod --version
get-mongodb-version localhost:27017
# Connects to mongodb://localhost:27017
# and prints db.admin().serverInfo().version
get-mongodb-version mongodb://my.mongodb.com:27017/mydb
# Connects to mongodb://my.mongodb.com:27017/mydb
# and prints db.admin().serverInfo().version
Options:
-h --help Show this screen.
--version Show version.
var getMongodbVersion = require('get-mongodb-version');
getMongodbVersion(opts, function done (err, version) { })
opts
- mongodb.Db
If opts
is the result of require('mongodb').connect(function(err, db){})
,
the version will be pulled from db.admin().serverInfo().version
path
- File Path to mongod
path
- mongodb uri
err
- Error
Contains errors if any.
version
- String
The version discovered.
Apache 2.0
FAQs
Get the MongoDB version for a path or uri.
We found that get-mongodb-version demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 46 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.