npm with yarn

Version:
. <Major version> <minor version number> <revision>
major version number (1): When the function has largely changed such as increased or the overall architecture of the plurality of modules is changed. This version number is determined by whether the project changes.
Minor version number (1): When an increase or a certain function change, such as increase of access control, and other functions to add custom views. This version number is determined by whether the project changes.
Stage version number (1): Generally Bug fix or some small changes, you should always publish revised edition, limited time interval, fix a serious bug to publish a revised edition. This version number is determined by the project manager whether to modify.

npm version number of management strategies:
npm version management strategy called semantic version of the specification, as the name suggests is through statements do version control:
^ Lock the major version number
- lock minor version number
* Install the latest version

The above expression is not very accurate, more precise definition is matched ^ is the left-most non-0, if the first bit is 0, then, with the ^ - the effect is the same. If the first and second place are the words 0, then ^ will only update the third version number.

So the policy will npm version of the problem?
interdependence between npm package, will cause severe version of the problem, that is, if I rely package A, B and A bag was dependent on the package, but the package A and package B do not have to limit the scope, I finally update time, the latest package B leads a package there is a problem, leading to a problem entire project.

how yarn is resolved?
yarn.lock yarn creates a file, which describes in detail a version of the package of each package depends on the versions in the initial installation time, each update time will package.json to yarn.lock reference. That yarn.lock the case every time npm npm update package intall and do a snapshot, the next time will be npm uodate this is not a snapshot basis.

Guess you like

Origin www.cnblogs.com/mrzhu/p/12076511.html