-
Couldn't load subscription status.
- Fork 0
Description
Context
I want to enforce a specific Node version in my repository with the full semantic versioning (i.e 20.15.1).
This Action however truncates the Node version to the major number, which means that we can only enforce a major of Node locally using the engines field of the package.json
Desired behaviour
When using this workflow, I can update the engines field in my package.json to match the full version resolved by Node from the inputted version.
Example
Workflow file configuration
# workflow.yml
- uses: hongaar/update-node-versions@v2
with:
versions: lts
updaters.workflows: false
updaters.engines: trueDesired package.json Output (using LTS = 20.15.1)
"engines": {
"node": ">=20.15.1"
}Current package.json Output (using LTS = 20.15.1)
"engines": {
"node": ">=20"
}Proposition
This could be an input provided for the engines field, like updaters.engines.fullVersion or something like that. It could be used for updaters.files too, but it's not necessary for updaters.workflows as Github Action automatically pulls the latest version when specifying a major anyway.