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

git-commit-id

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-commit-id

Returns commit id (commit sha) of git repository

latest
Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
3.6K
1.77%
Maintainers
1
Weekly downloads
 
Created
Source

git-commit-id Build Status Modern Node

Returns commit id (commit sha) of git repository

This package is fast, has no dependencies, has synchronous API, doesn't require git binary.

Useful e.g. for CI, release for Sentry or build id for Next.js

Installation

yarn add --dev git-commit-id

If you're using npm you can use: npm install --save-dev git-commit-id.

Usage

const gitCommitId = require('git-commit-id')

const commitId = gitCommitId()

Custom directory

You can pass cwd option to specify custom git directory:

const commitId = gitCommitId({ cwd: __dirname })

License

MIT

Keywords

git

FAQs

Package last updated on 27 Feb 2020

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