Skip to content

Commit ea52e17

Browse files
authored
fix(engines): fixed defined node version to account for the higher requirement from the npm plugin (#2088)
1 parent 5edff69 commit ea52e17

12 files changed

+42
-73
lines changed

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
node-version:
20-
- 10.18.0
20+
- 10.19.0
2121
- 12
2222
- 14
2323

@@ -32,8 +32,6 @@ jobs:
3232
with:
3333
node-version: ${{ matrix.node-version }}
3434
cache: npm
35-
- name: Ensure dependencies are compatible with the version of node
36-
run: echo 'engine-strict=true' >> .npmrc
3735
- run: npm ci
3836
- run: npm run test:ci
3937

@@ -48,4 +46,6 @@ jobs:
4846
with:
4947
cache: npm
5048
- run: npm ci
49+
- name: Ensure dependencies are compatible with the version of node
50+
5151
- run: npm run lint

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ In order to use **semantic-release** you need:
9797
- To host your code in a [Git repository](https://git-scm.com)
9898
- Use a Continuous Integration service that allows you to [securely set up credentials](docs/usage/ci-configuration.md#authentication)
9999
- 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
100-
- [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
100+
- [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
101101

102102
## Documentation
103103

docs/recipes/github-actions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ In this example a publish type [`NPM_TOKEN`](https://docs.npmjs.com/creating-and
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

+2-2
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

+5-5
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

+3-3
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

+4-34
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

+1-1
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

+8-8
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

+1-1
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.

package-lock.json

+9-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"delay": "5.0.0",
5757
"dockerode": "3.3.0",
5858
"file-url": "3.0.0",
59-
"fs-extra": "10.0.0",
59+
"fs-extra": "9.1.0",
6060
"got": "11.8.2",
6161
"js-yaml": "4.1.0",
6262
"mockserver-client": "5.11.2",
@@ -70,7 +70,7 @@
7070
"xo": "0.29.1"
7171
},
7272
"engines": {
73-
"node": ">=10.18"
73+
"node": ">=10.19"
7474
},
7575
"files": [
7676
"bin",

0 commit comments

Comments
 (0)