You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Fixes#21
Add support for full semantic versioning in `engines` field of `package.json`.
* **action.yml**
- Add a new input `updaters.engines.fullVersion` to enable full semantic versioning.
* **src/index.ts**
- Add a new constant `updatersEnginesFullVersion` to get the input for full semantic versioning.
- Add `updatersEnginesFullVersion` to the `inputs` object.
* **src/updateNodeVersions.ts**
- Add `updatersEnginesFullVersion` to the `Inputs` type.
- Pass `updatersEnginesFullVersion` to the `engines` function.
* **src/updaters/engines.ts**
- Add a new parameter `fullVersion` to the `engines` function.
- Update the `engines` function to set the `engines.node` field to `>=` followed by the full version if `fullVersion` is true.
* **README.md**
- Update the `Engines` section to mention support for full semantic versioning.
- Add an example of using the `updaters.engines.fullVersion` input.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/hongaar/update-node-versions/issues/21?shareId=XXXX-XXXX-XXXX-XXXX).
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 thepackage.json
Desired behaviour
When using this workflow, I can update the
engines
field in mypackage.json
to match the full version resolved by Node from the inputted version.Example
Workflow file configuration
Desired
package.json
Output (usingLTS = 20.15.1
)Current
package.json
Output (usingLTS = 20.15.1
)Proposition
This could be an input provided for the engines field, like
updaters.engines.fullVersion
or something like that. It could be used forupdaters.files
too, but it's not necessary forupdaters.workflows
as Github Action automatically pulls the latest version when specifying a major anyway.The text was updated successfully, but these errors were encountered: