Skip to content
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

Automatic discovery of version matching package.json engines #467

Closed
ad-m-ss opened this issue Apr 17, 2022 · 6 comments
Closed

Automatic discovery of version matching package.json engines #467

ad-m-ss opened this issue Apr 17, 2022 · 6 comments
Labels
feature request New feature or request to improve the current logic

Comments

@ad-m-ss
Copy link

ad-m-ss commented Apr 17, 2022

Description:

In my organization we pin specific version of Node in package.json via engines.node.

https://docs.npmjs.com/cli/v7/configuring-npm/package-json#engines

It therefore seems redundant to include such information in the CI.

I would prefer the action to allow - if the appropriate package.json is detected - to look in engines.node in package.json and select the latest NodeJS version that meets the specified version range. This would be complementary to the current versioning mechanism and only have an effect if the version is not specified as an action parameter.

Justification:

DRY

Are you willing to submit a PR?

I would like discuss it first.

@ad-m-ss ad-m-ss added feature request New feature or request to improve the current logic needs triage labels Apr 17, 2022
@panticmilos
Copy link
Contributor

Hi @ad-m-ss,

We will investigate the possibility of adding this feature.

@The-Code-Monkey
Copy link

++ this is exactly what i was looking for having the ability to say node-version: package would be a good solution i think.

@dominykas
Copy link

There is something like this implemented in https://github.com/pkgjs/action

@dmitry-shibanov
Copy link
Contributor

Hello everyone. We released a new version with support for engines.node. You can try to specify package.json for node-version-file input to grad version from engines.node.

@xrl
Copy link

xrl commented Dec 7, 2022

@dmitry-shibanov it worked for me! Thanks!

@dmitry-shibanov
Copy link
Contributor

Hello everyone. I'm going to close the issue because we're not planing to enable it by default for now. The action supports getting version from different sources and it can be confusing to enable one of them by default for now.

rngadam added a commit to rngadam/setup-node that referenced this issue Jul 28, 2023
deining pushed a commit to deining/setup-node that referenced this issue Nov 9, 2023
* Add how to autodetect deleted files

The existing instructions make sense for when a predetermined list of files need to be removed. This is likely not a common use case so I shortened that explanation. 
Also added the explanation on how to use `--no-ignore-removal` as the `add` setting to have deleted files autodetected.

Fixes actions#467

* docs(README): update "Deleting files" paragraph

Co-authored-by: Federico <fgrandi30@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

6 participants