![]() The public API should not be considered stable. Major version zero (0.y.z) is for initial development. Of course every rule has an exception, and semver’s lies in pre-release versioning: The caret trusts that this promise is kept, but the tilde is a little more pessimistic. Only major versions are allowed to break compatibility, so a developer should be able to switch between minors and patches with ease. PATCH version when you make backwards-compatible bug fixes.MINOR version when you add functionality in a backwards-compatible manner, and.MAJOR version when you make incompatible API changes,.The difference between “reasonably close” and “compatible” can be traced back to semantic versioning (SemVer) semantics. npm’s semantic versioning parser clarifies the distinction: ![]() ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0. It will update you to the most recent major version (the first number). The caret, on the other hand, is more relaxed. This has been the default behavior of ‘–save’ since the start, and you are probably already comfortable seeing it in your package.json. ~1.2.3 will match all 1.2.x versions but will miss 1.3.0. In the simplest terms, the tilde matches the most recent minor version (the middle number). What does this mean for you? Well, first you should understand the difference between the two. This update included a lot of big fixes, but the most visible change is that ‘install –save’ now prepends a caret ( ^) instead of a tilde ( ~). "npm install -save" No Longer Using TildesĪ new stable version of Node was released last Wednesday, and with it came the newest version of npm.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |