# rxjs-report-usage

> Report RxJS API usage to the core team

Latest version **1.0.6** (published 2021-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install rxjs-report-usage
pnpm add rxjs-report-usage
yarn add rxjs-report-usage
bun add rxjs-report-usage
```

Provides the command `rxjs-report-usage`.

## 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.0.6 |
| Published | 2021-10-11 |
| First published | 2020-06-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nicholas Jamieson |
| Maintainers | cartant |
| Keywords | rxjs, usage |

## Links

- npm: https://www.npmjs.com/package/rxjs-report-usage
- Repository: https://github.com/cartant/rxjs-report-usage
- Issues: https://github.com/cartant/rxjs-report-usage/issues
- npm.io page: https://npm.io/package/rxjs-report-usage

## Dependencies (7)

- [bent](https://npm.io/package/bent.md) ~7.3.6
- [glob](https://npm.io/package/glob.md) ~7.2.0
- [chalk](https://npm.io/package/chalk.md) ~4.1.0
- [prompts](https://npm.io/package/prompts.md) ~2.4.2
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.10.3
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.10.3
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.10.3

## Recent versions

- 1.0.6 (latest) — 2021-10-11
- 1.0.5 — 2020-06-24
- 1.0.4 — 2020-06-22
- 1.0.3 — 2020-06-21
- 1.0.1 — 2020-06-21
- 1.0.0 — 2020-06-21
- 0.0.0-beta.3 — 2020-06-21
- 0.0.0-beta.2 — 2020-06-20
- 0.0.0-beta.1 — 2020-06-20
- 0.0.0-alpha.1 — 2020-06-20

## README

# rxjs-report-usage

### What is it?

The script within this package collects anonymous API usage statistics and reports them to the RxJS core team.

### How do you run it?

This package is included as a dependency in:

* [`eslint-plugin-rxjs`](https://github.com/cartant/eslint-plugin-rxjs)
* [`rxjs-etc`](https://github.com/cartant/rxjs-etc)
* [`rxjs-marbles`](https://github.com/cartant/rxjs-marbles)
* [`rxjs-spy`](https://github.com/cartant/rxjs-spy)
* [`rxjs-tslint-rules`](https://github.com/cartant/rxjs-tslint-rules)

So if you are using the most-recent version of any of those packages, you can run the following npm command:

```
npm rxjs-report-usage
```

Or, with yarn:

```
yarn rxjs-report-usage
```

If you're not using any of those packages, you can install `rxjs-report-usage` as a `devDependency` and then run one of the above commands, or you can use `npx` to run the script without installing the package:

```
npx rxjs-report-error
```

### What it does actually do?

When run inside a project, the script locates all JavaScript and TypeScript files - except for those in the `node_modules` directory - and parses them with Babel. The parsed code is searched for `import` statements and `require` calls that consume `rxjs` and a usage count is recorded for each consumed RxJS API.

The script also locates any `rxjs` and `typescript` packages within `node_modules` and reports their versions. The versions of other packages are **not included** in the report.

The anonymous statistics that are collected look like this:

```json
{
  "apis": {
    "rxjs": {
      "concat": 1,
      "merge": 1,
      "of": 4
    },
    "rxjs/operators": {
      "concatMap": 1,
      "mergeMap": 1
    }
  },
  "packageVersions": {
    "rxjs": ["6.5.5"],
    "typescript": ["3.9.5"]
  },
  "schemaVersion": 1,
  "timestamp": 1592659729551
}
```

Once the script has collected the usage statistics, the payload is shown and the developer is prompted to confirm the sending of the payload to the core team. The script sends no information without the developer's consent.

For more information see this blog post: [Reporting API Usage](http://ncjamieson.com/reporting-api-usage/).

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