Skip to content

Supporting Node.js 14 and 16 LTS as the runtime of JavaScript action #772

Description

@peaceiris

Describe the enhancement

Node.js v14.15.0 has been released and the 14.x release line now moves into Active LTS. Can the GitHub Actions runner support it as the runtime of a JavaScript (TypeScript) action? Is there a roadmap for this?

Code Snippet

Today, we can set node12 to runs.using.

runs:
  using: 'node12'
  main: 'main.js'

Can we set node14 (or node16) as follows?

runs:
  using: 'node14'
  main: 'main.js'

Additional information

https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions

We also need to update the documentation when node14 is available.

Activity

  1. viceice commented on Oct 29, 2020

    @viceice

    Looks like this is not easy 😭

    else if (string.Equals(usingToken.Value, "node12", StringComparison.OrdinalIgnoreCase))
    {
    if (string.IsNullOrEmpty(mainToken?.Value))
    {
    throw new ArgumentNullException($"You are using a JavaScript Action but there is not an entry JavaScript file provided in {fileRelativePath}.");
    }
    else
    {
    return new NodeJSActionExecutionData()
    {
    Script = mainToken.Value,
    Pre = preToken?.Value,
    InitCondition = preIfToken?.Value ?? "always()",
    Post = postToken?.Value,
    CleanupCondition = postIfToken?.Value ?? "always()"
    };
    }
    }

  2. ad-m commented on Nov 22, 2020

    @ad-m
  3. peaceiris commented on Nov 22, 2020

    @peaceiris
    Author

    No. This is a problem of the actions/runner.

    peaceiris/actions-gh-pages#539

    https://github.com/peaceiris/actions-gh-pages/pull/539/checks?check_run_id=1437553870#step:19:20
    Error: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter ''using: node14' is not supported, use 'docker' or 'node12' instead.')

  4. TingluoHuang commented on Jan 5, 2021

    @TingluoHuang
    Member

    We need:

    • compile alpine node14
    • update the ./external.sh script to download the node14
    • update C# code and yaml schema to support node14
    • update documentation
  5. added a commit that references this issue on Jan 5, 2021
  6. littlewall commented on Apr 8, 2021

    @littlewall

    Hello,
    Is there any update on this or timeline of when to expect this feature?

    Thank you,
    Milan Zítka

  7. ianwalter commented on May 14, 2021

    @ianwalter

    @TingluoHuang I started working on this but I don't have any significant experience with C# so any help or direction would be much appreciated.

  8. TingluoHuang commented on Jun 4, 2021

    @TingluoHuang
    Member

    Should we just wait for node.js 16 to become LTS and then directly goes to node 16? I don't see too many benefits that go to node 14.

  9. mktcode commented on Jun 4, 2021

    @mktcode

    "Active LTS Start: 2021-10-26"
    https://nodejs.org/en/about/releases/

    not that far away 👍🏻

  10. bryanmacfarlane commented on Jun 4, 2021

    @bryanmacfarlane
    Contributor

    ... we could even start much sooner with using: node14 support in preview to find and flush out any potential issues. no need to wait till October ... we'll just have to turn the crank it least a couple of times. But I do like going straight to 16.

  11. rethab commented on Jun 4, 2021

    @rethab
    Contributor

    What would be the benefit of supporting node 14? Any features that would be unlocked by using it?

  12. gr2m commented on Jun 4, 2021

    @gr2m

    among other things: top-level await, which is great for CLI apps, such as actions written in JS

  13. mktcode commented on Jun 4, 2021

    @mktcode
  14. 16 remaining items

  15. self-assigned this
    on Oct 25, 2021
  16. invaderb commented on Nov 13, 2021

    @invaderb

    Any update on this? I have a few projects I'm looking to update to version 14

  17. peaceiris commented on Dec 1, 2021

    @peaceiris
    Author

    The pull-request #1439 will close this and be released in version 2.285.0. (Note: there is no option for node14)

  18. added a commit that references this issue on Jan 3, 2022
  19. added a commit that references this issue on May 10, 2022
  20. added a commit that references this issue on Sep 24, 2022
  21. added a commit that references this issue on Nov 15, 2022
  22. added a commit that references this issue on Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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