Every external package is updated incrementally. A specific version looks something like follows -
"chalk": "^5.3.0"
The format is as follows - MAJOR.MINOR.PATCH
package.json
“chalk”: “^5.3.0”
- (caret five point three point zero) npm will install any version that is compatible with 5.3.0
but less than 6.0.0
. This includes versions like 5.3.1
, 5.4.0
, 5.5.0
, etc. The caret (^
) allows updates to minor and patch versions, but prevents major version updates update automatically. without caret you have to update mmanually“chalk”: “5.3.0”
- Will install the exact version"chalk": "latest"
- Will install the latest version~4.18.2
(tilde four eighteen two ) means the package manager can update to versions that are greater than or equal to 4.18.2
, but less than 4.19.0