What is the difference between ~0.0.1 and 0.0.1 in package.json version control?

Asked

Viewed 1,395 times

6

This code is an example:

{
    "dependencies": {
        "gulp": "~0.0.1",
        "browser-sync": "^0.0.1"
    }
}

2 answers

7


In a simplified way TIL (~) accepts only minor version most recent (the middle number). ~ 1.2.3 will accept all 1.2.x versions but will reject 1.3.0.

The CIRCUMFLEX ( ) accepts the latest Major Version (first number) . 1.2.3 will accept any release 1.x. x including 1.3.0, but will reject 2.0.0.

SOURCE and link to the Stack in English

7

Browser other questions tagged

You are not signed in. Login or sign up in order to post.