open-index/open-npm huggingface dataset:
npm package: @spake/npm-utils
Description: A library of scripts for analysing package.json files and npm output
Author: George Spake
Latest version: 0.0.6

# npm utils

A library of scripts for analysing package.json files and npm output

## Getting started
### install
npm
```
npm install @spake/npm-utils -g
```

yarn
```
yarn global add @spake/npm-utils
```

## Utils

### compare

compares before and after versions of a package.json file to report stats

- total dependencies before
- total dependencies after
- number of dependencies changed (version)
- number of dependencies removed
- number of dependencies added

Usage:
```
npm-utils compare <before> <after> [--csv] [--output-file]

compares before and after versions of a package.json file and reports stats

Positionals:
  before  path to package.json before changes                [string] [required]
  after   path to package.json before changes                [string] [required]

Options:
      --help         Show help                                         [boolean]
      --version      Show version number                               [boolean]
  -c, --csv          output results in csv format                      [boolean]
  -o, --output-file  provide a path to output file                     [boolean]
```

sample default output (json)
```
{
    "stats": {
        "devDependencies": {
            "dependencyType": "devDependencies",
            "versionBefore": "0.0.1",
            "versionAfter": "0.0.1",
            "countBefore": 140,
            "countAfter": 123,
            "countChanged": 49,
            "countRemoved": 22,
            "countAdded": 5
        },
        "dependencies": {
            "dependencyType": "dependencies",
            "versionBefore": "0.0.1",
            "versionAfter": "0.0.1",
            "countBefore": 77,
            "countAfter": 74,
            "countChanged": 20,
            "countRemoved": 3,
            "countAdded": 0
        },
        "total": {
            "dependencyType": "total",
            "versionBefore": "0.0.1",
            "versionAfter": "0.0.1",
            "countBefore": 214,
            "countAfter": 197,
            "countChanged": 69,
            "countRemoved": 25,
            "countAdded": 5
        }
    }
}
```
sample csv output
```
"dependencyType","versionBefore","versionAfter","countBefore","countAfter","countChanged","countRemoved","countAdded"
"devDependencies","0.0.1","0.0.1",140,123,49,22,5
"dependencies","0.0.1","0.0.1",77,74,20,3,0
"total","0.0.1","0.0.1",214,197,69,25,5
```

## Development

npm-utils is built with [Typescript](https://www.typescriptlang.org/) and [yargs](http://yargs.js.org/)

### Developing locally
```
git clone git@github.com:gpspake/npm-utils.git
cd npm-utils
yarn
yarn link
which npm-utils
```

### Adding new commands
To add a new command, create a [yargs command module](https://github.com/yargs/yargs/blob/main/docs/advanced.md#providing-a-command-module) to the `commands` directory and add it to the `commands` array in `commands/index.ts`.
Place any reusable code in the `lib` directory.

Add new ts files to `files` in `tsconfig.json`
npm package: @spalger/babel-presets
Description: Personal favorite babel presets, includes:
Author: Spencer Alger
Latest version: 0.3.2

# Shareable babel presets

Personal favorite babel presets, includes:

 - es2015
 - stage3
 - stage2
 - stage1
 - async-to-generator (for more debuggable async code)

## install

```sh
npm install --save-dev @spalger/babel-presets
## initialize your .babelrc file if you please
cp node_modules/\@spalger/babel-presets/.babelrc.example .babelrc
```

## usage

Add this to your .babelrc file

```json
{
  "presets": [
    "@spalger/babel-presets"
  ]
}
```
npm package: @spalger/eslint-config-personal
Description: My preferred eslint config
Author: Spencer Alger
Latest version: 0.6.2

# Personal, Shareable, ESLint Config

Simply a set of customizations to the fantastic [airbnb style](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb).

## Install

```bash
# because peer dependencies
curl -o- https://raw.githubusercontent.com/spalger/spalger-eslint-config/v0.6.2/install.sh | bash
```

## Usage

Update your `.eslintrc.yaml` file to point to this config

```
---
extends:
  - "@spalger/personal/es6"
```