# @shopify/repo-package-stats

> Get usage of NPM packages across the Shopify organisation.

Latest version **0.0.3** (published 2021-09-30) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @shopify/repo-package-stats
pnpm add @shopify/repo-package-stats
yarn add @shopify/repo-package-stats
bun add @shopify/repo-package-stats
```

Provides the command `repo-package-stats`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2021-09-30 |
| First published | 2021-09-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alex Page |
| Maintainers | marytal, themallen, thomaskelly, nathanpjf, shopify-dep, goodforonefare, lemonmade, vsumner, wizardlyhel, antoine.grant, tsov, andyw8-shopify, henrytao, hannachen, andrewapperley, iainmcampbell, vividviolet, bpscott |

## Links

- npm: https://www.npmjs.com/package/@shopify/repo-package-stats
- Repository: https://github.com/Shopify/repo-package-stats
- Homepage: https://github.com/Shopify/repo-package-stats#readme
- Issues: https://github.com/Shopify/repo-package-stats/issues
- npm.io page: https://npm.io/package/@shopify/repo-package-stats

## Dependencies (3)

- [got](https://npm.io/package/got.md) ^11.8.2
- [tough-cookie](https://npm.io/package/tough-cookie.md) ^4.0.0
- [@octokit/core](https://npm.io/package/@octokit/core.md) ^3.5.1

## Recent versions

- 0.0.3 (latest) — 2021-09-30
- 0.0.2 — 2021-09-30
- 0.0.1 — 2021-09-30

## README

# @shopify/repo-package-stats

Generate a CSV file of repositories that install specific packages across the Shopify organisation. Find the total number of repositories that install `@shopify/polaris`, total contributors, repo creation date, service tier and more!

| Status       | Owner         | Help                                                                  |
| ------------ | ------------- | --------------------------------------------------------------------- |
| Experimental | @polaris-team | [New issue](https://github.com/Shopify/repo-package-stats/issues/new) |

## How to use

To collect data from Grok and GitHub we need authentication tokens.

### Minerva authentication

To acces the data in Grok we need a `MINERVA_TOKEN` for OAUTH. Visit [grok.shopifycloud.com/search](https://grok.shopifycloud.com/search) and get it from the cookies.

### GitHub authentication

To access the repository creation date and total contributors we need a `GH_PAT` for authentication. Visit [the settings page](https://github.com/settings/tokens/new?description=package-usage&scopes=repo) to create a personal access token. After created you must [enable SSO](https://docs.github.com/en/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).

### Get started

Once you have your tokens you can run:

```
npx @shopify/repo-package-stats @shopify/polaris MINERVA_TOKEN GH_PAT
```

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