Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit

* initial investigation

* feature: remove fetching engines data

* update types

* add return type

* clean up

* more refactors


* change log message from fetching to parsing

* little tweaks

* remove console.time and missed rename

* remove asyncExec

* update CHANGELOG summary

* nit: little tweak

* remove old import

* use readFile instead of require

* handle error better

* even better error handling

* first tests

* use cwd var instead of calling again

* finish unit tests for depngn

* better coverage for getEngines

* add cli tests

* update CONTRIBUTING with test advice

* reorganize test dir

* move deps and managers funcs back to compatData

* update engines test

* add mock node_modules to gitignore

* fix import order

* add changes from depngn/39

* add new changes from depngn/37

* rename depngn dir to core

* fix imports

* add test for 'invalid' range

* merge fix

* update CHANGELOG

* typo

* move console.log mocks to before/after each

* add path aliases

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

depngn (short for dependency engine)

A CLI tool to find out if your dependencies support a given version of node. It fetches the engines field of your dependencies' package.json file and, if it's present, determines whether or not the version of node satisfies the range of supported versions.



npx depngn <node-version> [options]

# examples
npx depngn 10.0.0

npx depngn 14.17.6 --reporter=json

Node Version

depngn will accept any single value version of node as an argument (ie, not a range). If no version is given, it will attempt to determine your current node version and use that.


depngn supports these options:

  • --reporter
  • --help
  • --cwd


Specify the path where you want the check to be performed


These are the valid values for --reporter:

  • terminal (default): It will output a table to the terminal.
  • html: It will generate an HTML file named compat.html to the directory the command is executed in.
  • json: It will write a file named compat.json to the directory the command is executed in. It uses the following format:
[package_name]: {
  compatible: boolean // whether or not this package will work with the given Node version
  range: string // the range of supported Node versions

A Note on The Engines Field

The engines field in package.json is optional and many libraries don't include it. If that's the case, the output for that package will be:

  compatible: undefined,
  range: 'n/a'

Standalone Package

You can also import depngn as a standalone function to use in your own CLI tools. It takes an object as an argument:

interface Options {
  version: string;
  cwd: string | undefined;

And it returns a promise that resolves to:

type DepngnReturn = Record<string, CompatData>;

interface CompatData {
  compatible: boolean | 'invalid' | undefined;
  range: string;


import { depngn } from 'depngn';

const generateReport = async () => {
  return await depngn({ version: '10.0.0' });

There's also a chance there is an engines field specified in the package, but the range is invalid in some way. Since RegEx for SemVer can be tricky, we return the following, if that's the case:

  compatible: 'invalid',
  range: '1 .2 . 0not-a-valid-range'

Supported Package Managers

For now, this package supports npm and yarn. If you want support for your favorite package manager, feel free to open a PR!


In order to start contributing to depngn, you can follow these steps:


If you want to see what changed between versions:

Possible future features

  • Support the ability to sort and/or filter output
  • Ignore irrelevant dependencies (ie, @types/<package>)
  • Support all node versions (pretty sure this should work going back to node version 10, but if we wrote our own versions of some dependencies, we could support further back. the main offender is table (>=10.0.0), but a lot of modern cli table packages seem to only support node 10 or 12 and above).
  • Support attempting to determine support for dependencies that don't include engines field (not sure if it's worth it, since we'd have to fetch the engines of the dependency's dependencies and make an educated guess on what the supported version range is)
  • Support pnpm


A CLI tool to find out if your dependencies support a given version of node.




Code of conduct





No packages published