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

Bump node16 to node20 to fix deprecation #49

Merged
merged 7 commits into from
Mar 1, 2024

Conversation

javierjulio
Copy link
Contributor

This action is emitting a node16 deprecation warning on workflow runs. This now uses node20. I followed #27 as it's the same type of change. I wasn't sure if the package.json change is necessary. Likely best to update when updating dependency versions.

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: cakeinpanic/jira-description-action@v0.4.0. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Screenshot 2024-02-28 at 3 27 44 PM

The tests workflows were updated to use the latest actions versions since those were done for the same reason, using node20 as a minimum. The manual caching was removed as that capability is now built in to actions/setup-node.

Closes #48

These version updates are also for using current Node version (20). No need to do manual cache with newer setup-node versions as caching is now built in.
These version updates are also for using current Node version (20). No need to do manual cache with newer setup-node versions as caching is now built in.
Copy link

@screengroove screengroove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Owner

@cakeinpanic cakeinpanic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@cakeinpanic
Copy link
Owner

however I can see test GHA is failing, please take a look to make it green

> npm WARN deprecated @zeit/ncc@0.22.3: @zeit/ncc is no longer maintained. Please use @vercel/ncc instead.
@javierjulio
Copy link
Contributor Author

@cakeinpanic thank you. FWIW the last build on default branch also failed but since it's been several months the logs are no longer available. I'm not familiar with what could be causing the error but I wonder if much like updating the node version, that the package dependencies are just out of date. For example, in the "install" step (Run npm ci --production), there are many warnings. I believe what could be causing the initial error is the ncc package so I will try to resolve that now. In the meantime, this is what I see currently for npm outdated which shows that several packages are behind in many major versions.

> npm outdated
Package                              Current    Wanted    Latest  Location                                         Depended by
@actions/github                        5.1.1     5.1.1     6.0.0  node_modules/@actions/github                     jira-description-action
@octokit/rest                         20.0.1    20.0.2    20.0.2  node_modules/@octokit/rest                       jira-description-action
@release-it/conventional-changelog     7.0.2     7.0.2     8.0.1  node_modules/@release-it/conventional-changelog  jira-description-action
@types/jest                           25.2.3    25.2.3   29.5.12  node_modules/@types/jest                         jira-description-action
@types/node                         13.13.30  13.13.52  20.11.22  node_modules/@types/node                         jira-description-action
axios                                 0.19.2    0.19.2     1.6.7  node_modules/axios                               jira-description-action
husky                                  4.3.8     4.3.8    9.0.11  node_modules/husky                               jira-description-action
jest                                  25.5.4    25.5.4    29.7.0  node_modules/jest                                jira-description-action
jest-circus                           25.5.4    25.5.4    29.7.0  node_modules/jest-circus                         jira-description-action
lint-staged                           10.5.1    10.5.4    15.2.2  node_modules/lint-staged                         jira-description-action
prettier                               2.1.2     2.8.8     3.2.5  node_modules/prettier                            jira-description-action
release-it                            16.2.1    16.3.0    17.1.1  node_modules/release-it                          jira-description-action
ts-jest                               25.5.1    25.5.1    29.1.2  node_modules/ts-jest                             jira-description-action
typescript                             3.9.7    3.9.10     5.3.3  node_modules/typescript                          jira-description-action

I'll push another update shortly.

This doesn't seem to be used as I see no reference anywhere in source other than the package.json file: https://github.com/search?q=repo%3Acakeinpanic%2Fjira-description-action%20webhook&type=code

This package reports a deprecation warning on npm install in CI:

> npm WARN deprecated @octokit/webhooks-definitions@3.67.3: Use @octokit/webhooks-types, @octokit/webhooks-schemas, or @octokit/webhooks-examples instead. See octokit/webhooks#447

Instead of using one of the packages I figure it was safest and easiest to just remove it if its unused which seems to be the case from what I can tell.
@javierjulio
Copy link
Contributor Author

@cakeinpanic I've pushed another update but you'll need to approve the CI run. Note that the install step in CI reports many warnings, most are security related. I've addressed only 2 as the packages are deprecated but there are more listed. It's likely they are transient dependencies rather than direct ones (e.g. request, resolve-url, source-map-resolve, etc.). This may require more updates to get passing again so I'll need your help.

@javierjulio
Copy link
Contributor Author

@cakeinpanic thank you. This is ready as CI is now green. After this, I will open new PRs to remove any unused dependencies as I have spotted some and learned more since about how Node based GHA's are set up.

@cakeinpanic
Copy link
Owner

@javierjulio thank you for your contribution!

@cakeinpanic cakeinpanic closed this Mar 1, 2024
@cakeinpanic cakeinpanic reopened this Mar 1, 2024
@cakeinpanic cakeinpanic merged commit c414eaf into cakeinpanic:master Mar 1, 2024
1 check passed
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 this pull request may close these issues.

nodejs 20?
3 participants