Version number naming rules

Naming rules

Major version. Minor version. Revised version number

Version number rule

  1. The major version number, minor version number, and modified version number are all non-negative, and the release version number must increase numerically.
  2. When the major version number is 0, it indicates that the API is in development and may be unstable.

Common version number change rules

  1. When the project is an early release, the version number is usually 0.1.0.
  2. When the project is partially modified or bug modified, the major version number and sub-version number should not change, and the revised version number +1;
  3. When the project is optimized on the original basis and functions are added, the main version number will remain unchanged, the sub-version number +1, and the revised version number will return to 0;
  4. When the project is significantly modified, more than one module is added, or the overall architecture is changed, the major version number +1, the sub-version number goes to 0, and the modified version number goes to 0, such as 2.0.0.

Common modifiers

  • Alpha: internal version
  • Beta: The test version
  • Demo: demo version
  • “Enhance”
  • Free: Free version
  • It’s the full version
  • LTS: long-term maintenance version
  • Release: a release
  • Rc: Coming soon as an official release
  • Standard: Standard edition
  • Ultimate: Flagship edition
  • Upgrade: indicates the upgrade version

Common version symbols

website

  1. *: indicates that the installation version number is arbitrary. By default, the dependency package of the latest version will be installed.
  2. ^ : Can install a version greater than or equal to the current version, following the principle of the first non-zero version number on the left as the basis (major or minor version number, for example'^ 1.2.3'The major version is fixed to 1, and the minor version and repair version can be upgraded.'^ 0.2.3'Indicates that the major version number and minor version number remain unchanged, and the repair version number can be upgraded.) If the first non-zero version number on the leftmost is in the repair version number, the version number can basically be regarded as fixed.
  3. ~ : The version can be greater than or equal to the current version based on the right-most non-zero integer. If the right-most non-zero integer version number is on the repaired version number or above the minor version number, the major version number and minor version number remain unchanged, and the repaired version number can be upgraded. If the right-most non-zero version number is in the major version number, the minor version number and repair version number can be upgraded, but the major version number remains unchanged. Such as'~1.0.0' < 2.0.0
  4. > & Without identifiers: the symbol is used to specify which beta version can be installed;

If you find any errors in the above statements, you can repair them and then inform us in the group. Thank you

other

  1. The default symbol can be set by NPM config set save-prefix= “;
  2. NPM install X — save-dev to add packages to the devDependencies property of package.json.
  3. If -save is not present, the X package will be installed to node_modules without modifying package.json, and NPM install will not be installed automatically.
  4. When “NPM install” is executed, Node regenerates package-lock.json and writes all module information in node_modules to package-lock.json.
  5. The package.json file only records information about modules installed through NPM install, not about other submodules on which these modules depend. But the package-lock.json file locks the version numbers of all modules, including the main module and all dependent submodules.