Understanding When Major, Minor, and Patch Versions Change in Semantic Versioning
Kavindu Praneeth
Intern Software Engineer | Web Developer | DevOps Enthusiast | Hobbyist Unity Developer | Cloud Enthusiast | Content Creator | Blogger
????? ??????? ???? ??? ?? ????????? Semantic Versioning ???. ????? ?? ?? ?????? ??? ????? ??? ????? ??. ???? ???? ???? ???????.?? ???? ????????? ???????? ?? ????? ?????? ??????? Package.json file ?? ???.??? ????? ?? ??????? ???? ?????. (Image 1)
???? ???????? ???????? Package.json file ??? ????? Dependency ?? ?????? ????.??????? ??????? ????? ????? ???? ?? ??? ??? ???? ??? ?? ??? ???? ???? ???? ???? ???????. ?? Dependency File ??? Data ???????? JSON Format ???.JSON Format ??? ???????? ????? Key ?? Value ????? ????? ??????? ???????.???? ?????? ??? ??? Install ??? Node Modules Key ?? ?????? ?? Values ?????? ???? ???? ??????? Node Modules ?? Version ??.
????? ???? ???? Packege.json file ????? ?????? React,Node,Next wage Technology ekka.??? Technology ????? ?? ?? ?????? Dependency manage ??? File ???????..Example ???? ?????? Flutter ?? Pubspec.yaml File ?? ???.
????? ??????? ????? ???? ????? ?? ???????? ???? ???????. ?? ??????? ??? ??????? ????? ????? ??? ???? ???????. ?????? 1 Symbol ????. ?????? ?? Major Version ??.???????? ?? Minor Version ??.??????? ????? Patch Version ??.??????? ??? ???? ???????? ????? ????? ?? Symbols, Major, Miner ?? Patch Versions ?????? ?????.
English ????? ???????? Summery ??
??MAJOR changes break things and require updates.
??MINOR changes add new features without breaking things.
??PATCH changes fix bugs and improve performance while keeping everything backward compatible.
????????? ???? ?? Major Version ??????? ?????? ?????.??? ????????? ?????? ????? ?????? ?? ?????? Node Module Function ???? ??????? calculatePrice() ?????. ?? Node Module Main ????????? ?????? calculatePrice() ???? ????. ?????? calculatePrice() ???? ??? arguments ????? ???????? ???? ??????? ?? ??????. calculatePrice(item, quantity). ??? ???? ??? ??? Version ??.???? ???? ?? Node Module ?? Develop ???? ???????????? ?? ????? ???? Argument ?????? ????? discount ????? Pass ?????.????? ????? calculatePrice() ???????. calculatePrice(item, quantity, discountCode)?????? ???? ????? ?? Major Version ????? ?????? ??? ????? Old Version ????? Function ?? ????????????? ????? ???? ??? Function ???? ??? ??. ????? ????? ?????? 14.0.2 ???? Version ?? ??? ???? ????? Version ?? ?????? 15.0.0 .????? Major Version ??? ?????? ?????? ???????? ???????. .?????? ?? ??? ???? ?????? New API ???? ??? Introduce ?????? .
??Minor Version -?????? ????? ????? calculate Price() ???? Function ??? ????? applyDiscount() ????? New Feature ???? ????. ?????? User New Function ?? Use ??? ???? ???? ????? ????? calculatePrice() function ?? ??? ?????
??Old version: calculatePrice(item, quantity)
??New version (added function): applyDiscount(item,?discountCode)
?????? 1.5.8 ????? ????? ?? 1.6.0 ???????????..
???????? ?? ??? Patch Version ???? ??.?????? ?????? Bugs ??? ????? Fix ??? ??.?????? Updates ????? Features add ?????? ??. Vulnerabilities,Performance Issues,small bugs ??? ??????????Fix???????.Example ??? ?????.calculatePrice() function ??? Bug ???? ???? Function ?? ????? ??? ?????? ??.Developers ?? Fix ????? Bug ?? Function ?? Use ??? ????? ??????????????????.
领英推荐
1.5.0 ????? Verision ?? 1.5.1 ?????? Update ???????????.
?? ????? ??????? ?????? ????? Symbols ???? ????? ???????? ??????? ????? ???.?? ??? ??? ???? ??? ???? ?? ???? ???? Symbols ????? ??????? ??? ?????? ??????? ??????. ?????? ???????? ???? ???????? Symbols ???? ?????. ??? ???? Mark ???? ? ??? Symbols ??.
1.Caret Symbol(^)[Blue Line Node Modules]
Allows updates to any minor or patch version as long as the major version stays the same.
"^0.74.5" would allow updates like 0.74.6 or 0.75.0, but not 1.0.0 (because the major version changes).
?????? ??? Module Version ?? Autumatically Update ????? New Minor ?? New Patch Version ???? ????? .But Major Version ?? ????? ?????? ??.
2.Tilde Symbol(~) [Red Line Node Modules]
Allows updates only to patch versions within the specified minor version.
"~0.74.5" would allow updates like 0.74.6, but not 0.75.0.
?????? Patch Version ?? ?????? Automatically Update ??????.Major,Minor Version ?? ????? ?????? ??.
3. None Symbols [Green Node Modules]
Exactly version 0.74.5 will be installed.
No automatic updates to any new patch (e.g., 0.74.6) or minor versions (e.g., 0.75.0).
You will need to manually update the version in your package.json if you want to use a newer version.
?????? Version ?? Stable.? ??????? ??? Manually ????? ????? ??? Version ?? ????? ????? ???????.
Resource from: Semantic Versioning 2.0.0 | Semantic Versioning (semver.org)