Sir pls explain me, agar programmer 2 repo copy karega tab minor changes automatic hi upgrade hokar pakage.json file mye reflect ho jate haan.. ham kar to copy hi rahe han programmer 1 ki fhir bhi programmer 2 mye version kese up ho jata han?
does that mean the tilt symbol will never be used to upgrade the packages, as every time a developer will install it will see the version from package-lock.json? then what is the use of ~ ?
In a package.json file, the ~ symbol is used as a prefix to specify a "tilde" version range for a dependency. A tilde version range in package.json specifies a range of compatible versions of a dependency where the most significant version number is kept fixed, but allows for updates to the minor and patch versions. For example, if you specify "~1.2.3" as a version range for a dependency, it means that any version with the same major version number (1) and the same minor version number (2) but a different patch version number (e.g. 1.2.4, 1.2.5, etc.) is allowed. This is useful when you want to ensure that you get bug fixes and security updates for a particular version of a package without having to manually update to a newer major or minor version that might introduce breaking changes. In contrast to the tilde ~, the caret ^ symbol is used as a prefix to specify a "caret" version range for a dependency, which allows for updates to the major version number as well.
Beautifully explained
Thank you so much 🙂 pls subcribe and share
to the point . thanks
Nice explanation sir
Thanks and welcome pls support
Sir pls explain me, agar programmer 2 repo copy karega tab minor changes automatic hi upgrade hokar pakage.json file mye reflect ho jate haan.. ham kar to copy hi rahe han programmer 1 ki fhir bhi programmer 2 mye version kese up ho jata han?
does that mean the tilt symbol will never be used to upgrade the packages, as every time a developer will install it will see the version from package-lock.json? then what is the use of ~ ?
In a package.json file, the ~ symbol is used as a prefix to specify a "tilde" version range for a dependency.
A tilde version range in package.json specifies a range of compatible versions of a dependency where the most significant version number is kept fixed, but allows for updates to the minor and patch versions. For example, if you specify "~1.2.3" as a version range for a dependency, it means that any version with the same major version number (1) and the same minor version number (2) but a different patch version number (e.g. 1.2.4, 1.2.5, etc.) is allowed.
This is useful when you want to ensure that you get bug fixes and security updates for a particular version of a package without having to manually update to a newer major or minor version that might introduce breaking changes.
In contrast to the tilde ~, the caret ^ symbol is used as a prefix to specify a "caret" version range for a dependency, which allows for updates to the major version number as well.
@@sharmasachin013 Thanks for the detailed explanation.
Thanks
Welcome