Web Development/General Tech Knowledges
dependencies version in package.json
Nomad Kim
2021. 10. 16. 18:52
semantic versioning
Semantic versioning (aka SemVer), is a widely adopted version scheme that uses a sequence of three digits (Major.Minor.Patch), an optional pre-release tag and optional build meta tag.
- backward-incompatible change increments the major number
- new functionality that is backwards compatible API additions/changes increments the minor number
- simple bug fix to existing functionality increments the patch number
difference between tilde(~) and caret(^) in package.json
Symbol | Dependency | Versions | Changes |
caret (^) | ^3.9.2 | 3.*.* |
|
tilde (~) | ~3.9.2 | 3.9.* |
|
simply,
- ~version will update you to all future patch versions, without incrementing the minor version. ~1.2.3 will use releases from 1.2.3 to <1.3.0.
- ^version will update you to all future minor/patch versions, without incrementing the major version. ^2.3.4 will use releases from 2.3.4 to <3.0.0.