From 78865679253ae61d88d0f0af8a60d5e944d1bd9f Mon Sep 17 00:00:00 2001 From: Bobby <98844419+bobbywells52@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:30:16 -0600 Subject: [PATCH] Upgrade from node 20 to node 22 (#7968) * first pass * missing frontend files * nvmrc file * update yarnfile frontend * update dockerfile --- .github/workflows/checkGraphql.yml | 2 +- .github/workflows/chromatic.yml | 2 +- .github/workflows/coverity.yml | 2 +- .github/workflows/deployDemo.yml | 2 +- .github/workflows/deployDev.yml | 2 +- .github/workflows/deployProd.yml | 2 +- .github/workflows/deployStg.yml | 2 +- .github/workflows/deployTest.yml | 2 +- .github/workflows/deployTraining.yml | 2 +- .github/workflows/maintenance.yml | 2 +- .github/workflows/test.yml | 2 +- .nvmrc | 2 +- frontend/.nvmrc | 2 +- frontend/Dockerfile | 4 ++-- frontend/package.json | 4 ++-- frontend/yarn.lock | 14 +++++++++++++- 16 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.github/workflows/checkGraphql.yml b/.github/workflows/checkGraphql.yml index d8c4010a81..027c8a42c2 100644 --- a/.github/workflows/checkGraphql.yml +++ b/.github/workflows/checkGraphql.yml @@ -13,7 +13,7 @@ on: - main env: - NODE_VERSION: 20 + NODE_VERSION: 22 defaults: run: diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 83d3148fa0..86d472d0f2 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -14,7 +14,7 @@ on: - "frontend/**" env: - NODE_VERSION: 20 + NODE_VERSION: 22 jobs: chromatic-deployment: diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 6d4fd40ecb..794afedb83 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -17,7 +17,7 @@ on: env: JAVA_VERSION: 17 JAVA_DISTRIBUTION: 'zulu' - NODE_VERSION: 20 + NODE_VERSION: 22 defaults: run: diff --git a/.github/workflows/deployDemo.yml b/.github/workflows/deployDemo.yml index 7a7e79803c..e7eb8f2276 100644 --- a/.github/workflows/deployDemo.yml +++ b/.github/workflows/deployDemo.yml @@ -8,7 +8,7 @@ on: env: DEPLOY_ENV: demo - NODE_VERSION: 20 + NODE_VERSION: 22 concurrency: group: demo-deploy diff --git a/.github/workflows/deployDev.yml b/.github/workflows/deployDev.yml index 61ff8d0215..6f9ec7bdc5 100644 --- a/.github/workflows/deployDev.yml +++ b/.github/workflows/deployDev.yml @@ -19,7 +19,7 @@ on: - pentest env: - NODE_VERSION: 20 + NODE_VERSION: 22 concurrency: group: ${{ github.event.inputs.deploy_env }}-deploy diff --git a/.github/workflows/deployProd.yml b/.github/workflows/deployProd.yml index 8f14506c70..2beee6e93e 100644 --- a/.github/workflows/deployProd.yml +++ b/.github/workflows/deployProd.yml @@ -8,7 +8,7 @@ on: env: DEPLOY_ENV: prod - NODE_VERSION: 20 + NODE_VERSION: 22 concurrency: group: prod-deploy diff --git a/.github/workflows/deployStg.yml b/.github/workflows/deployStg.yml index 2cf31b972c..540e6eb609 100644 --- a/.github/workflows/deployStg.yml +++ b/.github/workflows/deployStg.yml @@ -7,7 +7,7 @@ on: env: DEPLOY_ENV: stg - NODE_VERSION: 20 + NODE_VERSION: 22 concurrency: group: stg-deploy diff --git a/.github/workflows/deployTest.yml b/.github/workflows/deployTest.yml index 007c579538..df6d16dd3f 100644 --- a/.github/workflows/deployTest.yml +++ b/.github/workflows/deployTest.yml @@ -7,7 +7,7 @@ on: env: DEPLOY_ENV: test - NODE_VERSION: 20 + NODE_VERSION: 22 concurrency: group: test-deploy diff --git a/.github/workflows/deployTraining.yml b/.github/workflows/deployTraining.yml index e1724b2267..2b8b2c33a1 100644 --- a/.github/workflows/deployTraining.yml +++ b/.github/workflows/deployTraining.yml @@ -8,7 +8,7 @@ on: env: DEPLOY_ENV: training - NODE_VERSION: 20 + NODE_VERSION: 22 concurrency: group: training-deploy diff --git a/.github/workflows/maintenance.yml b/.github/workflows/maintenance.yml index a37a0f32f0..9c3d2214fd 100644 --- a/.github/workflows/maintenance.yml +++ b/.github/workflows/maintenance.yml @@ -21,7 +21,7 @@ on: default: "prod" env: - NODE_VERSION: 20 + NODE_VERSION: 22 jobs: pushMaintenanceBlob: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 344345eb22..bb37fa29d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ concurrency: cancel-in-progress: true env: - NODE_VERSION: 20 + NODE_VERSION: 22 JAVA_VERSION: 17 JAVA_DISTRIBUTION: 'zulu' PROJECT_ROOT: /home/runner/work/prime-simplereport/prime-simplereport # Hardcoding this here because env.WORKSPACE_ROOT gets overridden by one of the steps downstream. We only need this for Sonar. diff --git a/.nvmrc b/.nvmrc index e6a178735b..5ef1a0c7bd 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.* +22.* \ No newline at end of file diff --git a/frontend/.nvmrc b/frontend/.nvmrc index e6a178735b..23222029ff 100644 --- a/frontend/.nvmrc +++ b/frontend/.nvmrc @@ -1 +1 @@ -20.* +22.* diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 8c67bfbf55..1dd60f3817 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine as build +FROM node:22-alpine as build LABEL org.opencontainers.image.source https://github.com/CDCgov/prime-simplereport # Add bash and git @@ -49,7 +49,7 @@ RUN echo "REACT_APP_CONTENT_SECURITY_POLICY_SCRIPT_SRC=''" >> .env.production.lo RUN yarn run build # production environment -FROM node:20-alpine +FROM node:22-alpine RUN npm install -g serve WORKDIR /app/frontend COPY --from=build /app/frontend/build /app/frontend/build diff --git a/frontend/package.json b/frontend/package.json index a0f4bbec3b..1a7907929c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "engines": { - "node": "20" + "node": "22" }, "dependencies": { "@apollo/client": "^3.8.3", @@ -189,7 +189,7 @@ "@types/classnames": "^2.2.11", "@types/jest": "^29.5.12", "@types/jest-axe": "^3.5.9", - "@types/node": "^20.12.11", + "@types/node": "^22.0.0", "@types/react": "^18.0.27", "@types/react-csv": "^1.1.10", "@types/react-dom": "^18.2.17", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index f49ebc72bb..3f22922e70 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -5371,7 +5371,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^20.12.11", "@types/node@^20.12.12": +"@types/node@*", "@types/node@^20.12.12": version "20.12.12" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== @@ -5385,6 +5385,13 @@ dependencies: undici-types "~5.26.4" +"@types/node@^22.0.0": + version "22.0.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.0.0.tgz#04862a2a71e62264426083abe1e27e87cac05a30" + integrity sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw== + dependencies: + undici-types "~6.11.1" + "@types/normalize-package-data@^2.4.0": version "2.4.2" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz#9b0e3e8533fe5024ad32d6637eb9589988b6fdca" @@ -16881,6 +16888,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.11.1: + version "6.11.1" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.11.1.tgz#432ea6e8efd54a48569705a699e62d8f4981b197" + integrity sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ== + undici@5.22.1: version "5.22.1" resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.1.tgz#877d512effef2ac8be65e695f3586922e1a57d7b"