§2023-08-10
- Patch — A patch is an update which is meant to fix existing bugs and it’s backward compatible (meaning you can update without having to worry about your current usage of the library being broken).
- Minor —A minor update represents an update which introduces new features and it’s also backward compatible.
- Major —A major update is very different from the previous kind of updates since it is not backward compatible (meaning, upgrading to a new major version introduces breaking changes and might cause your previous version code to break). A major update represents a change which is massive and could change the whole mechanism of the library and how it works.
¶Meaning of prefix symbols
- Caret (^) — a caret is the default prefix you get from npm after installing a new package. It gives you the highest minor version available with its highest patch version.
- Tilde (~) — a tilde prefix will only promote patch versions, meaning that you’ll get the highest patch version for your current minor.
¶Examples:
- ^1.2.3 possible result could be 1.3.2 _ ~1.2.3 possible result could be 1.2.4
- npm install express without specify versioning will get you the latest