# @segment/dependency-report

> Generate usage reports for JS dependencies through an AST

Latest version **1.1.0** (published 2019-05-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @segment/dependency-report
pnpm add @segment/dependency-report
yarn add @segment/dependency-report
bun add @segment/dependency-report
```

Provides the command `dependency-report`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-05-17 |
| First published | 2018-03-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 10 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 131 |
| Author | Jeroen Ransijn |
| Maintainers | achille-roussel, alan-segment, albert.segment, amillet89, andreiko_ru, anoonan, atrivedi1, aultimus, av-segment, bgamwell, boggsboggs, brienne.mcnally, bryanmikaelian, calthomson, calvinfo, carlosmecha, ccnixon, cdrycroft, chenpengcheng, colinking, creedarky, davidbirdsong, dk1027, dominicbarnes, dscrobonia, eculver, eesegment, emilio-gomez-lavin, emily.luckette, erickimsegment, erikdw, f2prateek, falberini, fathyb, fauzyy, fforres, flaque, frannypack, gnijor, gpsamson, hellooimkat, hieuhpham, illyay2017, ivolo, jaimal, jamesmcguinness, jeroenransijn, jfabre-segment, jfarah, jknight12882, jlee9595, joeybloggs, joshwget, julee05, kamebkj, knoonan, ktrinh, ladanazita, lauramunozjimenez, laurenmreeder, leifdreizler, manbearshark, markhazlett, maxence-charriere, monicadamborenea, msanterre, mshwery, n2parko, nakulrathod, nettofarah, nhi-nguyen, nickatsegment, nielssegment, nucleartide, nzoschke, parsa-segment, peripheral, rarchana2001asu, rowno, rpaul80, ryan_segment, sahilp, sanscontext, scruwys1, segment-admin, segment-anastassia, segment-andy-yeo, segment-cyammine, segment-danielstjules, segment-ulysse, segmentaimee, segmentio, shse, solon_aguiar, sperand-io, srthurman, systemizer, tejasmanohar, tlsegment, tyson_segment, uditmehta, vdemedes, willallison, williamgrosset, williams-blake, xagos, yabrira, yields, ynguyen, yunqiaohuang |
| Keywords | dependencies, packages, report, usage, tracking, npm |

## Links

- npm: https://www.npmjs.com/package/@segment/dependency-report
- Repository: https://github.com/segmentio/dependency-report
- npm.io page: https://npm.io/package/@segment/dependency-report

## Dependencies (10)

- [ora](https://npm.io/package/ora.md) ^2.0.0
- [meow](https://npm.io/package/meow.md) ^4.0.0
- [chalk](https://npm.io/package/chalk.md) ^2.3.1
- [arrify](https://npm.io/package/arrify.md) ^1.0.1
- [globby](https://npm.io/package/globby.md) ^7.1.1
- [recast](https://npm.io/package/recast.md) ^0.18.1
- [p-limit](https://npm.io/package/p-limit.md) ^1.2.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.4.4

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-05-17
- 1.0.3 — 2018-07-03
- 1.0.2 — 2018-04-05
- 1.0.1 — 2018-03-13
- 1.0.0 — 2018-03-13
- 0.0.1 — 2018-03-06

## README

# dependency-report

> Generate usage reports for JavaScript dependencies through an AST.

_Note: only supports ES2015 `import` statements (not CommonJS `require` calls)._

## Install

```
yarn add @segment/dependency-report
# or
npm install @segment/dependency-report
```

## CLI Usage

### Input

```
$ dependency-report './client/**/*.js' --packages=evergreen-ui --exports=SideSheet
```

### Results

```
[
  [
    {
      "name": "SideSheet",
      "files": 6,
      "filepaths": [
        "./client/components/Customers/Audiences/Audience/Overview/RunOverview/index.js",
        "./client/components/Customers/Destinations/View.js",
        "./client/components/Customers/DestinationSettings.js",
        "./client/components/Destinations/DestinationErrors/ErrorSheet.js",
        "./client/components/WorkspaceSettingsV2/DeletionRequests/RegulationSheet.js",
        "./client/containers/Navigation/UserDropdownApp.js"
      ]
    }
  ]
]
```

### input

```
$ dependency-report './client/**/*.js' --packages=evergreen-ui --exports=SideSheet,Popover,CornerDialog,RadioGroup
```

### Results

```
[
  [
    {
      "name": "SideSheet",
      "files": 6,
      "filepaths": [
        "./client/components/Customers/Audiences/Audience/Overview/RunOverview/index.js",
        "./client/components/Customers/Destinations/View.js",
        "./client/components/Customers/DestinationSettings.js",
        "./client/components/Destinations/DestinationErrors/ErrorSheet.js",
        "./client/components/WorkspaceSettingsV2/DeletionRequests/RegulationSheet.js",
        "./client/containers/Navigation/UserDropdownApp.js"
      ]
    },
    {
      "name": "Popover",
      "files": 2,
      "filepaths": [
        "./client/components/WorkspaceSettingsV2/SuppressedUsers/RemoveButton.js",
        "./client/containers/Navigation/UserDropdownApp.js"
      ]
    },
    {
      "name": "CornerDialog",
      "files": 4,
      "filepaths": [
        "./client/components/GDPRNotification.js",
        "./client/components/NewAgreementNotification.js",
        "./client/components/Sources/SourceDebugger/TestConnectionNotice.js",
        "./client/containers/Sources/SourceSchema/DataGovernanceFeedbackApp.js"
      ]
    },
    {
      "name": "RadioGroup",
      "files": 0,
      "filepaths": []
    }
  ]
]
```

## Usage

```javascript
const DependencyReport = require('@segment/dependency-report')

const report = new DependencyReport({
  files: '**/*.js'
})
```

---
_Source: https://npm.io/package/@segment/dependency-report · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
