8000 GitHub - finnp/version-to-commit: Get a git commit sha for an npm version
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

finnp/version-to-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

version-to-commit

NPM

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.

usage

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.

cli

usage: version-to-commit [modulename] [version]

Defaults to the module in the current working directory and the latest version.

About

Get a git commit sha for an npm version

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0