Skip to content

Commit 87b5580

Browse files
committedMay 30, 2017
Add VERSIONING.md file
1 parent 17ceac5 commit 87b5580

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
 

‎VERSIONING.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Versioning
2+
3+
For the framework we follow Semantic Versioning as defined on [http://semver.org/](http://semver.org).
4+
5+
## Intepretation of SemVer for the Framework
6+
7+
### PATCH
8+
9+
A release only containing backwards-compatible bug fixes. A bug fix in that sense is a reverting back functionality to what it has been there in the release before the last release. In case a feature doesn't work as expected, but has been there since a while and developers started to rely on it then it is not a bug fix, but a breaking change. If there is doubt if it's a bug fix or a breaking change fall back to breaking change.
10+
11+
#### Example of a Bug Fix
12+
13+
In version 1.2.0 we deployed a new version for every function. In 1.3.0 we stopped doing that, then a bug-fix release would bump the version 1.3.1
14+
15+
### MINOR
16+
17+
If a release adds functionality in a backwards-compatible manner and contains backwards-compatible bug fixes. So whenever a new CLI option is added, a new property exposed in the serverless object passed to plugins this counts as new functionality.
18+
19+
#### Example of a new Feature
20+
21+
In version 1.2.0 no profile option for the CLI existed and it should be introduced in the next release. Then the next version will be 1.3.0.
22+
23+
### MAJOR
24+
25+
Any non-backward compatible changes leads to a major version bump. This includes:
26+
27+
- Any change to the CloudFormation output that changes the behaviour of existing infrastructure
28+
- Any change to the CloudFormation output that prevents you to deploy over an existing stack
29+
- Any CLI command being removed or changed
30+
- Any option of all the existing CLI commands being removed or changed
31+
- Any structural change in the CLI output
32+
- Any object, property or function that is removed from the serverless object passed to plugins
33+
- Remove an event from the list of lifecycle events of core commands
34+
35+
#### What is considered a breaking change?
36+
37+
- Everything which touches the public facing API
38+
+ CLI commands
39+
+ CLI options
40+
+ Methods accessible through `this.serverless`
41+
+ ...
42+
- Output Serverless produces
43+
+ Files and their names
44+
+ Transient data which is available during runtime
45+
+ Formatted CLI outputs (e.g. via `--json`) **NOT:** standard outputs
46+
+ ...
47+
48+
#### Example of a Breaking Change
49+
50+
If we remove a helper function from the serverless object passed down to a plugin then this is a breaking change since some people might rely on it in custom made plugins.
51+
52+
### FAQ
53+
54+
1. Is it okay to mark a feature as deprecated in version 1.4.0 and then remove it in 1.8.0
55+
56+
No, since this is a breaking change it should trigger a major version bump to 2.0.0
57+
58+
2. Can we change everything in a major version bump?
59+
60+
Yes, this is the purpose of major version bumps. Ideally every breaking change has a clear and well documented migration path. In best case the features were already introduced earlier and upgrading is not a dealbreaker.
61+
62+
3. Can we do a major version bump without a breaking change?
63+
64+
No, as we strictly follow Semantic Versioning. The suggested strategy is to add features with minor releases and only do major version bumps when we take out deperecated features. Sometimes this is not possible, but as suggested above then a well documented migration path should come with the release.
65+
66+
4. Why is CLI output a breaking change?
67+
68+
Right now we don't provide an option to output a well formated datastructure for a CLI command. Once we have such an option the default CLI output will not be part of the breaking changes list, but rather the datastructure. Also to note here if we add to that datastructure it will not be a breaking change. If we remove or change something from that datastructure it is a breaking change.

0 commit comments

Comments
 (0)