Skip to content

Add .devcontainer #334

Closed
Closed

Description

@yeikel

It'd be nice to have a .devcontainer in this project as the default devcontainer starts with a much higher version of Node and NPM

Activity

  1. jeffwidman commented on Apr 7, 2023

    @jeffwidman
    Member

    Apologies, I'm not very familiar with the Actions/Typescript/Node/NPM ecosystems...

    Is there anything (other than time) holding us back from updating this to using the latest node/npm?

    Obviously that means this problem will recur down the road, but this project doesn't typically see a lot of traffic, so if we start running into problems again it's probably a good reminder to update...

    And this project is pretty simple so AFAIK we don't have a good reason to add a .devcontainer beyond pinning node/npm for dev purposes...

    And to be clear, not asking you to handle that, you are certainly welcome to but if you haven't time we can get to it too at some point.

  2. yeikel commented on Apr 7, 2023

    @yeikel
    ContributorAuthor

    From what I understand, the limitation is in Github because the default runners are shipping with the Node 16 runtime

    See actions/runner-images#5429 and https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions

    Also actions/runner-images#7002 (comment)

    I am seeing mixed results from the threads, but it is probably safer to stick with 16 for a little longer (and more so given the differences between GHE and github.com)

    To upgrade this action and use anything higher without any dependencies we would need to ask users to use an alternative container. This is technically doable (as it is a single line) but probably not desirable for everyone

  3. yeikel commented on Apr 7, 2023

    @yeikel
    ContributorAuthor

    I created a separate issue to track the potential upgrade:

  4. jeffwidman commented on Apr 7, 2023

    @jeffwidman
    Member

    Hmm... those threads are confusing. Let me try to get clarity internally.

    And yes, we do want to stick with using whatever the default node version is in the runner to make life easy for our users.

  5. changed the title [-]Add .devcontainer[/-] [+]Add `.devcontainer`[/+] on Apr 7, 2023
  6. jeffwidman commented on Apr 7, 2023

    @jeffwidman
    Member

    Got clarity internally that node16 is the plan for now:

    The runner ships with Node 12 and Node 16 to execute JavaScript actions. (With Node 12 being deprecated).

    Separate from that, the hosted runner images will have a default version of Node - https://github.com/actions/runner-images

    That's the version you'd get if you don't use actions/setup-node and you reference node from the PATH.

    The runner does not use any arbitrary version of Node that's installed on the machine.

    So as an action author, you should stick with Node 16 for the foreseeable future. (Matching what you specify in your action.yml)

    So a .devcontainer.json is the best way forward to a pleasant dev experience for now. 👍

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions