New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(engines): fixed defined node version to account for the higher requirement from the npm plugin #2088
Merged
Merged
fix(engines): fixed defined node version to account for the higher requirement from the npm plugin #2088
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
91d3278
fix(engines): fixed defined node version to account for the higher re…
travi c1de0aa
ci(engines): switched engines compatibility enforcement to use `ls-en…
travi 6a75123
docs(engines): updated docs to account for the correction in the `eng…
travi 665000d
ci(engines): raised the lowest tested node version to match the fixed…
travi 9cc0ffe
ci(engines): moved the `ls-engines` check to after dependency install…
travi 8be56bb
ci(engines): moved the engines enforcement to the single job instead …
travi bba0c17
ci(engines): separated the `ls-engines` step to a step that runs on m…
travi 1800f8f
chore(fs-extra): downgraded to a version that is compatible with the …
travi 081558e
Revert "ci(engines): separated the `ls-engines` step to a step that r…
travi File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
# Node version requirement | ||
|
||
**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**. | ||
**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**. | ||
|
||
**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. | ||
**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. | ||
|
||
See our [Node Support Policy](node-support-policy.md) for our long-term promise regarding Node version support. | ||
|
||
## Recommended solution | ||
|
||
### Run at least one CI job with Node >= 10.18 | ||
### Run at least one CI job with Node >= 10.19 | ||
|
||
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. | ||
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. | ||
|
||
See [CI configuration](../usage/ci-configuration.md) and [CI configuration recipes](../recipes/README.md#ci-configurations) for more details. | ||
|
||
## Alternative solutions | ||
|
||
### Use `npx` | ||
|
||
`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. | ||
`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. | ||
|
||
```bash | ||
$ npx -p node@8 -c "npx semantic-release" | ||
$ npx -p node@10 -c "npx semantic-release" | ||
``` | ||
|
||
**Note:**: See [What is npx](./FAQ.md#what-is-npx) for more details. | ||
|
||
### Use `nvm` | ||
|
||
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. | ||
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. | ||
|
||
```bash | ||
$ nvm install 8 && npx semantic-release | ||
$ nvm install 10.19 && npx semantic-release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to add the node version explicitly here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think this needs to change from what we had before.
ls-engines
doesn't do its comparison against the current execution context like we expectedengine-strict
to do. instead, it analyzes the effectiveengines
range of the dependency tree and compares it against the project's declared engines range. it can do that in any version of node that can executels-engines
. does this explanation address the reason you were expecting an explicit version to be declared for this job?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah got it! In that case I'd set
node-version
to16
. Otherwise we get the OS default node version that might change any time. I probably set this up myself without settingnode-version
explicitly, but I'm doing that now everywhere. But we can do that later, it's outside of the scope hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, makes sense. since i like to keep a record of a preferred development node version in a
.nvmrc
file in the repo, i typically take care of this by referencing the value from that file in non-matrix jobs, like https://github.com/form8ion/project/blob/b05d76fa60e4c648efbaf98d8f68e69d0155da94/.github/workflows/node-ci.yml#L43There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll plan to get the explicit v16 added to that job as part of our wip v16 branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, looks like you already have a PR open for this in #2092 👍🏼