Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-list-updated

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-list-updated

Resolve list of updated (and existing) files between two branches

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
decreased by-3.82%
Maintainers
1
Weekly downloads
 
Created
Source

*nix build status Windows build status Tests coverage Transpilation status npm version

git-list-updated

Resolve list of updated (and existing) files

By default it checks difference between HEAD (so current branch) and master.

Useful when we want to apply certain operations (e.g. lint) only to files that were updated and not whole repostory

Installation

npm install -g git-list-updated

Usage

CLI

git-list-updated [-h | --help] [--base=<base>] [--head=<head>] [<path>]

If <path> is not provided, check is done in repository at current working directory

Options:

base (defaults to master)

Base branch with which we wish to compare

head (defaults to HEAD)

Target containing the changes that should be investigated

Programatically

const gitListUpdated = require("git-list-updated");

gitListUpdated(respositoryRoot, {
	// All options are optional
	base: "master", // Base to compare against
	head: "HEAD" // Source for comparision
})
	// Response object is a stream that emits each filename with individual data event
	.on("data", filename => {
		console.log(`Updated file: ${filename}`);
	})
	// Response object is also a promise that resolves with a list of updated files
	.then(fileNames => {
		console.log(`All updated files: ${fileNames}`);
	});

Tests

npm test

Keywords

FAQs

Package last updated on 21 Jan 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc