![]() ![]()
Please see the default config module, npm-package-json-lint-config-default instead. As of v2.7.0, there are multiple ways to supply configuration. npm-package-json-lint will only run the rules supplied. ![]() ![]() PACKAGE.JSON CARET PATCHGiven a version number, increment the: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards-compatible manner, and PATCH version when you make backwards-compatible bug fixes.Rules allow npm-package-json-lint to be fully customizable. PACKAGE.JSON CARET UPDATEThen, when the software matures, release it under 1.0.0 and increment the leftmost digit each time your public API changes (therefore people having ^1.0.0 won't get 2.0.0 update and it won't break their code). For example: Suppose, 'grunt': '0.1.3' is mentioned in the package.json file inside a project and already the package is installed with that version. PACKAGE.JSON CARET INSTALLThe rule is: use 0.x.y versioning when your software hasn't yet matured and release it with incrementing the middle digit when your public API changes (therefore people having ^0.1.0 won't get 0.2.0 update and it won't break their code). In the package.json file, the caret symbol indicates to install or update the package to the most recent major version. If you were, on the other hand, using 0.1.x -> 0.2.x -> 0.3.x versions then by the time the software is finally 100% done and full-featured it is released as version 1.0.0 and it means "This release is a long-term service one, you can proceed and use this version of the library in your production code, and the author won't change everything tomorrow, or next month, and he won't abandon the package". So, by the time your software is finally 100% done and full-featured it will be like version 11.0.0 and that doesn't look very meaningful, and actually looks confusing. Difference between tilde () and caret () in package.json There is a lot of confusion going around when it comes to the difference between tilde and caret inside your package.json file, which can end up in a mess on the production side since you might update accidentally to the version of a dependency that you did not test for production. PACKAGE.JSON CARET CODEIf you don't want to break the code for people who already are using your library you go and increment the major version: e.g. The reason is that while the software is evolving the API changes rapidly: one day you have these methods and the other day you have those methods and the old ones are gone. When the software is emerging use 0.x.y versions and hat matching will only match the last varying digit ( y). Hat matching may be considered "broken" because it wont update ^0.1.2 to 0.2.0. Notice: When you install a package which has 0 as major level, the update will only install new beta/pr level version! That's because npm sets ^ as default in package.json and when installed version is like 0.1.3, it freezes all major/minor/patch levels. ![]() Notice: Missing major, minor, patch or specifying beta without number, is the same as any for the missing level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |