GithubHelp home page GithubHelp logo

node20 support about action-setup HOT 18 CLOSED

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024 57
node20 support

from action-setup.

Comments (18)

jrr avatar jrr commented on June 16, 2024 39

I'm seeing the deprecation warning from hosted runners today:

image

And for google:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.Show less

from action-setup.

PatrikBird avatar PatrikBird commented on June 16, 2024 13

Possible workaround for you?

I figured out that I didn't need pnpm action/setup. I just enabled corepack in the CI, which will respect the packageManager field in package.json.

It seems there are little/no drawbacks of using this approach. See comment by zkochan.

This just works:

- run: corepack enable
- uses: actions/setup-node@v4
  with:
    node-version: 20
    cache: "pnpm"

- name: Install dependencies
  run: pnpm install

Full workflow for reference: https://raw.githubusercontent.com/PatrikBird/website/main/.github/workflows/analyze_bundle.yaml

Maybe that's helpful to anyone. Have a nice day 🌞

from action-setup.

zkochan avatar zkochan commented on June 16, 2024 11

🚢 v3.0.0

from action-setup.

pavelzw avatar pavelzw commented on June 16, 2024 7

image
the warning also gets produced with the latest version 2.4.0

from action-setup.

oanaOM avatar oanaOM commented on June 16, 2024 2

The warning is back:
image

Is the work to update node version on the roadmap for the following months?

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024 2

I'm not seeing any warnings on GitHub-hosted runners at this time, however the GitHub team said they wanted to re-enable the warnings again soon. Edit: warnings have been re-enabled.

If this issue is not able to be resolved soon, then I would convert from using pnpm/action-setup and instead install pnpm with npm i.e. run: npm install pnpm@8 -g since the call that I'm looking at doesn't use any of the parameters of the action apart from the version number.

Edit: I now converted to not use the action pnpm/action-setup.

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024 1

Hi @zkochan

Wouldn't that only affect the pnpm/action-setup runtime? Why should it be a major version bump?

Sorry if the request was unclear. Yes, this is only about creating a new release of pnpm/action-setup from this repo. I don't know if this would be a breaking change for the action, but in other situations moving from Node.js 16 to 18 or later can break things, so it's just safer to use a new major version number.

Users of pnpm/action-setup@v2 will start to get a deprecation warning from GitHub Actions on October 23, 2023 when they run it, so if you release pnpm/action-setup@v3 to work with node20 that would make it a clear move. Also if the update does cause a breaking change, anybody who has specified pnpm/action-setup@v2 will not get a bad surprise of their workflow breaking. They have about 6 months to manually specify @v3 instead, if that is what they want, and if they don't update then GitHub will anyway force using node20 after this time.

The actions from GitHub which migrated from node16 to node20 like actions/checkout made a new major release (in this example from actions/checkout@v3 to actions/checkout@v4). Same for cycjimmy/semantic-release-action which also did a new major release from @v3 to @v4.

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024 1

@zkochan

  • I see that you started to work on this issue in #102 and all your checks are failing.

According to the announcement GitHub Actions: Transitioning from Node 16 to Node 20 deprecation notices are supposed to start being displayed today.

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024 1

The warning has been disabled temporarily, as it became clear that GitHub's own actions also were not ready.

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024 1

@oanaOM

Your error message shows that you are using pnpm/[email protected] from Feb 2022.

If you specify pnpm/action-setup@v2 (or pnpm/[email protected]) you should not see this warning which refers to node12 not node16

from action-setup.

oanaOM avatar oanaOM commented on June 16, 2024 1

Ah, you are very right. Once I changed the version of the action I don't see the warning anymore. thanks you for your help!

from action-setup.

erikburt avatar erikburt commented on June 16, 2024 1

Managed a little proof of concept update to node20 in #110. Could probably use some help testing it.

from action-setup.

zkochan avatar zkochan commented on June 16, 2024

Wouldn't that only affect the pnpm/action-setup runtime? Why should it be a major version bump?

from action-setup.

zkochan avatar zkochan commented on June 16, 2024

I am not sure why do they mark this as breaking if only the action's own runtime changes. The projects using the action will not run on a different node.js version.

from action-setup.

zkochan avatar zkochan commented on June 16, 2024

It is not so easy to do because this action uses a deprecated tool that doesn't work on node.js 20. So, we might have to do a big rewrite.

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024

@zkochan

Thanks for your update and I'm sorry that this could be a time-consuming task for you. I guess it will be about 6 months until GitHub finally blocks node16. (They say "Spring 2024".)

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024

GitHub is now producing the expected deprecation warning, for instance:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: pnpm/action-setup@v2, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

This also impacts actions/cache@v3 listed in the README.

from action-setup.

MikeMcC399 avatar MikeMcC399 commented on June 16, 2024

Thank you for resolving this issue! 👍🏻

I see

updated through

from action-setup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.