Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaydenseric/audit-age
A Node.js CLI and equivalent JS API to audit the age of installed production npm packages.
https://github.com/jaydenseric/audit-age
esm maintained mjs node npm npx
Last synced: 16 days ago
JSON representation
A Node.js CLI and equivalent JS API to audit the age of installed production npm packages.
- Host: GitHub
- URL: https://github.com/jaydenseric/audit-age
- Owner: jaydenseric
- License: mit
- Created: 2018-05-31T02:46:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-08-26T01:45:31.000Z (about 2 years ago)
- Last Synced: 2024-10-03T14:22:24.567Z (about 1 month ago)
- Topics: esm, maintained, mjs, node, npm, npx
- Language: JavaScript
- Homepage: https://npm.im/audit-age
- Size: 102 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Funding: .github/funding.yml
- License: license.md
- Audit: audit-age.mjs
Awesome Lists containing this project
README
# audit-age
A [Node.js](https://nodejs.org) [CLI](#cli) and equivalent JS [API](#exports) to audit the age of installed production [npm](https://npmjs.com) packages.
## Installation
> **Note**
>
> Installation isn’t required to use the [CLI](#cli) command [`audit-age`](#command-audit-age) with [`npx`](https://docs.npmjs.com/cli/v8/commands/npx).To install [`audit-age`](https://npm.im/audit-age) with [npm](https://npmjs.com/get-npm), run:
```sh
npm install audit-age --save-dev
```Then, use either the [CLI](#cli) command [`audit-age`](#command-audit-age) or the function [`auditAge`](./auditAge.mjs).
## Requirements
Supported runtime environments:
- [Node.js](https://nodejs.org) versions `^14.17.0 || ^16.0.0 || >= 18.0.0`.
Projects must configure [TypeScript](https://typescriptlang.org) to use types from the ECMAScript modules that have a `// @ts-check` comment:
- [`compilerOptions.allowJs`](https://typescriptlang.org/tsconfig#allowJs) should be `true`.
- [`compilerOptions.maxNodeModuleJsDepth`](https://typescriptlang.org/tsconfig#maxNodeModuleJsDepth) should be reasonably large, e.g. `10`.
- [`compilerOptions.module`](https://typescriptlang.org/tsconfig#module) should be `"node16"` or `"nodenext"`.## CLI
### Command `audit-age`
Audits the age of installed production [npm](https://npmjs.com) packages.
It implements the function [`auditAge`](./auditAge.mjs).
#### Examples
Using [`npx`](https://docs.npmjs.com/cli/v8/commands/npx) in a package directory with installed dependencies:
```sh
npx audit-age
```## Exports
The [npm](https://npmjs.com) package [`audit-age`](https://npm.im/audit-age) features [optimal JavaScript module design](https://jaydenseric.com/blog/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`](./package.json) field [`exports`](https://nodejs.org/api/packages.html#exports):
- [`auditAge.mjs`](./auditAge.mjs)