I want to write npm scripts which run when bumping the package version via npm version. I do not intend for my scripts to be invoked directly via npm run _____; instead, they should be invoked by npm, when npm version ____ (or preversion or postversion, etc) is called.
How can I refer to the version level argument in my scripts?
e.g. If my script runs as preversion and was invoked from npm version major, how can my script refer to major?