audit-age v3.0.0
audit-age
A Node.js CLI and equivalent JS API to audit the age of installed production npm packages.
Installation
Note
Installation isn’t required to use the CLI command
audit-agewithnpx.
To install audit-age with npm, run:
npm install audit-age --save-devThen, use either the CLI command audit-age or the function auditAge.
Requirements
Supported runtime environments:
- Node.js versions
^14.17.0 || ^16.0.0 || >= 18.0.0.
Projects must configure TypeScript to use types from the ECMAScript modules that have a // @ts-check comment:
compilerOptions.allowJsshould betrue.compilerOptions.maxNodeModuleJsDepthshould be reasonably large, e.g.10.compilerOptions.moduleshould be"node16"or"nodenext".
CLI
Command audit-age
Audits the age of installed production npm packages.
It implements the function auditAge.
Examples
Using npx in a package directory with installed dependencies:
npx audit-ageExports
The npm package audit-age features optimal JavaScript module design. It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the package.json field exports: