GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support aliases like LTS · Issue #26 · actions/setup-node

Support aliases like LTS #26

New issue
Copy link
New issue
Copy link
Closed
Closed
Support aliases like LTS#26
Copy link
Labels
enhancementNew feature or request

Description

@damccorm
damccorm
opened on Aug 9, 2019
Issue body actions

Right now, we're thinking it makes sense to support lts, latest, current, and LTS version names (e.g. dubinium)

Reacted by Gregor Martynus, Armand Abric, Filip Skokan, Michael Chris Lopez, Igor Novozhilov, Kagami Sascha Rosylight, Hiroaki ITO, Brad Dougherty, Ching C, Joseph Duffy and 110 more
Reacted by Anatolii Papenko, Yaroslav, esnya, Alexandr Artemyev, Shuqiao Zhang, Aleksandr Chebotov, bl-ue and Sylvain LE GLEAU

Activity

Next
  1. damccorm
    assigned
    stephenmichaelf
    on Aug 9, 2019
  2. wesleytodd commented on Aug 16, 2019

    @wesleytodd
    wesleytodd
    on Aug 16, 2019
    More actions

    nodejs/package-maintenance#236

    For reference, this is the alias list we are working out.

  3. JimiC commented on Sep 5, 2019

    @JimiC
    JimiC
    on Sep 5, 2019
    More actions

    @damccorm Do you mind if I give this a try to provide a PR?

  4. damccorm commented on Sep 6, 2019

    @damccorm
    damccorm
    on Sep 6, 2019
    ContributorAuthor
    More actions

    @JimiC that would be great! One thing to note is that we would like to make this completely automated (e.g. it shouldn't rely on hardcoding dubinium to 10.16).

    I've done a small bit of digging here, here are some things that might be helpful (apologies if you already know any/all of this):

    • http://nodejs.org/dist/ is the endpoint we hit right now. It has options for the latest versions of most of these packages.
    • https://nodejs.org/dist/index.json in particular has a lot of useful info. Note in particular the lts fields.
  5. panva commented on Sep 6, 2019

    @panva
    panva
    on Sep 6, 2019
    Contributor
    More actions

    this may be useful as a reference for using the dist json file.

  6. JimiC commented on Sep 6, 2019

    @JimiC
    JimiC
    on Sep 6, 2019
    More actions

    @damccorm Great!
    I had a look at the code and how you are fetching the node version and have an idea on how to tackle this issue. Before I start coding I'll present you my course of actions, in order for everyone to agree on it.

    Reacted by Danny McCormick
  7. ljharb commented on Sep 6, 2019

    @ljharb
    ljharb
    on Sep 6, 2019
    More actions

    You may also want to reference how https://github.com/nvm-sh/nvm parses that very tab file to support its LTS aliases.

  8. JimiC commented on Sep 9, 2019

    @JimiC
    JimiC
    on Sep 9, 2019
    More actions

    After a lot of thought and searching the docs of popular CI services (Azure Pipelines, AppVeyor, TravisCI, GitLab CI/CD, CircleCi) I come to the conclusion that the following should be supported:

    # shorthand of the latest version of node
    - node:
        alias:
            - ' '
            - current (?)
            - latest  (?)
    
    # shorthand of node version 4
    - argon:
        alias:
            - Argon
    
    # shorthand of node version 6
    - boron:
        alias:
            - Boron
    
    # shorthand of node version 8
    - carbon:
        alias:
            - Carbon
    
    # shorthand of node version 10
    - dubnium:
        alias:
            - Dubnium
    
    # shorthand of node version 12
    - erbium (?):
        alias:
            - Erbium
    

    Those with a question mark are cases that I like to discuss with you.

    • node is used as a shorthand in TravisCI and ' ' in AppVeyor. Should we also support those or are we going with our own shorthand like latest?
    • Erbium is pending and can't be yet automated. I'm just mentioning it here as a placeholder.

    From my POV lts/* should not be a choice, since the GitHub (Azure Pipelines) matrix.node-version property actually executes an iteration of the values specified, passing a single value of the version each time to create an instance.
    lts/* resolves to multiple node versions that can't be interpreted into firing up multiple instances.

    Similarly lts=dubnium should not be a choice either, simply specifying dubnium should suffice.

    I'm not sure if lts should be a choice either. Which node version should lts point to?

    Reacted by Danny McCormick
  9. damccorm commented on Sep 9, 2019

    @damccorm
    damccorm
    on Sep 9, 2019
    ContributorAuthor
    More actions

    This generally looks great. A couple thoughts.

    I think the idea of lts is that its the current lts. So right now, it would resolve to 10.x, but soon will resolve to 12.x. So lts and current are actually interchangeable here, while latest could resolve to a minor version (e.g. 13.x eventually). As long as we doc what we're doing there I think we'll be fine, the call from our product team based on customer conversations was supporting all 3 of these. I'd stick with these rather than go with a different placeholder, I think its a little more explicit this way.

    Agreed on using dubinium instead of lts=dubinium.

    Agreed on holding off on Erbium for now.

  10. JimiC commented on Sep 9, 2019

    @JimiC
    JimiC
    on Sep 9, 2019
    More actions

    One more clarification. According to https://nodejs.org/en/

    • lts -> 10.x
    • current -> 12.x which should also be resolved for shorthands ' ', node and latest

    Correct?

    Note: https://nodejs.org/en/about/releases/

    Reacted by Scott Andrews, Tierney Cyren, ExE Boss, Luiz Machado, bl-ue and Peter Szabo
  11. ljharb commented on Sep 9, 2019

    @ljharb
    ljharb
    on Sep 9, 2019
    More actions

    Is there a reason not to use nvm, and get all these conventional aliases for free?

    Reacted by Wes Todd, Denis Tuzhik, Brian Cavalier, Jason Walton and bl-ue
  12. JimiC commented on Sep 9, 2019

    @JimiC
    JimiC
    on Sep 9, 2019
    More actions

    If only nvm for windows was the same as for *nix, Been wanting to start such a project but time is against me.

  13. damccorm commented on Sep 9, 2019

    @damccorm
    damccorm
    on Sep 9, 2019
    ContributorAuthor
    More actions

    @JimiC yeah, you're right. I don't think we should resolve shorthands ' ' and node though. Those are pretty non-descriptive, so if you look at it and don't know what's going on it won't help you.

  14. JimiC commented on Sep 9, 2019

    @JimiC
    JimiC
    on Sep 9, 2019
    More actions

    OK. So we will dump the travis and appveyor shorthands and go with our own latest, current and lts ones.

    Summarizing:

    # shorthand of the latest version of node
    # (as of the time of writing it's `12.x`)
    - latest:
        alias:
            - current
    
    # shorthand of the recommended `lts` version of node
    # (as of the time of writing it's `10.x`)
    - lts
    
    # shorthand of node version 4.x
    - argon:
        alias:
            - Argon
    
    # shorthand of node version 6.x
    - boron:
        alias:
            - Boron
    
    # shorthand of node version 8.x
    - carbon:
        alias:
            - Carbon
    
    # shorthand of node version 10.x
    - dubnium:
        alias:
            - Dubnium
    
    # shorthand of node version 12.x
    - erbium:
        alias:
            - Erbium
    

    Note: As soon as Erbium is included in the index.json then it will be automatically supported.

    Reacted by Danny McCormick and Henri Bergius
  15. JimiC commented on Sep 9, 2019

    @JimiC
    JimiC
    on Sep 9, 2019
    More actions

    Something else that caught my eye while I was experimenting with jobs is that if you specify matrix.node-version: '' in strategy the setup-node resolves it to 10.x mainly because of this https://github.com/actions/setup-node/blob/master/action.yml#L10

    Should this resolve be kept? It's not documented and may create support.

  16. 86 remaining items

  17. tooomm commented on Jun 1, 2022

    @tooomm
    tooomm
    on Jun 1, 2022
    Contributor
    More actions

    Node.js currently has three supported releases. How do I target the "maintenance LTS".

    With #481 you should be able to solve this with lts/-1.

    To "test in CI against all currently supported major versions of Node.js", you would use lts/-1, lts/* and current.

    Reacted by Ivan and Chris Barth
  18. mightyiam commented on Jun 1, 2022

    @mightyiam
    mightyiam
    on Jun 1, 2022
    More actions

    Node.js currently has three supported releases. How do I target the "maintenance LTS".

    With #481 you should be able to solve this with lts/-1.

    To "test in CI against all currently supported major versions of Node.js", you would use lts/-1, lts/* and current.

    Yes, that should do. I'll keep an eye on that. Thanks, everyone.

    Reacted by Ivan
  19. JimiC commented on Jun 1, 2022

    @JimiC
    JimiC
    on Jun 1, 2022
    More actions

    If I'm not mistaken lts/* returns v14 (which is the maintenance LTS) and v16 (which is the active LTS). Maybe you should elaborate on what exactly you are trying to do.

  20. tooomm commented on Jun 1, 2022

    @tooomm
    tooomm
    on Jun 1, 2022
    Contributor
    More actions

    If I'm not mistaken lts/* returns v14 (which is the maintenance LTS) and v16 (which is the active LTS).

    Not sure. https://github.com/nvm-sh/nvm#long-term-support states:
    You can reference LTS versions in aliases and .nvmrc files with the notation 'lts/*' for the latest LTS.

  21. dominykas commented on Jun 1, 2022

    @dominykas
    dominykas
    on Jun 1, 2022
    More actions

    @mightyiam you could also try something like https://github.com/pkgjs/action which will automatically construct the test matrix and call setup-node for you.

  22. ljharb commented on Jun 1, 2022

    @ljharb
    ljharb
    on Jun 1, 2022
    More actions

    @JimiC you are mistaken. lts/* returns the latest LTS only. You can use lts/-1 etc, or lts/argon, to target a specific maintenance line, but anything that depends on support dates is not part of nvm - nvm’s aliases do not change with the passage of time, only with the release of new node versions.

  23. JimiC commented on Jun 1, 2022

    @JimiC
    JimiC
    on Jun 1, 2022
    More actions

    @JimiC you are mistaken. lts/* returns the latest LTS only. You can use lts/-1 etc, or lts/argon, to target a specific maintenance line, but anything that depends on support dates is not part of nvm - nvm’s aliases do not change with the passage of time, only with the release of new node versions.

    @ljharb Thanks for correcting me. Honestly I never use lts/* in my CI/CD as I like to have the control on what node version I'm targeting.

  24. msimerson commented on Jun 1, 2022

    @msimerson
    msimerson
    on Jun 1, 2022
    More actions

    Sure. I'd like to test in CI against all currently supported major versions of Node.js. And it would be nice if I didn't have to occasionally bump explicitly specified versions. That's all, really.

    That's exactly what I wanted, which is what I created this node-LTS-versions for. Give it a try.

  25. mightyiam commented on Jun 2, 2022

    @mightyiam
    mightyiam
    on Jun 2, 2022
    More actions

    Sure. I'd like to test in CI against all currently supported major versions of Node.js. And it would be nice if I didn't have to occasionally bump explicitly specified versions. That's all, really.

    That's exactly what I wanted, which is what I created this node-LTS-versions for. Give it a try.

    That works for me. Thank you. Everyone.

    Reacted by Matt Simerson
  26. dmitry-shibanov commented on Jun 7, 2022

    @dmitry-shibanov
    dmitry-shibanov
    on Jun 7, 2022
    Contributor
    More actions

    Hello everyone. We released a new version of the action with support of lts/-n aliases. The setup-node action supports such syntax.

    For now I'm going to close the issue. If you any updates feel free to ping us or create a separate issue.

    Reacted by Saran Tanpituckpong ✔️ and Dragan Filipović
    Reacted by Saran Tanpituckpong ✔️
  27. dmitry-shibanov
    closed this as completedon Jun 7, 2022
  28. kodiakhq
    added a commit that references this issue on Oct 9, 2022

    Bump all non-major dependencies (#7)

    8092753
  29. krzyk
    added a commit that references this issue on Apr 11, 2023

    Merge pull request actions#26 from akamai/feature/DEVPOPS-775

    834eb6c
  30. deining
    added a commit that references this issue on Nov 9, 2023

    Merge pull request actions#26 from jsoref/grammar

    2db7572
  31. CrispyBaguette
    added a commit that references this issue on Nov 8, 2024

    Update actions/setup-node action to v4 (#56)

    a2ef20d
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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.