This page looks best with JavaScript enabled

Quick Tips - npm semver tokens

 ·  ☕ 1 min read

    You may have noticed before, in package.json files, the dependency versions include a prefix that tell npm how to look for updates. These are kind of deeply embedded in the docs so I will list them here

    TokenDefinition
    ^Look for Minor Releases (0.y.0)
    *Look for Major Releases (x.0.0)
    ~Look for Patch Releases (0.0.z)

    Examples

    1
    2
    3
    4
    5
    6
    7
    
    {
    	"dependencies": {
    		"dep_name0": "~0.0.1",
    		"dep_name1": "^0.1.0",
    		"dep_name2": "*1.0.0"
    	}
    }
    
    Share on

    abschill
    WRITTEN BY
    abschill
    software engineer