semantic-release 17.4.3 → 17.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -52,7 +52,7 @@ By default **semantic-release** uses [Angular Commit Message Conventions](https:
52
52
 
53
53
  Tools such as [commitizen](https://github.com/commitizen/cz-cli) or [commitlint](https://github.com/conventional-changelog/commitlint) can be used to help contributors and enforce valid commit messages.
54
54
 
55
- Here is an example of the release type that will be done based on a commit messages:
55
+ The table below shows which commit message gets you which release type when `semantic-release` runs (using the default configuration):
56
56
 
57
57
  | Commit message | Release type |
58
58
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
@@ -183,9 +183,14 @@ Compared to the verifyConditions, `analyzeCommits` lifecycle context has keys
183
183
 
184
184
  Additional keys:
185
185
 
186
- * `nextRelease`
187
- * Similar object as `lastRelease` (see above)
188
-
186
+ * `nextRelease` (Object)
187
+ * `type` (String)
188
+ * `channel` (String)
189
+ * `gitHead` (String, Git hash)
190
+ * `version` (String, version without `v`)
191
+ * `gitTag` (String, version with `v`)
192
+ * `name` (String)
193
+
189
194
  #### generateNotes
190
195
 
191
196
  No new content in the context.
@@ -232,3 +237,30 @@ if (env.GITHUB_TOKEN) {
232
237
  //...
233
238
  }
234
239
  ```
240
+
241
+ ## Execution order
242
+
243
+ For the lifecycles, the list at the top of the readme contains the order. If there are multiple plugins for the same lifecycle, then the order of the plugins determines the order in which they are executed.
244
+
245
+ ## Handling errors
246
+
247
+ In order to be able to detect and handle errors properly, the errors thrown from the must be of type [SemanticReleaseError](https://github.com/semantic-release/error) or extend it as described in the package readme. This way the errors are handled properly and plugins using the `fail` lifecycle receive the errors correctly. For any other types of errors the internal error handling does nothing, lets them through up until the final catch and does not call any `fail` plugins.
248
+
249
+ ## Advanced
250
+
251
+ Knowledge that might be useful for plugin developers.
252
+
253
+ ### Multiple analyzeCommits plugins
254
+
255
+ While it may be trivial that multiple analyzeCommits (or any lifecycle plugins) can be defined, it is not that self-evident that the plugins executed AFTER the first one (for example, the default one: `commit-analyzer`) can change the result. This way it is possible to create more advanced rules or situations, e.g. if none of the commits would result in new release, then a default can be defined.
256
+
257
+ The commit must be a known release type, for example the commit-analyzer has the following default types:
258
+ * major
259
+ * premajor
260
+ * minor
261
+ * preminor
262
+ * patch
263
+ * prepatch
264
+ * prerelease
265
+
266
+ If the analyzeCommits-lifecycle plugin does not return anything, then the earlier result is used, but if it returns a supported string value, then that overrides the previous result.
@@ -52,6 +52,9 @@
52
52
  - [semantic-release-docker](https://github.com/felixfbecker/semantic-release-docker)
53
53
  - `verifyConditions`: Verify that all needed configuration is present and login to the Docker registry.
54
54
  - `publish`: Tag the image specified by `name` with the new version, push it to Docker Hub and update the latest tag
55
+ - [@semantic-release-plus/docker](https://github.com/semantic-release-plus/semantic-release-plus/tree/master/packages/plugins/docker)
56
+ - `verifyConditions`: Verify that all needed configuration is present and login to the configured docker registry.
57
+ - `publish`: Tag the image specified by `name` with the new version, push it to the configured docker registry and update the `latest`, `major`, `minor` tags based on the configuration settings.
55
58
  - [semantic-release-gcr](https://github.com/carlos-cubas/semantic-release-gcr)
56
59
  - `verifyConditions`: Verify that all needed configuration is present and login to the Docker registry
57
60
  - `publish`: Tag the image specified by `name` with the new version, push it to Docker Hub and update the latest tag
@@ -127,3 +130,13 @@
127
130
  - `verifyConditions`: Validate configuration and (if present) credentials
128
131
  - `prepare`: Update version and appVersion in ```Chart.yaml```
129
132
  - `publish`: Publish the chart to a registry (if configured)
133
+ - [semantic-release-codeartifact](https://github.com/ryansonshine/semantic-release-codeartifact)
134
+ - `verifyConditions`: Validate configuration, get AWS CodeArtifact authentication and repository, validate `publishConfig` or `.npmrc` (if they exist), then pass the configuration to the associated plugins.
135
+ - [semantic-release-telegram](https://github.com/pustovitDmytro/semantic-release-telegram)
136
+ - `verifyConditions`: Validate configuration and verify ```TELEGRAM_BOT_ID``` and ```TELEGRAM_BOT_TOKEN```
137
+ - `success`: Publish a message about the successful release to a telegram chat
138
+ - `fail`: publish a message about failure to a telegram chat
139
+ - [semantic-release-heroku](https://github.com/pustovitDmytro/semantic-release-heroku)
140
+ - `verifyConditions`: Validate configuration and verify ```HEROKU_API_KEY```
141
+ - `prepare`: Update the package.json version and create release tarball
142
+ - `publish`: Publish version to heroku
@@ -162,7 +162,7 @@ With the configuration `"branches": ["1.0.x", "1.x", "master"]`, if the last rel
162
162
  ### Pre-release branches
163
163
 
164
164
  A pre-release branch is a type of branch used by **semantic-release** that allows to publish releases with a [pre-release version](https://semver.org/#spec-item-9).
165
- Using a pre-release version allow to publish multiple releases with the same version. Those release will be differentiated via there identifiers (in `1.0.0-alpha.1` the identifier is `alpha.1`).
165
+ Using a pre-release version allow to publish multiple releases with the same version. Those release will be differentiated via their identifiers (in `1.0.0-alpha.1` the identifier is `alpha.1`).
166
166
  This is useful when you need to work on a future major release that will include many breaking changes but you do not want to increment the version number for each breaking change commit.
167
167
 
168
168
  A pre-release branch is characterized by the `prerelease` property that defines the static part of the version released (in `1.0.0-alpha.1` the static part fo the identifier is `alpha`). The [`prerelease`](#prerelease) value of each pre-release branch must be unique across the project.
@@ -60,7 +60,7 @@ Your configuration for the \`tagFormat\` option is \`${stringify(tagFormat)}\`.`
60
60
  message: `The \`${type}\` plugin configuration is invalid.`,
61
61
  details: `The [${type} plugin configuration](${linkify(`docs/usage/plugins.md#${toLower(type)}-plugin`)}) ${
62
62
  required ? 'is required and ' : ''
63
- } must be a single or an array of plugins definition. A plugin definition is an npm module name, optionnaly wrapped in an array with an object.
63
+ } must be a single or an array of plugins definition. A plugin definition is an npm module name, optionally wrapped in an array with an object.
64
64
 
65
65
  Your configuration for the \`${type}\` plugin is \`${stringify(pluginConf)}\`.`,
66
66
  }),
@@ -68,7 +68,7 @@ Your configuration for the \`${type}\` plugin is \`${stringify(pluginConf)}\`.`,
68
68
  message: 'The `plugins` configuration is invalid.',
69
69
  details: `The [plugins](${linkify(
70
70
  'docs/usage/configuration.md#plugins'
71
- )}) option must be an array of plugin definions. A plugin definition is an npm module name, optionnaly wrapped in an array with an object.
71
+ )}) option must be an array of plugin definions. A plugin definition is an npm module name, optionally wrapped in an array with an object.
72
72
 
73
73
  The invalid configuration is \`${stringify(plugin)}\`.`,
74
74
  }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "semantic-release",
3
3
  "description": "Automated semver compliant package publishing",
4
- "version": "17.4.3",
4
+ "version": "17.4.4",
5
5
  "author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
6
6
  "ava": {
7
7
  "files": [
@@ -52,21 +52,21 @@
52
52
  "devDependencies": {
53
53
  "ava": "3.15.0",
54
54
  "clear-module": "4.1.1",
55
- "codecov": "3.8.1",
55
+ "codecov": "3.8.2",
56
56
  "delay": "5.0.0",
57
- "dockerode": "3.2.1",
57
+ "dockerode": "3.3.0",
58
58
  "file-url": "3.0.0",
59
- "fs-extra": "9.1.0",
59
+ "fs-extra": "10.0.0",
60
60
  "got": "11.8.2",
61
61
  "js-yaml": "3.14.1",
62
62
  "mockserver-client": "5.11.2",
63
- "nock": "13.0.11",
63
+ "nock": "13.1.0",
64
64
  "nyc": "15.1.0",
65
65
  "p-retry": "4.5.0",
66
66
  "proxyquire": "2.1.3",
67
- "sinon": "9.2.4",
67
+ "sinon": "11.1.1",
68
68
  "stream-buffers": "3.0.2",
69
- "tempy": "1.0.0",
69
+ "tempy": "1.0.1",
70
70
  "xo": "0.29.1"
71
71
  },
72
72
  "engines": {