The package.json file usually starts with name, version, scripts, dependencies. My questions is should I update the version manually , say, every time I make a release on GitHub?
While doing npm init, the version within package.json is defaulted to 0.0.0. As my app grows, should I update it evey now and then viz. 1.0.0, 2.0.1 etc.
NOTE: This is not regarding the version of different packages/dependencies but for the app itself.
The package version is mostly relevant when you actually publish your module on a public (or private) repository. You might also want to use it for yourself or within your company to communicate code changes in a standard way, called semantic versioning: https://semver.org/. But that's up to you.
There is even a command for that: npm version
# From 1.0.0 -> 1.0.1
npm version patch
# From 1.0.1 -> 1.1.0
npm version minor
# From 1.1.0 -> 2.0.0
npm version major
Details: https://docs.npmjs.com/cli/version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With