Gathering detailed insights and metrics for @adam-lynch/git-rev-sync
Gathering detailed insights and metrics for @adam-lynch/git-rev-sync
Gathering detailed insights and metrics for @adam-lynch/git-rev-sync
Gathering detailed insights and metrics for @adam-lynch/git-rev-sync
npm install @adam-lynch/git-rev-sync
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
417
Last Day
2
Last Week
2
Last Month
9
Last Year
79
171 Stars
165 Commits
59 Forks
4 Watching
3 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.0-0
Package Id
@adam-lynch/git-rev-sync@3.0.0-0
Unpacked Size
13.04 kB
Size
4.48 kB
File Count
9
NPM Version
6.13.4
Node Version
12.16.1
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
100%
2
Compared to previous week
Last month
50%
9
Compared to previous month
Last year
-39.2%
79
Compared to previous year
3
Synchronously get the current git commit hash, tag, count, branch or commit message. Forked from git-rev.
1var git = require('git-rev-sync'); 2 3console.log(git.short()); 4// 75bf4ee 5 6console.log(git.long()); 7// 75bf4eea9aa1a7fd6505d0d0aa43105feafa92ef 8 9console.log(git.branch()); 10// master
You can also run these examples via: npm run examples
npm install git-rev-sync --save
1var git = require('git-rev-sync');
git.short([filePath], [length])
→ <String>return the result of git rev-parse --short HEAD
filePath
parameter can be used to run the command against a repo outside the current working directorylength
parameter can be used to set the desired hash length (defaults to 7
)git.long([filePath])
→ <String>return the result of git rev-parse HEAD
; optional filePath
parameter can be used to run the command against a repo outside the current working directory
git.branch([filePath])
→ <String>return the current branch; optional filePath
parameter can be used to run the command against a repo outside the current working directory
git.count()
→ <Number>return the count of commits across all branches; this method will fail if the git
command is not found in PATH
git.date()
→ <Date>returns the date of the current commit; this method will fail if the git
command is not found in PATH
git.hasUnstagedChanges()
→ <Boolean>returns true if there are unstaged changes; this method will fail if the git
command is not found in PATH
git.isDrty()
→ <Boolean>returns true if there are uncommitted changes; this method will fail if the git
command is not found in PATH
git.isTagDirty()
→ <Boolean>returns true if the current tag is dirty; this method will fail if the git
command is not found in PATH
git.message()
→ <String>return the current commit message; this method will fail if the git
command is not found in PATH
git.remoteUrl()
→ <String>return the current remote URL; this method will fail if the git
command is not found in PATH
git.tag([markDirty])
→ <String>return the current tag and mark as dirty if markDirty is truthful; this method will fail if the git
command is not found in PATH
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 10/29 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More