Migrating from npm-check
npm-check reports unused dependencies and out-of-date packages, with an interactive updater. rev-dep replaces its unused-dependency analysis and adds checks npm-check doesn't have.
Why migrate​
- npm-check is effectively unmaintained (last release 2021). rev-dep is actively developed.
- Speed. rev-dep is Go-based and runs in a single parallel pass - faster on large repos.
- More than unused deps. rev-dep also detects missing dependencies, dev-deps in production, unused exports, orphan files, and architecture rules.
What carries over, what changes​
- Covered well: unused dependencies.
- Out of scope - version updates. npm-check's main extra feature is checking for outdated packages and updating them interactively (
-u). rev-dep does not manage versions; keepnpm outdatedornpm-check-updatesfor that. - Bonus: rev-dep adds missing-dependency detection, which npm-check does not focus on.
Feature mapping​
| npm-check | rev-dep |
|---|---|
| unused dependencies | unusedNodeModulesDetection |
-i, --ignore <glob> | excludeModules |
-p, --production (skip devDependencies) | enable checks on production entry points; see dev-deps in production |
-u / -y (update outdated packages) | - (out of scope; use npm outdated / npm-check-updates) |
| - | missingNodeModulesDetection |
Translating your usage​
npm-check
npm-check --ignore "@types/*"
become a rev-dep.config.jsonc:
{
"rules": [
{
"path": ".",
"unusedNodeModulesDetection": {
"enabled": true,
"excludeModules": ["@types/*"]
},
"missingNodeModulesDetection": {
"enabled": true
}
}
]
}
Tooling-only packages that aren't imported (CLIs, plugins) can be pointed to with pkgJsonFieldsWithBinaries / filesWithBinaries / filesWithModules rather than excluded - see unused node modules.
Running it​
# npm-check
npx npm-check
# rev-dep
rev-dep config run
Next steps​
- Missing or unused dependency false positives - especially important in monorepos.
- Monorepo integration guide.