Skip to content

Automatic discovery of version matching package.json engines #467

Closed

Description

@ad-m-ss

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.

Activity

  1. panticmilos commented on Apr 18, 2022

    @panticmilos
    Contributor

    Hi @ad-m-ss,

    We will investigate the possibility of adding this feature.

  2. The-Code-Monkey commented on Apr 19, 2022

    @The-Code-Monkey

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

  3. dominykas commented on Apr 19, 2022

    @dominykas

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

  4. dmitry-shibanov commented on Oct 3, 2022

    @dmitry-shibanov
    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.

  5. xrl commented on Dec 7, 2022

    @xrl

    @dmitry-shibanov it worked for me! Thanks!

  6. dmitry-shibanov commented on Jan 23, 2023

    @dmitry-shibanov
    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.

  7. added a commit that references this issue on Nov 9, 2023
    c7eeaf4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions