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

chore: Use Node 18 #360

Merged
merged 10 commits into from
Dec 30, 2022
Merged

chore: Use Node 18 #360

merged 10 commits into from
Dec 30, 2022

Conversation

jeremyckahn
Copy link
Owner

What this PR does

This PR eliminates the warnings produced by GitHub Actions about use of deprecated APIs:

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/[email protected], actions/setup-node@v1

The save-state command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

The solution for this was ultimately to upgrade the GitHub Actions we're using. In trying to resolve this, I updated a number of things that turned out not to be necessary, but are worth doing regardless. Rather than roll them back, this is a good opportunity to update some of our aging project infrastructure. As such, this PR includes:

  • Upgrading to Node 18
  • Upgrading to node-sass 8
  • Replacing our scattered npm ci flags with an .npmrc file
  • Light updates to our use of Material UI to avoid new deprecation warnings

How this change can be validated

Run npm ci locally, install Node 18 and make sure the important scripts work (test, start, build, and maybe spot-check a few others).

Additional information

I will have to update our Vercel configuration with similar settings once this is merged.

@jeremyckahn jeremyckahn requested a review from lstebner December 30, 2022 15:56
@vercel
Copy link

vercel bot commented Dec 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
farmhand ✅ Ready (Inspect) Visit Preview Dec 30, 2022 at 3:57PM (UTC)

- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3
Copy link
Owner Author

@jeremyckahn jeremyckahn Dec 30, 2022

Choose a reason for hiding this comment

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

This is the only meaningful change in this file.

@lstebner
Copy link
Collaborator

everything seems to be working for me except tests. i tried completely removing node_modules/ and re-installing but all the tests fail with an issue in the setup file.

    Cannot find module '/Users/lukestebner/Sites/farmhand/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault' from 'src/setupTests.js'

      1 | import '@testing-library/jest-dom'
      2 | import 'jest-extended'
    > 3 | import Adapter from 'enzyme-adapter-react-16'
        |                              ^
      4 | import { configure } from 'enzyme'
      5 |
      6 | configure({

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (src/setupTests.js:3:30)

it doesn't seem to be an issue in github CI, but i can't seem to get past it on my machine. build, start, and the ci command all seem to be running as expected though

Copy link
Collaborator

@lstebner lstebner left a comment

Choose a reason for hiding this comment

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

test failures was my fault! looks good to me 😄

@jeremyckahn jeremyckahn merged commit 9b40201 into develop Dec 30, 2022
@jeremyckahn jeremyckahn deleted the chore/update-ci branch December 30, 2022 21:59
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.

2 participants