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

git-hash-package

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-hash-package

Get git hash and set in package.json

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

git-hash-package

What does it do?

This package gets info about your git repo (long hash + short hash + branch) and stores this data in your package.json.

Why?

I faced next issue:
If we can't use git log inside Docker container in git subrepo in production, we need to store info about git in local files. Storing info about the current git state in package.json was a good decision. This module solves my issue.

Install

npm i git-hash-package

Or if you want to run it globally(Thanks to @teebu and his awesome PR):

  npm i -g git-hash-package

Usage

git-hash-package # run
git-hash-package --verbose # run with verbose output about current git state (short + long hashes + branch)

Author

Vladimir Metnew vladimirmetnew@gmail.com

License

MIT

Keywords

git

FAQs

Package last updated on 11 Nov 2017

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