S
S
Svyatoslav Khusamov2016-06-07 19:34:34
Node.js
Svyatoslav Khusamov, 2016-06-07 19:34:34

Why does the npm install --save command sometimes add a tick, sometimes a tilde, to version numbers?

I added, say, two modules: bluebird and body-parser.
The following lines appeared in package.json:

"dependencies": {
    "bluebird": "^3.3.5",
    "body-parser": "~1.14.0",

Why is there a ^ for the first module and a tilde ~ for the second?
And why doesn't it set anything for my modules?
I would also like to have a daw or a tilde for my modules.
Attention, here everywhere I mean adding it automatically with the npm install command with the --save option.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Kayun, 2016-06-07
@Kayun

Semver https://docs.npmjs.com/getting-started/semantic-ve...
Tilda version within the patch.
Tick ​​the version within the minor version.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question