package.json #
For a while now I’ve been using Visual Studio Code for a few JavaScript / TypeScript projects. Most of these projects come with a package.json
file, which documents various aspects of the project. A tiny example of such a file:
{
"name": "foo",
"version": "1.2.3",
"description": "A packaged foo fooer for fooing foos",
"main": "foo.js"
}
npm version #
There’s that interesting property version
. In conjunction with the npm version
command it allows for very easy version bumping with automatic tagging. There are three useful keywords for that command to bump semver-compliant versions: major
, minor
and patch
. You can also set a specific version directly but refer to the documentation on npm for details. Observe: