How do I specify exact git hash in package.json
dependencies for a Github project, and have an easy way to upgrade it at the same time?
My package.json
is as follow:
{
"name": "my faboulous app",
"version": "1.0.0",
"dependencies": {
// ...
"request": "request/request#5ee89063cd"
}
}
It relies on a Github project: https://github.com/request/request and uses specific revision which is 5ee89063cd
.
I want to stick to specific version, so when someones clones my project and calls npm install
she has the same request
dependency version as me.
But at certain point in time, there comes an important bugfix for me, and I want to upgrade the revision
in package.json
to the newest version that is available at Github.
Is it possible to achieve this with npm update
command? How can I upgrade the revision from command line, instead of manually editing the file?
My understanding is that, when I call npm install
it always takes the hash that is specified in package.json
. But when I call npm update
I would like to have package.json
request
dependency updated to the latest repository version of it with the newest revision hash.
How can I achieve that? If not with npm update
maybe there is the other simple way?