New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

diffenator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diffenator

List all files that have changed or that depend on a file that has changed. This is mainly useful to only run tests on code that has been modified.

latest
npmnpm
Version
1.0.1
Version published
Weekly downloads
4
100%
Maintainers
1
Weekly downloads
 
Created
Source

Diffenator

List all files that have changed or that depend on a file that has changed. This is mainly useful to only run tests on code that has been modified.

Installation

npm i --save-dev diffenator

Usage

## List all files in ./test that have been modified with respect to master
npx diffenator HEAD -- test

Combining with mocha

npx diffenator HEAD -- test | xargs mocha

Example

Suppose that the layout of the project is the following

.
├── a.js
├── b.js
└── test
    ├── aTest.js
    └── bTest.js

Where test/aTest.js depends on a.js and test/bTest.js depends on b.js. If we modify b.js then

# Modify b.js
echo "" >> b.js

# List all files in directory that have changed or that depend in a file that has changed
npx diffenator -- test
> test/bTest.js

FAQs

Package last updated on 25 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts