<commit_before># depdiff

[![Build Status](https://travis-ci.org/jussi-kalliokoski/depdiff.png?branch=master)](https://travis-ci.org/jussi-kalliokoski/depdiff)
[![Coverage Status](https://img.shields.io/coveralls/jussi-kalliokoski/depdiff.svg)](https://coveralls.io/r/jussi-kalliokoski/depdiff)

I kept running into a problem where stuff I commited did not work on a build machine or someone else's computer, and quite often the problem turned out to be that my npm dependencies had changed.

To repair the issue, I made this small tool that allows you to keep track of those changes to immediately see what might have caused the issues.

## Installation

To install the CLI:

```sh
$ npm install -g depdiff
```

## Usage

The CLI features two commands, `list-dependencies` and `list-changes`. `list-dependencies` lists your dependencies as JSON, going through your `bower.json` and `package.json` files. `list-changes` takes a file of this JSON format and compares it to the current situation, showing a diff similar to what you might be used to in your version control.

To save the current state to a file:

```sh
$ depdiff list-dependencies > current-deps.json
```

To compare current state to an older state:

```sh
$ depdiff list-changes old-deps.json
```
<commit_msg>Use SVG for the build status badge.<commit_after># depdiff

[![Build Status](https://travis-ci.org/jussi-kalliokoski/depdiff.svg?branch=master)](https://travis-ci.org/jussi-kalliokoski/depdiff)
[![Coverage Status](https://img.shields.io/coveralls/jussi-kalliokoski/depdiff.svg)](https://coveralls.io/r/jussi-kalliokoski/depdiff)

I kept running into a problem where stuff I commited did not work on a build machine or someone else's computer, and quite often the problem turned out to be that my npm dependencies had changed.

To repair the issue, I made this small tool that allows you to keep track of those changes to immediately see what might have caused the issues.

## Installation

To install the CLI:

```sh
$ npm install -g depdiff
```

## Usage

The CLI features two commands, `list-dependencies` and `list-changes`. `list-dependencies` lists your dependencies as JSON, going through your `bower.json` and `package.json` files. `list-changes` takes a file of this JSON format and compares it to the current situation, showing a diff similar to what you might be used to in your version control.

To save the current state to a file:

```sh
$ depdiff list-dependencies > current-deps.json
```

To compare current state to an older state:

```sh
$ depdiff list-changes old-deps.json
```

{'fraction_non_alphanumeric': 0.09688715953307393, 'fraction_numerical': 0.0, 'mean_word_length': 4.61353711790393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7259959', 'n_tokens_mistral': 801, 'n_tokens_neox': 747, 'n_words': 316}