Skip to content

Commit

Permalink
[fei5402.1.node20workflows] Change workflows to node 20 (#990)
Browse files Browse the repository at this point in the history
## Summary:
This updates our Wonder Blocks workflows to use Node 20.

In order to verify things, I learned some additional steps for macOS.

1. Switch to node 20 (I use NVM, so `nvm use 20`)
1. Run `yarn` or `yarn install`
  1. If you get an error about `node-gyp`. You either need to install XCode command line tools (You can do this by running `xcode-select --install` and following the prompts), or switch to use those tools from your version of XCode (XCode 14.3.1 appears to cause a lot of errors) - you can do this by running `sudo xcode-select -s /Library/Developer/CommandLineTools`.
  1. Re-run `yarn` or `yarn install` after this and all should be well.

Issue: FEI-5402

## Test plan:
See above steps to get things installed properly for macOS.

I then ran:
- `yarn test`
- `yarn lint`
- `yarn typecheck`
- `yarn build`

Author: somewhatabstract

Reviewers: jeresig

Required Reviewers:

Approved By: jeresig

Checks: ✅ codecov/project, ✅ Test (macos-latest, 20.x), ✅ CodeQL, ✅ Lint, typecheck, and coverage check (ubuntu-latest, 20.x), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald, ⏭️  dependabot, ✅ Analyze (javascript)

Pull Request URL: #990
  • Loading branch information
somewhatabstract authored Dec 19, 2023
1 parent 7d4b0d9 commit d6296d4
Show file tree
Hide file tree
Showing 7 changed files with 250 additions and 172 deletions.
2 changes: 2 additions & 0 deletions .changeset/sour-ties-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 2 additions & 2 deletions .github/workflows/node-ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# which is very helpful.
matrix:
os: [ubuntu-latest]
node-version: [16.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Install & cache node_modules
Expand All @@ -46,7 +46,7 @@ jobs:
# Use a matrix as it means we get the version info in the job name
# which is very helpful.
os: [ubuntu-latest]
node-version: [16.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Install & cache node_modules
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Install & cache node_modules
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [16.x]
node-version: [20.x]
steps:
- name: Checking out latest commit
uses: actions/checkout@v3
Expand Down Expand Up @@ -137,12 +137,12 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
# We want to include all the versions we support here.
node-version: [16.x]
node-version: [20.x]
exclude:
# And exclude the configuration that our coverage job already
# includes.
- os: ubuntu-latest
node-version: 16.x
node-version: 20.x
steps:
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
with:
node-version: 16.x
node-version: 20.x

- name: Build Typedoc
# Generate nice docs inside "docs/" folder
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"typescript.validate.enable": true,
"javascript.validate.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"todo-tree.filtering.excludeGlobs": [
"**/dist/**",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@
"winston": "^3.10.0"
},
"resolutions": {
"node-gyp": "^9.3.0"
"//": "We need to use node-gyp 10 to support systems that use Python 3.12",
"//": "we need to pin wide-align/string-width because v5 & up are ESM only",
"wide-align/string-width": "^4.2.0",
"node-gyp": "^10.0.0"
},
"scripts": {
"rollup": "rollup -c build-settings/rollup.config.mjs",
Expand Down
Loading

0 comments on commit d6296d4

Please sign in to comment.