Why does npm init default to 1.0.0 version ?

4Responses

Write your response…

This answer has received 2 appreciations.

That is a good question.

NPM follows the semver conventions and as such it encourages you to ship code starting at v1.0.0. Unfortunately, some projects ignore that rule and can cause troubles when calculating version numbers used for dependency management or publishing to npmjs.org.

Write a reply...

If I setup a new development environment one thing I do is changing the npm init defaults.

npm config edit --global

I set init-author-name, init-author-email and init-version. A new initialized project is never "stable". So my default version is 0.1.0.

Write a reply...

Personally I think init should start at 0.1.0, being the first dev version. The author should choose when to cut 1.0.0 and set their API.

Write a reply...

To me 1.0.0 is a stable version...

NPM specifies that it uses/expects SemVer so you're absolutely right.

Write a reply...

Join a friendly and inclusive Q&A network for coders

  • 🖥Pick the technologies you like & read great content through your feed.
  • 💬Ask a question when you want to learn more about anything.
  • 🚀Share what you know & build your portfolio.
Sign up nowLearn more

loading ...