In bower (a node dependency package manager), on some dependencies the version is preceded by a tilde. What does this mean?
{ "name": "mean", "version": "1.0.0", "dependencies": { "bootstrap": "3.0.0", "angular": "~1.0.6" } {
Tilde (~) notation: It is used to match the most recent patch version. Tilde ~ notation freezes the major version and minor version. As we know patch updates are bug fixes that's why we can say ~ notation allows us to automatically accept bug fixes. Example: The ~1.2. 0 will update all the future patch updates.
Bower is a package manager, like npm, which manages frameworks, libraries, assets, and utilities, installs them, and makes sure they are up to date. Traditionally, many web development projects combined npm and Bower. npm was used to manage back-end dependencies, while Bower was used for front-end dependencies.
You can also create a bower. json file and define multiple packages name with or without version. Navigate to your project folder directory and run the command “bower install”. It will download and install all the packages in your bower_components folder.
Bower lets you query the bower registry via the command line to find a package by a given name and then list its versions. e.g.
~1.2.3 := >=1.2.3-0 <1.3.0-0 "Reasonably close to 1.2.3". When using tilde operators, prerelease versions are supported as well, but a prerelease of the next significant digit will NOT be satisfactory, so 1.3.0-beta will not satisfy ~1.2.3.
From the documentation of the underlying semver
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With