semantic-release 19.0.2 → 19.0.5

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.
@@ -12,9 +12,9 @@ To create a plugin for `semantic-release`, you need to decide which parts of the
12
12
  - `success`
13
13
  - `fail`
14
14
 
15
- `semantic-release` will require the plugin via `node` and look through the required object for methods named like the lifecyles stated above. For example, if your plugin only had a `verifyConditions` and `success` step, the `main` file for your object would need to `export` an object with `verifyConditions` and `success` functions.
15
+ `semantic-release` will require the plugin via `node` and look through the required object for methods named like the lifecycles stated above. For example, if your plugin only had a `verifyConditions` and `success` step, the `main` file for your object would need to `export` an object with `verifyConditions` and `success` functions.
16
16
 
17
- In addition to the lifecycle methods, each lifecyle is passed two objects:
17
+ In addition to the lifecycle methods, each lifecycle is passed two objects:
18
18
 
19
19
  1. `pluginConfig` - an object containing the options that a user may pass in via their `release.config.js` file (or similar)
20
20
  2. `context` - provided by `semantic-release` for access to things like `env` variables set on the running process.
@@ -55,12 +55,12 @@
55
55
  - [@semantic-release-plus/docker](https://github.com/semantic-release-plus/semantic-release-plus/tree/master/packages/plugins/docker)
56
56
  - `verifyConditions`: Verify that all needed configuration is present and login to the configured docker registry.
57
57
  - `publish`: Tag the image specified by `name` with the new version and channel and push it to the configured docker registry.
58
- - `addChannel`: Updates a release published on one channel with the destinations channel tag and pushes to the registry ie: next to latest.
58
+ - `addChannel`: Updates a release published on one channel with the destinations channel tag and pushes to the registry i.e.: next to latest.
59
59
  - [semantic-release-gcr](https://github.com/carlos-cubas/semantic-release-gcr)
60
60
  - `verifyConditions`: Verify that all needed configuration is present and login to the Docker registry
61
61
  - `publish`: Tag the image specified by `name` with the new version, push it to Docker Hub and update the latest tag
62
62
  - [semantic-release-vsce](https://github.com/raix/semantic-release-vsce)
63
- - `verifyConditions`: Verify the presence and the validity of the vsce authentication and release configuration
63
+ - `verifyConditions`: Verify the presence and the validity of the "VS Code extension" authentication and release configuration
64
64
  - `prepare`: Create a `.vsix` for distribution
65
65
  - `publish`: Publish the package to the Visual Studio Code marketplace
66
66
  - [semantic-release-verify-deps](https://github.com/piercus/semantic-release-verify-deps)
@@ -84,7 +84,7 @@
84
84
  - `prepare`: Changes the version number in the `pom.xml` (or all `pom.xml` files in maven projects with multiple `pom.xml` files) and optionally creates a commit with this version number and pushes it to `master`
85
85
  - `publish`: Runs `mvn deploy` to deploy to maven central and optionally will update to next snapshot version and merge changes to development branch
86
86
  - [semantic-release-ado](https://github.com/lluchmk/semantic-release-ado)
87
- - `prepare`: Stores the version number as an Azure DevOps pipeline variable availabe to downstream steps on the job
87
+ - `prepare`: Stores the version number as an Azure DevOps pipeline variable available to downstream steps on the job
88
88
  - [gradle-semantic-release](https://github.com/KengoTODA/gradle-semantic-release-plugin)
89
89
  - `verifyConditions`: Verify that project has a Gradle wrapper script, and `build.gradle` contains a task to publish artifacts.
90
90
  - `prepare`: Changes the version number in the `gradle.properties`
@@ -157,3 +157,12 @@
157
157
  - `verifyConditions`: Verify plugin configuration and login to Helm registry
158
158
  - `prepare`: Package Helm chart to local folder
159
159
  - `publish`: Publish Helm chart to OCI registry
160
+ - [semantic-release-space](https://github.com/123FLO321/semantic-release-space)
161
+ - `verifyConditions` Verifies that all required options are set.
162
+ - `prepare` Creates a JetBrains Space Deployment Target if it does not yet exist.
163
+ - `publish` Starts a JetBrains Space Deployment.
164
+ - `success` Marks the JetBrains Space Deployment as completed.
165
+ - `fail` Marks the JetBrains Space Deployment as failed.
166
+ - [semantic-release-react-native](https://github.com/alexandermendes/semantic-release-react-native)
167
+ - `verifyConditions` Validate configuration.
168
+ - `prepare` Version native iOS and Android files.
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Community configurations
8
8
  - [@jedmao/semantic-release-npm-github-config](https://github.com/jedmao/semantic-release-npm-github-config)
9
- - Provides an informative [git](https://github.com/semantic-release/git) commit message for the release commit that does not trigger continuous integration and conforms to the [conventional commits specification](https://www.conventionalcommits.org/) (e.g., "chore(release): 1.2.3 [skip ci]\n\nnotes").
9
+ - Provides an informative [Git](https://github.com/semantic-release/git) commit message for the release commit that does not trigger continuous integration and conforms to the [conventional commits specification](https://www.conventionalcommits.org/) (e.g., `chore(release): 1.2.3 [skip ci]\n\nnotes`).
10
10
  - Creates a tarball that gets uploaded with each [GitHub release](https://github.com/semantic-release/github).
11
11
  - Publishes the same tarball to [npm](https://github.com/semantic-release/npm).
12
12
  - Commits the version change in `package.json`.
@@ -18,4 +18,3 @@
18
18
  - Updates GitHub release with release-notes.
19
19
  - Bumps a version in package.json.
20
20
  - Publishes the new version to [NPM](https://npmjs.org).
21
-
@@ -22,14 +22,12 @@ Finally, we call our release job with a `requires` parameter so that `release` w
22
22
  ```yaml
23
23
  version: 2.1
24
24
  orbs:
25
- node: circleci/node@4.5
25
+ node: circleci/node@5.0.0
26
26
  jobs:
27
27
  release:
28
28
  executor: node/default
29
29
  steps:
30
30
  - checkout
31
- - node/install
32
- lts: true
33
31
  - node/install-packages # Install and automatically cache packages
34
32
  # Run optional required steps before releasing
35
33
  # - run: npm run build-script
@@ -14,7 +14,7 @@ GitLab CI supports [Pipelines](https://docs.gitlab.com/ee/ci/pipelines.html) all
14
14
 
15
15
  ### `.gitlab-ci.yml` configuration for Node projects
16
16
 
17
- This example is a minimal configuration for **semantic-release** with a build running Node 10 and 12. See [GitLab CI - Configuration of your jobs with .gitlab-ci.yml](https://docs.gitlab.com/ee/ci/yaml/README.html) for additional configuration options.
17
+ This example is a minimal configuration for **semantic-release** with a build running Node 10 and 12. See [GitLab CI - Configuration of your jobs with `.gitlab-ci.yml`](https://docs.gitlab.com/ee/ci/yaml/README.html) for additional configuration options.
18
18
 
19
19
  **Note**: The`semantic-release` execution command varies depending on whether you are using a [local](../../usage/installation.md#local-installation) or [global](../../usage/installation.md#global-installation) **semantic-release** installation.
20
20
 
@@ -48,7 +48,7 @@ publish:
48
48
 
49
49
  ### `.gitlab-ci.yml` configuration for all projects
50
50
 
51
- This example is a minimal configuration for **semantic-release** with a build running Node 10 and 12. See [GitLab CI - Configuration of your jobs with .gitlab-ci.yml](https://docs.gitlab.com/ee/ci/yaml/README.html) for additional configuration options.
51
+ This example is a minimal configuration for **semantic-release** with a build running Node 10 and 12. See [GitLab CI - Configuration of your jobs with `.gitlab-ci.yml`](https://docs.gitlab.com/ee/ci/yaml/README.html) for additional configuration options.
52
52
 
53
53
  **Note**: The`semantic-release` execution command varies depending if you are using a [local](../../usage/installation.md#local-installation) or [global](../../usage/installation.md#global-installation) **semantic-release** installation.
54
54
 
@@ -66,8 +66,8 @@ release:
66
66
  - npm install -g semantic-release @semantic-release/gitlab
67
67
  script:
68
68
  - semantic-release
69
- only:
70
- - master
69
+ rules:
70
+ - if: $CI_COMMIT_BRANCH == "master"
71
71
 
72
72
  release:
73
73
  image: node:12-buster-slim
@@ -77,8 +77,8 @@ release:
77
77
  - npm install -g semantic-release @semantic-release/gitlab
78
78
  script:
79
79
  - semantic-release
80
- only:
81
- - master
80
+ rules:
81
+ - if: $CI_COMMIT_BRANCH == "master"
82
82
  ```
83
83
 
84
84
  ### `package.json` configuration
@@ -1,6 +1,6 @@
1
1
  # Publishing on distribution channels
2
2
 
3
- This recipe will walk you through a simple example that uses distribution channels to make releases available only to a subset of users, in order to collect feedbacks before distributing the release to all users.
3
+ This recipe will walk you through a simple example that uses distribution channels to make releases available only to a subset of users, in order to collect feedback before distributing the release to all users.
4
4
 
5
5
  This example uses the **semantic-release** default configuration:
6
6
  - [branches](../../usage/configuration.md#branches): `['+([0-9])?(.{+([0-9]),x}).x', 'master', 'next', 'next-major', {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}]`
@@ -44,7 +44,7 @@ Yes, **semantic-release** is a Node CLI application, but it can be used to publi
44
44
 
45
45
  To publish a non-Node package (without a `package.json`) you would need to:
46
46
  - Use a [global](../usage/installation.md#global-installation) **semantic-release** installation
47
- - Set **semantic-release** [options](../usage/configuration.md#options) via [CLI arguments or rc file](../usage/configuration.md#configuration)
47
+ - Set **semantic-release** [options](../usage/configuration.md#options) via [CLI arguments or `.rc` file](../usage/configuration.md#configuration)
48
48
  - Make sure your CI job executing the `semantic-release` command has access to a version of Node that [meets our version requirement](./node-version.md) to execute the `semantic-release` command
49
49
 
50
50
  See the [CI configuration recipes](../recipes/release-workflow/README.md#ci-configurations) for more details on specific CI environments.
@@ -153,7 +153,7 @@ Any npm compatible registry is supported with the [`@semantic-release/npm`](http
153
153
 
154
154
  See [npm registry authentication](https://github.com/semantic-release/npm#npm-registry-authentication) for more details.
155
155
 
156
- See [Artifactory - npm Registry](https://www.jfrog.com/confluence/display/RTF/Npm+Registry#NpmRegistry-AuthenticatingthenpmClient) documentation for Artifactiry configuration.
156
+ See [Artifactory - npm Registry](https://www.jfrog.com/confluence/display/RTF/Npm+Registry#NpmRegistry-AuthenticatingthenpmClient) documentation for Artifactory configuration.
157
157
 
158
158
  ## Can I manually trigger the release of a specific version?
159
159
 
@@ -1,6 +1,6 @@
1
1
  # Node version requirement
2
2
 
3
- **semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which requires **requires Node version 14.17 or higher**.
3
+ **semantic-release** is written using the latest [ECMAScript 2017](https://www.ecma-international.org/publications/standards/Ecma-262.htm) features, without transpilation which **requires Node version 14.17 or higher**.
4
4
 
5
5
  **semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency.
6
6
  Therefore, the only constraint is to run the `semantic-release` in a CI environment providing version of Node that meets our version requirement.
@@ -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/ci-configurations/README.md) for more details.
16
+ See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) for more details.
17
17
 
18
18
  ## Authentication
19
19
 
@@ -26,7 +26,7 @@ See [CI configuration recipes](../recipes/ci-configurations/README.md) for more
26
26
  | `GH_TOKEN` or `GITHUB_TOKEN` | A GitHub [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line). |
27
27
  | `GL_TOKEN` or `GITLAB_TOKEN` | A GitLab [personal access token](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html). |
28
28
  | `BB_TOKEN` or `BITBUCKET_TOKEN` | A Bitbucket [personal access token](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html). |
29
- | `BB_TOKEN_BASIC_AUTH` or `BITBUCKET_TOKEN_BASIC_AUTH` | A Bitbucket [personal access token](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html) with basic auth support. For clearification `user:token` has to be the value of this env. |
29
+ | `BB_TOKEN_BASIC_AUTH` or `BITBUCKET_TOKEN_BASIC_AUTH` | A Bitbucket [personal access token](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html) with basic auth support. For clarification `user:token` has to be the value of this env. |
30
30
  | `GIT_CREDENTIALS` | [URL encoded](https://en.wikipedia.org/wiki/Percent-encoding) Git username and password in the format `<username>:<password>`. The username and password must each be individually URL encoded, not the `:` separating them. |
31
31
 
32
32
  Alternatively the Git authentication can be set up via [SSH keys](../recipes/git-hosted-services/git-auth-ssh-keys.md).
@@ -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/ci-configurations/README.md) for more details on how to configure environment variables in your CI service.
47
+ See [CI configuration recipes](../recipes/ci-configurations#ci-configurations) 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).
@@ -69,8 +69,8 @@ The branches on which releases should happen. By default **semantic-release** wi
69
69
  - regular releases to a distribution channel matching the branch name from any existing branch with a name matching a maintenance release range (`N.N.x` or `N.x.x` or `N.x` with `N` being a number)
70
70
  - regular releases to the `next` distribution channel from the branch `next` if it exists
71
71
  - regular releases to the `next-major` distribution channel from the branch `next-major` if it exists
72
- - prereleases to the `beta` distribution channel from the branch `beta` if it exists
73
- - prereleases to the `alpha` distribution channel from the branch `alpha` if it exists
72
+ - pre-releases to the `beta` distribution channel from the branch `beta` if it exists
73
+ - pre-releases to the `alpha` distribution channel from the branch `alpha` if it exists
74
74
 
75
75
  **Note**: If your repository does not have a release branch, then **semantic-release** will fail with an `ERELEASEBRANCHES` error message. If you are using the default configuration, you can fix this error by pushing a `master` branch.
76
76
 
@@ -116,7 +116,7 @@ Type: `Boolean`<br>
116
116
  Default: `false` if running in a CI environment, `true` otherwise<br>
117
117
  CLI arguments: `-d`, `--dry-run`
118
118
 
119
- The objective of the dry-run mode is to get a preview of the pending release. Dry-run mode skips the following steps: prepare, publish, success and fail. In addition to this it prints the next version and release notes to the console.
119
+ The objective of the dry-run mode is to get a preview of the pending release. Dry-run mode skips the following steps: prepare, publish, addChannel, success and fail. In addition to this it prints the next version and release notes to the console.
120
120
 
121
121
  **Note**: The Dry-run mode verifies the repository push permission, even though nothing will be pushed. The verification is done to help user to figure out potential configuration issues.
122
122
 
package/index.js CHANGED
@@ -75,7 +75,7 @@ async function run(context, plugins) {
75
75
  }
76
76
 
77
77
  logger[options.dryRun ? 'warn' : 'success'](
78
- `Run automated release from branch ${ciBranch} on repository ${options.repositoryUrl}${
78
+ `Run automated release from branch ${ciBranch} on repository ${options.originalRepositoryURL}${
79
79
  options.dryRun ? ' in dry-run mode' : ''
80
80
  }`
81
81
  );
@@ -263,6 +263,7 @@ module.exports = async (cliOptions = {}, {cwd = process.cwd(), env = process.env
263
263
  context.logger.log(`Running ${pkg.name} version ${pkg.version}`);
264
264
  try {
265
265
  const {plugins, options} = await getConfig(context, cliOptions);
266
+ options.originalRepositoryURL = options.repositoryUrl;
266
267
  context.options = options;
267
268
  try {
268
269
  const result = await run(context, plugins);
@@ -27,6 +27,7 @@ module.exports = async (repositoryUrl, ciBranch, context) => {
27
27
 
28
28
  const errors = [];
29
29
  const branchesByType = Object.entries(DEFINITIONS).reduce(
30
+ // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
30
31
  (branchesByType, [type, {filter}]) => ({[type]: branches.filter(filter), ...branchesByType}),
31
32
  {}
32
33
  );
@@ -16,6 +16,7 @@ const prerelease = {
16
16
  };
17
17
 
18
18
  const release = {
19
+ // eslint-disable-next-line unicorn/no-fn-reference-in-iterator
19
20
  filter: (branch) => !maintenance.filter(branch) && !prerelease.filter(branch),
20
21
  branchesValidator: (branches) => branches.length <= 3 && branches.length > 0,
21
22
  };
@@ -89,7 +89,7 @@ module.exports = async (context) => {
89
89
  try {
90
90
  debug('Verifying ssh auth by attempting to push to %s', repositoryUrl);
91
91
  await verifyAuth(repositoryUrl, branch.name, {cwd, env});
92
- } catch (_) {
92
+ } catch {
93
93
  debug('SSH key auth failed, falling back to https.');
94
94
  const envVars = Object.keys(GIT_TOKENS).filter((envVar) => !isNil(env[envVar]));
95
95
 
package/lib/git.js CHANGED
@@ -116,7 +116,7 @@ async function fetch(repositoryUrl, branch, ciBranch, execaOptions) {
116
116
  ],
117
117
  execaOptions
118
118
  );
119
- } catch (_) {
119
+ } catch {
120
120
  await execa(
121
121
  'git',
122
122
  [
@@ -144,7 +144,7 @@ async function fetchNotes(repositoryUrl, execaOptions) {
144
144
  ['fetch', '--unshallow', repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`],
145
145
  execaOptions
146
146
  );
147
- } catch (_) {
147
+ } catch {
148
148
  await execa('git', ['fetch', repositoryUrl, `+refs/notes/${GIT_NOTE_REF}:refs/notes/${GIT_NOTE_REF}`], {
149
149
  ...execaOptions,
150
150
  reject: false,
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": "19.0.2",
4
+ "version": "19.0.5",
5
5
  "author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",
6
6
  "ava": {
7
7
  "files": [
@@ -57,7 +57,7 @@
57
57
  "dockerode": "3.3.1",
58
58
  "file-url": "3.0.0",
59
59
  "fs-extra": "9.1.0",
60
- "got": "11.8.3",
60
+ "got": "11.8.5",
61
61
  "js-yaml": "4.1.0",
62
62
  "mockserver-client": "5.11.2",
63
63
  "nock": "13.2.1",
@@ -67,7 +67,7 @@
67
67
  "sinon": "12.0.1",
68
68
  "stream-buffers": "3.0.2",
69
69
  "tempy": "1.0.1",
70
- "xo": "0.29.1"
70
+ "xo": "0.32.1"
71
71
  },
72
72
  "engines": {
73
73
  "node": ">=16 || ^14.17"
@@ -129,6 +129,7 @@
129
129
  "prettier": true,
130
130
  "space": true,
131
131
  "rules": {
132
+ "unicorn/no-reduce": "off",
132
133
  "unicorn/string-content": "off"
133
134
  }
134
135
  },