Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node20 support #99

Closed
MikeMcC399 opened this issue Sep 27, 2023 · 18 comments
Closed

node20 support #99

MikeMcC399 opened this issue Sep 27, 2023 · 18 comments

Comments

@MikeMcC399
Copy link

MikeMcC399 commented Sep 27, 2023

Please provide a new release of pnpm/action-setup which runs under node20 as Node.js 16 reached end-of-life on Sep 11, 2023.

action-setup/action.yml

Lines 22 to 25 in 0b715c7

runs:
using: node16
main: dist/index.js
post: dist/index.js

See the announcement GitHub Actions: Transitioning from Node 16 to Node 20.

Edit: Removed the request for a certain release number.

@zkochan
Copy link
Member

zkochan commented Sep 27, 2023

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

@MikeMcC399
Copy link
Author

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.

@zkochan
Copy link
Member

zkochan commented Sep 27, 2023

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.

zkochan added a commit that referenced this issue Oct 1, 2023
@MikeMcC399
Copy link
Author

@zkochan

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

@zkochan
Copy link
Member

zkochan commented Oct 23, 2023

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.

@MikeMcC399
Copy link
Author

MikeMcC399 commented Oct 23, 2023

@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".)

@MikeMcC399
Copy link
Author

MikeMcC399 commented Oct 25, 2023

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.

@MikeMcC399

This comment was marked as outdated.

@oanaOM
Copy link

oanaOM commented Jan 6, 2024

The warning is back:
image

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

@MikeMcC399
Copy link
Author

@oanaOM

Your error message shows that you are using pnpm/action-setup@v2.2.1 from Feb 2022.

If you specify pnpm/action-setup@v2 (or pnpm/action-setup@v2.4.0) you should not see this warning which refers to node12 not node16

@oanaOM
Copy link

oanaOM commented Jan 8, 2024

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!

@pavelzw
Copy link

pavelzw commented Jan 23, 2024

image
the warning also gets produced with the latest version 2.4.0

@MikeMcC399
Copy link
Author

MikeMcC399 commented Jan 23, 2024

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.

@erikburt
Copy link
Contributor

erikburt commented Jan 23, 2024

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

@jrr
Copy link

jrr commented Jan 24, 2024

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

@PatrikBird
Copy link

PatrikBird commented Jan 31, 2024

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 🌞

@zkochan
Copy link
Member

zkochan commented Feb 8, 2024

🚢 v3.0.0

@zkochan zkochan closed this as completed Feb 8, 2024
@MikeMcC399
Copy link
Author

Thank you for resolving this issue! 👍🏻

I see

updated through

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants