package
Get a git commit sha for an npm version
npm install version-to-commitGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
cli and function for returning the git sha commit hash for a certain npm module and version.
Works by checking the gitHead attribute on the registry. This is not available
on all packages and versions. If you have an idea how to deal with it otherwise,
let me know.
var toCommit = require('version-to-commit')
toCommit('dat', '5.0.0', 'https://registry.npmjs.org', function (err, commit) {
console.log(commit) // returns 60c535343b30eb7aa93f754f7c73ebd61ca94ee4
})
The second and the third parameter are optional and will default to latest and https://registry.npmjs.org.
usage: version-to-commit [modulename] [version]Defaults to the module in the current working directory and the latest version.
Estimated unpacked size across 35 packages.
6.1 MB
Includes dependencies.