semantic-release 18.0.1 → 19.0.0-beta.1

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
@@ -8,7 +8,7 @@
8
8
  <img alt="Build states" src="https://github.com/semantic-release/semantic-release/workflows/Test/badge.svg">
9
9
  </a>
10
10
  <a href="#badge">
11
- <img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
11
+ <img alt="semantic-release: angular" src="https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release">
12
12
  </a>
13
13
  </p>
14
14
  <p align="center">
@@ -60,7 +60,7 @@ The table below shows which commit message gets you which release type when `sem
60
60
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
61
61
  | `fix(pencil): stop graphite breaking when too much pressure applied` | ~~Patch~~ Fix Release |
62
62
  | `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
63
- | `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
63
+ | `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release <br /> (Note that the `BREAKING CHANGE: ` token must be in the footer of the commit) |
64
64
 
65
65
  ### Automation with CI
66
66
 
@@ -139,12 +139,13 @@ In order to use **semantic-release** you need:
139
139
 
140
140
  ## Badge
141
141
 
142
- Let people know that your package is published using **semantic-release** by including this badge in your readme.
142
+ Let people know that your package is published using **semantic-release** and which [commit-convention](#commit-message-format) is followed by including this badge in your readme.
143
143
 
144
- [![semantic-release](https://img.shields.io/badge/semantic-release-e10079.svg?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
144
+ [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
145
145
 
146
146
  ```md
147
- [![semantic-release](https://img.shields.io/badge/semantic-release-e10079.svg?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
147
+ [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
148
+
148
149
  ```
149
150
 
150
151
  ## Team
@@ -13,7 +13,7 @@ Here is a few example of the CI services that can be used to achieve this:
13
13
  - [Wercker Workflows](http://devcenter.wercker.com/docs/workflows)
14
14
  - [GoCD Pipelines](https://docs.gocd.org/current/introduction/concepts_in_go.html#pipeline).
15
15
 
16
- See [CI configuration recipes](../recipes/release-workflow/README.md#ci-configurations) for more details.
16
+ See [CI configuration recipes](../recipes/ci-configurations/README.md) for more details.
17
17
 
18
18
  ## Authentication
19
19
 
@@ -44,6 +44,6 @@ See each plugin's documentation for the environment variables required.
44
44
 
45
45
  The authentication token/credentials have to be made available in the CI service via environment variables.
46
46
 
47
- See [CI configuration recipes](../recipes/release-workflow/README.md#ci-configurations) for more details on how to configure environment variables in your CI service.
47
+ See [CI configuration recipes](../recipes/ci-configurations/README.md) for more details on how to configure environment variables in your CI service.
48
48
 
49
49
  **Note**: The environment variables `GH_TOKEN`, `GITHUB_TOKEN`, `GL_TOKEN` and `GITLAB_TOKEN` can be used for both the Git authentication and the API authentication required by [@semantic-release/github](https://github.com/semantic-release/github) and [@semantic-release/gitlab](https://github.com/semantic-release/gitlab).
@@ -24,7 +24,7 @@ For other type of projects we recommend installing **semantic-release** directly
24
24
  $ npx semantic-release
25
25
  ```
26
26
 
27
- **Note**: For a global installation, it's recommended to specify the major **semantic-release** version to install (for example with with `npx semantic-release@18`).
27
+ **Note**: For a global installation, it's recommended to specify the major **semantic-release** version to install (for example with `npx semantic-release@18`).
28
28
  This way your build will not automatically use the next major **semantic-release** release that could possibly break your build.
29
29
  You will have to upgrade manually when a new major version is released.
30
30
 
@@ -1,7 +1,7 @@
1
1
  # Workflow configuration
2
2
 
3
3
  **semantic-release** allow to manage and automate complex release workflow, based on multiple Git branches and distribution channels. This allow to:
4
- - Distributes certain releases to a particular group of users via distribution channels
4
+ - Distribute certain releases to a particular group of users via distribution channels
5
5
  - Manage the availability of releases on distribution channels via branches merge
6
6
  - Maintain multiple lines of releases in parallel
7
7
  - Work on large future releases outside the normal flow of one version increment per Git push
@@ -91,7 +91,7 @@ For example the configuration `['master', {name: 'pre/rc', prerelease: '${name.r
91
91
  branches: [
92
92
  {name: 'master'},
93
93
  {name: 'pre/rc', channel: 'pre/rc', prerelease: 'rc'}, // `prerelease` is built with the template `${name.replace(/^pre\\//g, "")}`
94
- {name: 'beta', channel: 'beta', prerelease: 'beta'}, // `prerelease` is set to `beta` as it is the value of `name`
94
+ {name: 'beta', channel: 'beta', prerelease: true}, // `prerelease` is set to `beta` as it is the value of `name`
95
95
  ]
96
96
  }
97
97
  ```
package/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  const {pick} = require('lodash');
2
2
  const marked = require('marked');
3
- const TerminalRenderer = require('marked-terminal');
4
3
  const envCi = require('env-ci');
5
4
  const hookStd = require('hook-std');
6
5
  const semver = require('semver');
@@ -21,7 +20,16 @@ const {verifyAuth, isBranchUpToDate, getGitHead, tag, push, pushNotes, getTagHea
21
20
  const getError = require('./lib/get-error');
22
21
  const {COMMIT_NAME, COMMIT_EMAIL} = require('./lib/definitions/constants');
23
22
 
24
- marked.setOptions({renderer: new TerminalRenderer()});
23
+ let markedOptionsSet = false;
24
+ async function terminalOutput(text) {
25
+ if (!markedOptionsSet) {
26
+ const {default: TerminalRenderer} = await import('marked-terminal'); // eslint-disable-line node/no-unsupported-features/es-syntax
27
+ marked.setOptions({renderer: new TerminalRenderer()});
28
+ markedOptionsSet = true;
29
+ }
30
+
31
+ return marked.parse(text);
32
+ }
25
33
 
26
34
  /* eslint complexity: off */
27
35
  async function run(context, plugins) {
@@ -207,20 +215,20 @@ async function run(context, plugins) {
207
215
  if (options.dryRun) {
208
216
  logger.log(`Release note for version ${nextRelease.version}:`);
209
217
  if (nextRelease.notes) {
210
- context.stdout.write(marked(nextRelease.notes));
218
+ context.stdout.write(await terminalOutput(nextRelease.notes));
211
219
  }
212
220
  }
213
221
 
214
222
  return pick(context, ['lastRelease', 'commits', 'nextRelease', 'releases']);
215
223
  }
216
224
 
217
- function logErrors({logger, stderr}, err) {
225
+ async function logErrors({logger, stderr}, err) {
218
226
  const errors = extractErrors(err).sort((error) => (error.semanticRelease ? -1 : 0));
219
227
  for (const error of errors) {
220
228
  if (error.semanticRelease) {
221
229
  logger.error(`${error.code} ${error.message}`);
222
230
  if (error.details) {
223
- stderr.write(marked(error.details));
231
+ stderr.write(await terminalOutput(error.details)); // eslint-disable-line no-await-in-loop
224
232
  }
225
233
  } else {
226
234
  logger.error('An error occurred while running semantic-release: %O', error);
@@ -234,7 +242,7 @@ async function callFail(context, plugins, err) {
234
242
  try {
235
243
  await plugins.fail({...context, errors});
236
244
  } catch (error) {
237
- logErrors(context, error);
245
+ await logErrors(context, error);
238
246
  }
239
247
  }
240
248
  }
@@ -265,7 +273,7 @@ module.exports = async (cliOptions = {}, {cwd = process.cwd(), env = process.env
265
273
  throw error;
266
274
  }
267
275
  } catch (error) {
268
- logErrors(context, error);
276
+ await logErrors(context, error);
269
277
  unhook();
270
278
  throw error;
271
279
  }
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": "18.0.1",
4
+ "version": "19.0.0-beta.1",
5
5
  "author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
6
6
  "ava": {
7
7
  "files": [
@@ -37,8 +37,8 @@
37
37
  "hook-std": "^2.0.0",
38
38
  "hosted-git-info": "^4.0.0",
39
39
  "lodash": "^4.17.21",
40
- "marked": "^2.0.0",
41
- "marked-terminal": "^4.1.1",
40
+ "marked": "^4.0.10",
41
+ "marked-terminal": "^5.0.0",
42
42
  "micromatch": "^4.0.2",
43
43
  "p-each-series": "^2.1.0",
44
44
  "p-reduce": "^2.0.0",
@@ -70,7 +70,7 @@
70
70
  "xo": "0.29.1"
71
71
  },
72
72
  "engines": {
73
- "node": ">=14.17"
73
+ "node": ">=16 || ^14.17"
74
74
  },
75
75
  "files": [
76
76
  "bin",