Configures npm to write ~4.17.21 style ranges instead of ^4.17.21 when adding dependencies, meaning only patch updates are allowed. The tilde range is the conservative choice for libraries that must avoid breaking minors. npm set is the shorthand for npm config set.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.