
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
git-commit-id
Advanced tools
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
yarn add --dev git-commit-id
If you're using npm you can use:
npm install --save-dev git-commit-id.
const gitCommitId = require('git-commit-id')
const commitId = gitCommitId()
You can pass cwd option to specify custom git directory:
const commitId = gitCommitId({ cwd: __dirname })
MIT
FAQs
Returns commit id (commit sha) of git repository
The npm package git-commit-id receives a total of 2,995 weekly downloads. As such, git-commit-id popularity was classified as popular.
We found that git-commit-id demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.