GithubHelp home page GithubHelp logo

vvo / semver-ftw Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dominictarr/semver-ftw

0.0 2.0 0.0 12 KB

Simple Description of SemVer

Home Page: http://semver-ftw.org

License: MIT License

Shell 15.09% HTML 69.98% CSS 14.93%

semver-ftw's Introduction

#SemVer FTW

NPM packages specify versions in the semver format: MAJOR.MINOR.PATCH (e.g. 3.0.2).

When Publishing:

Major: "breaking changes"

Increment MAJOR version when you have removed or changed a feature, and dependent modules will have to modified to be compatible with the new version.

Minor: "new feature"

Increment MINOR version when you have added a feature, but the module is backwards compatible.

Patch: "bugfix"

Increment PATCH version when you have fixed a problem, but not broken or changed anything else.

the semver spec

semver.org

Example

Suppose a new module called pizza gets published to NPM as version 0.0.1.

When the author of the module decides to add some new functions like .pepperoni() it should get incremented to 0.1.0.

When an issue on github is opened about a bug in .pepperoni() and the bug gets fixed it should get pushed as 0.1.1.

When the author goes vegetarian and eliminates the .pepperoni() method it should be published as 1.0.0.

What does 1.0.0 mean?

there is some disagreement about the best use of 0.x.y range semvers. see this discussion I suggest pubishing your module starting at 1.0.0 and after that, incrementing the major version on each breaking change.

If you wish to indicate the stability of your module, do so in the README, in same way that node.js does. stability index

When Using Published Modules

Module authors need to take care to correctly express the nature of changes with their version number, but it is the module user's responsibility to request sensible ranges.

DON'T

Don't specify ranges that are too wide. The following may cause npm to install a version of a dependency that does not work with your module.

"dependencies" : {
  "anything-goes":"*",
  "greater-than": ">1",
}

DO

It is best to specify modules that you know work.

"dependencies" : {
  "patches"    :"~1.3.7",
  "major-minor":"1.4.x"
}

These ranges demand specific module major and minor versions, but allow patches. If the author of one of these modules publishes a patch, and it breaks your module (and you where using the module as documented) Then it was their fault, and you should post an issue.

Also DO

This is also good.

  "exact"      : "3.5.2"

This should never break, however, you will have to update your module when a patch is released.

semver-ftw's People

Contributors

dominictarr avatar max-mapper avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.