3.1.0 • Published 3 years ago

file-util-git-history v3.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

file-util-git-history

NPM Version CI

Installation

# npm installation
npm install file-util-git-history

# yarn installation
yarn add file-util-git-history

Usage

const { gitHistory } = require("file-util-git-history");

// get history for current file
gitHistory(__filename)
  // get the SHA hash for each commit
  .then((history) => history.map(({ commit }) => commit.sha()))
  // print out the SHAs
  .then(console.log);

git history can accept two parameters:

  • {string} filePath path to file
  • {Object} [options] optional configuration
    • {string} [gitPath] - optional predetermined git folder to get history from

will return a promise that resolves to a list of {status, commit}. Where status is a git status code, and commit is a nodegit Commit class.

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

4 years ago

2.2.0

4 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago