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(project): update project to use Node.js v18 LTS #3133

Merged
merged 5 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Primer React",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:16",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:18",
"extensions": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "DavidAnson.vscode-markdownlint"],
"forwardPorts": [8000],
"postCreateCommand": ["/bin/bash", "-c", "npm run setup"],
Expand All @@ -11,8 +11,8 @@
}
},
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
"cpus": 4,
"memory": "8gb",
"storage": "32gb"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/assign_release_conductor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm ci
- name: Fetch user from pagerduty schedule
id: pagerduty
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Install dependencies
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Set React version
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Set React version
Expand All @@ -125,7 +125,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'

- name: Install dependencies
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand All @@ -275,7 +275,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/consumer_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: npm

# `prepare` is a special case in `npm` and likes to run all the time, even
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
with:
node_version: 16
node_version: 18
install: npm ci && cd docs && npm ci --legacy-peer-deps && cd ..
build: npm run build:docs:preview
output_dir: docs/public
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_preview_forks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pages: write
id-token: write
with:
node_version: 16
node_version: 18
install: npm ci --legacy-peer-deps && cd docs && npm ci --legacy-peer-deps && cd ..
build: npm run build:docs:preview
output_dir: docs/public
2 changes: 1 addition & 1 deletion .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
secrets:
gh_token: ${{ secrets.GITHUB_TOKEN }}
with:
node_version: 16
node_version: 18
install: npm ci && cd docs && npm ci --legacy-peer-deps && cd ..
build: npm run build:docs
output_dir: docs/public
2 changes: 1 addition & 1 deletion .github/workflows/docs_migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, are 18.x and 18 equivalent?

Copy link
Member Author

Choose a reason for hiding this comment

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

@colebemis I believe so, will definitely keep an eye on it to make sure it's using the latest 18 / behaving as we would expect 18.x to behave 👀

I'm also down to use that syntax (18.x) if that's easier to understand 👍 The project was using a mix so I went with what was most commonly used.

Another option is that we can use lts tags, e.g. lts/Hydrogen would correspond to the corresponding v18 LTS version.

cache: 'npm'
- run: npm ci
- run: node script/docs-migration.js >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: Get or Create Comment
uses: actions/github-script@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/statuses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- name: Install node deps
run: npm ci
- name: Install ruby deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm i
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"start:docs": "cd docs && npm run develop",
"start:storybook": "STORYBOOK=true start-storybook -p 6006",
"build:storybook": "script/build-storybook",
"build:docs": "script/build-docs",
"build:docs:preview": "script/build-docs preview",
"build:docs": "NODE_OPTIONS=--openssl-legacy-provider script/build-docs",
"build:docs:preview": "NODE_OPTIONS=--openssl-legacy-provider script/build-docs preview",
"build:storybook:visual-testing": "build-storybook",
"build:components.json": "ts-node script/components-json/build",
"install:docs": "(cd docs && npm install --legacy-peer-deps)",
Expand Down