Skip to content

Commit 6a92e53

Browse files
authored
Merge pull request #238 from semantic-release-plus/merge-upstream-20210908
Merge-upstream-20210908
2 parents 0d82f24 + 1a05f8f commit 6a92e53

File tree

12 files changed

+38
-68
lines changed

12 files changed

+38
-68
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
matrix:
3636
node-version:
37-
- 10.18.0
37+
- 10.19.0
3838
- 12
3939
- 14
4040
runs-on: ubuntu-latest
@@ -47,8 +47,6 @@ jobs:
4747
with:
4848
node-version: ${{ matrix.node-version }}
4949
cache: npm
50-
- name: Ensure dependencies are compatible with the version of node
51-
run: echo 'engine-strict=true' >> .npmrc
5250
- run: npm ci
5351
- run: npm run test:ci
5452

@@ -60,11 +58,12 @@ jobs:
6058
- uses: actions/checkout@v2
6159
- uses: actions/setup-node@v2
6260
with:
61+
node-version: 16
6362
cache: npm
6463
# run npm link to install current directory globally this is similar to `sudo npm install -g semantic-release`
6564
# we need to eat our own dog food not our previously published version
6665
- run: sudo npm link
6766
- run: npx semantic-release-plus
6867
env:
6968
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70-
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}
69+
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ In order to use **semantic-release** you need:
111111
- To host your code in a [Git repository](https://git-scm.com)
112112
- Use a Continuous Integration service that allows you to [securely set up credentials](docs/usage/ci-configuration.md#authentication)
113113
- Git CLI version [2.7.1 or higher](docs/support/FAQ.md#why-does-semantic-release-require-git-version--271) installed in your Continuous Integration environment
114-
- [Node.js](https://nodejs.org) version [10.18 or higher](docs/support/FAQ.md#why-does-semantic-release-require-node-version--1018) installed in your Continuous Integration environment
114+
- [Node.js](https://nodejs.org) version [10.19 or higher](docs/support/FAQ.md#why-does-semantic-release-require-node-version--1019) installed in your Continuous Integration environment
115115

116116
## Documentation
117117

docs/recipes/github-actions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
## Environment variables
44

5-
The [Authentication](../usage/ci-configuration.md#authentication) environment variables can be configured with [Secret Variables](https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables).
5+
The [Authentication](../usage/ci-configuration.md#authentication) environment variables can be configured with [Secret Variables](https://docs.github.com/en/actions/reference/encrypted-secrets).
66

77
In this example a publish type [`NPM_TOKEN`](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) is required to publish a package to the npm registry. GitHub Actions [automatically populate](https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret) a [`GITHUB_TOKEN`](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) environment variable which can be used in Workflows.
88

99
## Node project configuration
1010

1111
[GitHub Actions](https://github.com/features/actions) support [Workflows](https://help.github.com/en/articles/configuring-workflows), allowing to run tests on multiple Node versions and publish a release only when all test pass.
1212

13-
**Note**: The publish pipeline must run on [Node version >= 10.18](../support/FAQ.md#why-does-semantic-release-require-node-version--1018).
13+
**Note**: The publish pipeline must run on [Node version >= 10.19](../support/FAQ.md#why-does-semantic-release-require-node-version--1019).
1414

1515
### `.github/workflows/release.yml` configuration for Node projects
1616

17-
The following is a minimal configuration for [`semantic-release`](https://github.com/semantic-release/semantic-release) with a build running on Node 12 when a new commit is pushed to a `master` branch. See [Configuring a Workflow](https://help.github.com/en/articles/configuring-a-workflow) for additional configuration options.
17+
The following is a minimal configuration for [`semantic-release`](https://github.com/semantic-release/semantic-release) with a build running on Node 10.19 when a new commit is pushed to a `master` branch. See [Configuring a Workflow](https://help.github.com/en/articles/configuring-a-workflow) for additional configuration options.
1818

1919
```yaml
2020
name: Release
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Node.js
3535
uses: actions/setup-node@v1
3636
with:
37-
node-version: 12
37+
node-version: '10.19'
3838
- name: Install dependencies
3939
run: npm ci
4040
- name: Release

docs/recipes/gitlab-ci.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The [Authentication](../usage/ci-configuration.md#authentication) environment va
1010

1111
GitLab CI supports [Pipelines](https://docs.gitlab.com/ee/ci/pipelines.html) allowing to test on multiple Node versions and publishing a release only when all test pass.
1212

13-
**Note**: The publish pipeline must run a [Node >= 10.18 version](../support/FAQ.md#why-does-semantic-release-require-node-version--1018).
13+
**Note**: The publish pipeline must run a [Node >= 10.19 version](../support/FAQ.md#why-does-semantic-release-require-node-version--1019).
1414

1515
### `.gitlab-ci.yml` configuration for Node projects
1616

@@ -54,7 +54,7 @@ This example is a minimal configuration for **semantic-release** with a build ru
5454

5555

5656
```yaml
57-
# The release pipeline will run only on the master branch a commit is triggered
57+
# The release pipeline will run only on the master branch a commit is triggered
5858
stages:
5959
- release
6060

docs/recipes/jenkins-ci.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Alternatively, the default `NPM_TOKEN` and `GH_TOKEN` can be easily [setup with
1010

1111
### `Jenkinsfile (Declarative Pipeline)` configuration for a Node.js job
1212

13-
**Note**: The publish pipeline must run a [Node >= 10.18 version](../support/FAQ.md#why-does-semantic-release-require-node-version--1018).
13+
**Note**: The publish pipeline must run a [Node >= 10.19 version](../support/FAQ.md#why-does-semantic-release-require-node-version--1019).
1414

1515
This example is a minimal configuration for **semantic-release** with a build running Node 10.18. See [Jenkins documentation](https://www.jenkins.io/doc/) for additional configuration options.
1616

@@ -19,7 +19,7 @@ The`semantic-release` execution command varies depending if you are using a [loc
1919
```yaml
2020
// The release stage in the pipeline will run only if the test stage in the pipeline is successful
2121
pipeline {
22-
agent any
22+
agent any
2323
environment {
2424
GH_TOKEN = credentials('some-id')
2525
}
@@ -35,14 +35,14 @@ pipeline {
3535
}
3636
stage('Release') {
3737
tools {
38-
nodejs "node 10.18"
38+
nodejs "node 10.19"
3939
}
4040
steps {
4141
sh '''
4242
# Run optional required steps before releasing
4343
npx semantic-release
4444
'''
45-
}
45+
}
4646
}
4747
}
4848
}
@@ -58,4 +58,4 @@ A `package.json` is required only for [local](../usage/installation.md#local-ins
5858
"semantic-release": "^15.0.0"
5959
}
6060
}
61-
```
61+
```

docs/recipes/travis.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Alternatively, the default `NPM_TOKEN` and `GH_TOKEN` can be easily [setup with
1010

1111
### `.travis.yml` configuration for multiple Node.js jobs
1212

13-
This example is a minimal configuration for **semantic-release** with a build running Node 6 and 8. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
13+
This example is a minimal configuration for **semantic-release** with a build running Node 10 and 12. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
1414

1515
This example creates a `release` [build stage](https://docs.travis-ci.com/user/build-stages) that [runs `semantic-release` only after all test jobs are successful](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded).
1616

@@ -24,8 +24,8 @@ It's recommended to run the `semantic-release` command in the [Travis `deploy` s
2424
language: node_js
2525

2626
node_js:
27-
- 8
28-
- 6
27+
- 10
28+
- 12
2929

3030
jobs:
3131
include:

docs/support/FAQ.md

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,44 +38,14 @@ If using npm hook scripts is not possible, and alternative solution is to [`@sem
3838

3939
Yes with the [dry-run options](../usage/configuration.md#dryrun) which prints to the console the next version to be published and the release notes.
4040

41-
## Can I use semantic-release with Yarn?
42-
43-
If you are using a [local](../usage/installation.md#local-installation) **semantic-release** installation and run multiple CI jobs with different versions, the `yarn install` command will fail on jobs running with Node < 8 as **semantic-release** requires [Node >= 10.18](#why-does-semantic-release-require-node-version--1018) and specifies it in its `package.json`s [`engines`](https://docs.npmjs.com/files/package.json#engines) key.
44-
45-
The recommended solution is to use the [Yarn](https://yarnpkg.com) [--ignore-engines](https://yarnpkg.com/en/docs/cli/install#toc-yarn-install-ignore-engines) option to install the project dependencies on the CI environment, so Yarn will ignore the **semantic-release**'s `engines` key:
46-
47-
```bash
48-
$ yarn install --ignore-engines
49-
```
50-
51-
**Note**: Several CI services use Yarn by default if your repository contains a `yarn.lock` file. So you should override the install step to specify `yarn install --ignore-engines`.
52-
53-
Alternatively you can use a [global](../usage/installation.md#global-installation) **semantic-release** installation and make sure to install and run the `semantic-release` command only in a CI jobs running with Node >= 10.18.
54-
55-
If your CI environment provides [nvm](https://github.com/creationix/nvm) you can switch to Node 8 before installing and running the `semantic-release` command:
56-
57-
```bash
58-
$ nvm install 8 && yarn global add semantic-release && semantic-release
59-
```
60-
61-
See the [CI configuration recipes](../recipes/README.md#ci-configurations) for more details on specific CI environments.
62-
63-
As `semantic-release` is recommended to be executed with [`npx`](https://www.npmjs.com/package/npx) an alternative is required for usage with Yarn. Even though it is possible to install npx with Yarn, it's not recommended. Yarn and npx would be using different cache locations.
64-
65-
For [local installation](../usage/installation.md#local-installation) replace
66-
`npx semantic-release` with `yarn run semantic-release`.
67-
68-
For [global installation](../usage/installation.md#global-installation) replace
69-
`npx semantic-release` with `yarn global add semantic-release && semantic-release`.
70-
7141
## Can I use semantic-release to publish non-JavaScript packages?
7242

73-
Yes, **semantic-release** is a Node CLI application but it can be used to publish any type of packages.
43+
Yes, **semantic-release** is a Node CLI application, but it can be used to publish any type of packages.
7444

7545
To publish a non-Node package (without a `package.json`) you would need to:
7646
- Use a [global](../usage/installation.md#global-installation) **semantic-release** installation
7747
- Set **semantic-release** [options](../usage/configuration.md#options) via [CLI arguments or rc file](../usage/configuration.md#configuration)
78-
- Make sure your CI job executing the `semantic-release` command has access to [Node >= 10.18](#why-does-semantic-release-require-node-version--1018) to execute the `semantic-release` command
48+
- Make sure your CI job executing the `semantic-release` command has access to [Node >= 10.19](#why-does-semantic-release-require-node-version--1019) to execute the `semantic-release` command
7949

8050
See the [CI configuration recipes](../recipes/README.md#ci-configurations) for more details on specific CI environments.
8151

@@ -234,9 +204,9 @@ See [“Introduction to SemVer” - Irina Gebauer](https://blog.greenkeeper.io/i
234204

235205
In addition the [verify conditions step](../../README.md#release-steps) verifies that all necessary conditions for proceeding with a release are met, and a new release will be performed [only if all your tests pass](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded).
236206

237-
## Why does semantic-release require Node version >= 10.18?
207+
## Why does semantic-release require Node version >= 10.19?
238208

239-
**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 10.18 or higher**.
209+
**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 10.19 or higher**.
240210

241211
See [Node version requirement](./node-version.md#node-version-requirement) for more details and solutions.
242212

docs/support/node-support-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Node Support Policy
22

3-
We only support [Long-Term Support](https://github.com/nodejs/Release) versions of Node starting with [Node 8.9.0 (LTS)](https://nodejs.org/en/blog/release/v8.9.0).
3+
We only support [Long-Term Support](https://github.com/nodejs/Release) versions of Node starting with [Node 10.19 (LTS)](https://nodejs.org/en/blog/release/v10.19.0).
44

55
We specifically limit our support to LTS versions of Node, not because this package won't work on other versions, but because we have a limited amount of time, and supporting LTS offers the greatest return on that investment.
66

docs/support/node-version.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# Node version requirement
22

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 10 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 10.19 or higher**.
44

5-
**semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency. Therefore the only constraint is to run the `semantic-release` in a CI environment providing Node 8 or higher.
5+
**semantic-release** is meant to be used in a CI environment as a development support tool, not as a production dependency. Therefore, the only constraint is to run the `semantic-release` in a CI environment providing Node 10.19 or higher.
66

77
See our [Node Support Policy](node-support-policy.md) for our long-term promise regarding Node version support.
88

99
## Recommended solution
1010

11-
### Run at least one CI job with Node >= 10.18
11+
### Run at least one CI job with Node >= 10.19
1212

13-
The recommended approach is to run the `semantic-release` command from a CI job running on Node 10.18 or higher. This can either be a job used by your project to test on Node >= 10.18 or a dedicated job for the release steps.
13+
The recommended approach is to run the `semantic-release` command from a CI job running on Node 10.19 or higher. This can either be a job used by your project to test on Node >= 10.19 or a dedicated job for the release steps.
1414

1515
See [CI configuration](../usage/ci-configuration.md) and [CI configuration recipes](../recipes/README.md#ci-configurations) for more details.
1616

1717
## Alternative solutions
1818

1919
### Use `npx`
2020

21-
`npx` is included with npm >= 5.2 and can be used to download the latest [Node 8 package published on npm](https://www.npmjs.com/package/node). Use it to execute the `semantic-release` command.
21+
`npx` is included with npm >= 5.2 and can be used to download the latest [Node 10 package published on npm](https://www.npmjs.com/package/node). Use it to execute the `semantic-release` command.
2222

2323
```bash
24-
$ npx -p node@8 -c "npx semantic-release"
24+
$ npx -p node@10 -c "npx semantic-release"
2525
```
2626

2727
**Note:**: See [What is npx](./FAQ.md#what-is-npx) for more details.
2828

2929
### Use `nvm`
3030

31-
If your CI environment provides [nvm](https://github.com/creationix/nvm) you can use it to switch to Node 8 before running the `semantic-release` command.
31+
If your CI environment provides [nvm](https://github.com/creationix/nvm) you can use it to switch to Node 10.19 before running the `semantic-release` command.
3232

3333
```bash
34-
$ nvm install 8 && npx semantic-release
34+
$ nvm install 10.19 && npx semantic-release
3535
```

docs/usage/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ For other type of projects we recommend installing **semantic-release** directly
2424
$ npx semantic-release
2525
```
2626

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@15`). This way your build will not automatically use the next major **semantic-release** release that could possibly break your build. You will have to upgrade manually when a new major version is released.
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@17`). This way your build will not automatically use the next major **semantic-release** release that could possibly break your build. You will have to upgrade manually when a new major version is released.
2828

2929
**Note**: `npx` is a tool bundled with `npm@>=5.2.0`. It is used to conveniently install the semantic-release binary and to execute it. See [What is npx](../support/FAQ.md#what-is-npx) for more details.

0 commit comments

Comments
 (0)