[Node.js]23. Level 4: Semantic versioning

Update the versions on your dependencies to be a little more flexible, adding the ~ in front of your versions.

package.json

{
"name": "My Awesome Node App",
"version": "1",
"dependencies": {
"connect": "2.2.1",
"underscore": "1.3.3"
}
}

Answer:

{
"name": "My Awesome Node App",
"version": "1",
"dependencies": {
"connect": "~2.2.1",
"underscore": "~1.3.3"
}
} //~2.2.1 --> >=2.2.1 > 2.3.0
//~2.2 --> >=2.2 < 3.0.0
//~2 --> >=2 < 3.0.0
上一篇:EL&&JSTL


下一篇:C# zip压缩