I developed an npm module (let's call it module-x
) that I regularly update and publish on the npm platform.
Software that uses this module installs it by running npm i module-x
but in dependencies section of the package.json
the module-x
is installed with a fixed version (module-x: "1.0.0"
).
I'd like to use the tilde or caret version instead resulting in something like this "module-x" : "~1.0.0"
.
I've seen that other libraries like request
can do this, but how they do it?