
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imTokenโs import flow to capture mnemonics and private keys.
codependence
Advanced tools
Checks `codependencies` in package.json files to ensure dependencies are up-to-date ๐คผโโ๏ธ
Codependence is a JavaScript utility CLI or node tool for checking specified dependencies in a project to ensure dependencies are up-to-date or match a specified version within package.json file(s).
package.json's dependencies based on a "codependencies" array of dependency names~ or ^ versions) in package.json fileslatest, or manually pinning, or using a tool like Dependabot's ignore spec within a dependabot.yml. โ๐ญ ย Synopsis | ๐ ย Usage | ๐ฆ ย Install | ๐ ย Quick Setup | ๐ย CLI | ๐ฉย Node
โ๏ธ ย Options | ๐คผโโ๏ธ ย Codependencies | ๐ย Codependencies Array
๐ผ ย Demos | ๐ ย Debugging | ๐ค ย Contributing | ๐บ ย Roadmap
Codependence is a JavaScript utility CLI and node tool that compares a codependencies array against package.json dependencies, devDependencies, and peerDependencies for *codependencies. For each dependency included in the array, Codependence will either a) check that versions are at latest or b) check that a specified version is matched within package.json files. Codependence can either return a) a pass/fail result or b) update dependencies, devDependencies, and peerDependencies, in package.json file(s).
This utility is useful for ensuring specified dependencies are up-to-dateโor at a specified version within a project's package.json files(s)!
This utility is built to work alongside dependency management tools like dependabot. It could work instead of dependency management tool but is built for managing specific dependency versions vs all dependencies.
In example, if your repository requires the latest version and latest can't be specified as the dependency version within your package.json, Codependence will ensure your package.json has the actual latest semver version set in your package.json. It can/will do the same if an exact version is specified!
Codependence can be used as a standalone CLI, in npm scripts or as node utility.
npm install codependence --save-dev
Pure CLI quick run
codependence --condependencies 'fs-extra' 'lodash'
Or use with a config in the root package.json file
{
"codependence": {
"condependencies": ["fs-extra", "lodash"]
},
"scripts": {
"update-codependencies": "codependence --update",
"prepare": "npm run update-codependencies"
}
}
Codependence is built as a CLI first, set-it and forget-it tool.
It is recommended to install and setup Codependence as a devDependency within your root package.json using a codependence.codependencies array to define code you need to keep updated or specced to a specific version.
Usage: program [options]
Codependency, for code dependency. Checks `codependencies` in package.json files to ensure dependencies are up-to-date
Options:
-f, --files [files...] file glob pattern
-u, --update update dependencies based on check
-r, --rootDir <rootDir> root directory to start search
-i, --ignore [ignore...] ignore glob pattern
--debug enable debugging
--silent enable mainly silent logging
-cds, --codependencies [codependencies...] a path to a file with a codependenies object
-c, --config <config> accepts a path to a config file
-s, --searchPath <searchPath> a search path string for locationing config files
-h, --help display help for command
Although, Codependence is built to primarily be a CLI utility, it can be used as a node utility.
import codependence from 'codependence';
const checkForUpdate = async () => {
const isLatest = await codependence({ codependencies: ['fs-extra', 'lodash'] });
if (!isLatest) {
console.log('This repo is update-to-date');
} else {
console.error('This repo is not update-to-date');
}
}
checkForUpdate();
Listed below are all the options which can be used with Codependence.
Options can be used via CLI options, a config file read from the CLI, or with node by passioning them into the exported functions. Read more below!
๐คผโโ๏ธ ย Codependenciesย | ๐ ย Filesย | ๐ฆท ย rootDirย | ๐ ย ignore
๐ ย debugย | ๐คซ ย silentย | โ๏ธ ย configย | ๐ฆ ย SearchPath
codependencies: Array<string | Record<string, string>A required option or config array! Codependencies are required via being passed in an array as a cli option **or as within a codependence.codependencies array.
undefinedCodependence provide options to enhance your capability to control dependency updates.
codependence --codependencies 'fs-extra' 'lodash'
{
"codependence": {
"codependencies": ["fs-extra", "lodash", { "foo": "1.0.0" }]
},
"scripts": {
"check-dependencies": "codpendence",
"prepare": "npm run check-dependencies",
"update-dependencies": "codependence --update",
"update": "npm run update-codependencies"
}
}
Codependence codependencies supports latest like so, ["fs-extra", "lodash"].
It will also match a specified version, like so [{ "foo": "1.0.0" }] and [{ "foo": "^1.0.0" }] or [{ "foo": "~1.0.0" }].
Codependence is built in to give you more capability to control your dependencies!
files: Array<string>An optional array of strings to check for package.json files to update.
['package.json']["package.json", "**/package.json"update: booleanAn optional boolean which defines whether Codependence should update dependencies in package.json's or not.
falserootDir: stringAn optional string which can used to specify the root directory to run checks from;
"./"ignore: Array<string>An optional array of strings used to specify directories to ignore
["node_modules/**/*", "**/node_modules/**/*"]debug: booleanAn optional boolean value used to enable debugging output
falsesilent: booleanAn optional boolean value used to enable a more silent developer experience
falseconfig: stringAn optional string containing a package to file which contains codependence config.
undefinedsearchPath: stringAn optional string containing a search path for location config files.
undefinedyarnConfig: booleanAn optional boolean value used to enable *yarn config checking
falseprivate packagesIf there is a .npmrc file, there is no issue with Codependence monitoring private packages. However, if a yarn config is used, Codependence must be instructed to run version checks differently.
--yarnConfig option.yarnConfig: true to your options or your config.Contributing is straightforward.
nvm install && npm install pnpm && pnpm install
Thank you!
Thanks to Dev Wells and Steve Cox for the aligned code leading to this project. Thanks Gabriel Diaz for working on the project which uses Codependence with me. Thanks to Will Jacobson for discussing the documentation and language of this project.
Made by @yowainwright for fun with passion! ๐
FAQs
Checks `codependencies` in package.json files to ensure dependencies are up-to-date ๐คผโโ๏ธ
The npm package codependence receives a total of 3,940 weekly downloads. As such, codependence popularity was classified as popular.
We found that codependence demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.ย It has 1 open source maintainer 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.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imTokenโs import flow to capture mnemonics and private keys.

Security News
Latioโs 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.