Skip to content

Commit

Permalink
chore: upgrade to node 20 and patch-minor dependencies (#667)
Browse files Browse the repository at this point in the history
* deps: gh action and node

* deps: bump minor many

* deps: fix, update dockerfile

* chore: add changeset
  • Loading branch information
leomotors authored Feb 6, 2024
1 parent ff72f60 commit 4f342ee
Show file tree
Hide file tree
Showing 26 changed files with 2,867 additions and 3,778 deletions.
14 changes: 14 additions & 0 deletions .changeset/sixty-waves-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@cgr/project-config": minor
"@cgr/course-utils": minor
"reg-scraper": minor
"@cgr/codegen": minor
"@cgr/schema": minor
"admin-api": minor
"admin-web": minor
"web-e2e": minor
"api": minor
"web": minor
---

deps: upgrade to node 20 and bump all patch-minor
11 changes: 5 additions & 6 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,26 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout

- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Setup node with cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .nvmrc
cache: pnpm

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ jobs:

strategy:
matrix:
node-version: [18]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: .nvmrc

- name: Check if pre.json exists
id: pre-release-file
Expand All @@ -52,7 +51,7 @@ jobs:
run: npx changeset pre exit

- name: Commit Changes to the Pull Request
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
add: .changeset/pre.json
message: 'Configure pre-release mode'
10 changes: 4 additions & 6 deletions .github/workflows/release-without-versioning.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:

strategy:
matrix:
node-version: [18]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -39,20 +38,19 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: .nvmrc

- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Install turbo
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ jobs:

strategy:
matrix:
node-version: [18]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -66,21 +65,20 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# related to issue, https://github.com/changesets/action/issues/201
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version-file: .nvmrc

- name: Install pnpm
uses: pnpm/action-setup@v2.2.2
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
Expand All @@ -89,7 +87,7 @@ jobs:
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand All @@ -100,7 +98,7 @@ jobs:

- name: Create Versioning Pull Request
id: changesets
uses: changesets/action@v1.4.1
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/reusable-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,28 @@ jobs:
run:
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false

- name: Setup node with cache
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .nvmrc
cache: pnpm

- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
Expand All @@ -51,7 +50,7 @@ jobs:

- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
uses: tj-actions/branch-names@v8

- name: Echo base branch name
id: get-base-branch
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/sync-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:

strategy:
matrix:
node-version: [18]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -27,7 +26,7 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: beta
fetch-depth: 0
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/update-gitops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ inputs.gitops-repository }}
ref: ${{ inputs.gitops-ref }}
Expand Down Expand Up @@ -87,6 +87,7 @@ jobs:
PACKAGES: ${{ inputs.packages }}

- name: Create Pull Request to GitOps
# TODO Migrate
uses: peter-evans/create-pull-request@v4
if: ${{ inputs.mode == 'pr' }}
with:
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/iron
2 changes: 1 addition & 1 deletion apps/admin-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# When copying this Dockerfile for use in other apps, don't forget to change the scope (api, web, etc.) in RUN commands

FROM node:18-alpine AS pnpm
FROM node:20-alpine AS pnpm
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
Expand Down
16 changes: 8 additions & 8 deletions apps/admin-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"prebuild": "rimraf dist"
},
"dependencies": {
"@apollo/server": "^4.9.3",
"@apollo/server": "^4.10.0",
"@cgr/schema": "workspace:*",
"@nestjs/apollo": "^11.0.6",
"@nestjs/axios": "^2.0.0",
Expand All @@ -37,14 +37,14 @@
"rxjs": "^7.8.1"
},
"devDependencies": {
"@types/cookie-parser": "^1.4.4",
"@types/express": "^4.17.18",
"@types/jest": "29.5.5",
"@types/node": "^18.18.1",
"eslint": "8.50.0",
"@types/cookie-parser": "^1.4.6",
"@types/express": "^4.17.21",
"@types/jest": "29.5.12",
"@types/node": "^20.11.16",
"eslint": "8.56.0",
"jest": "29.7.0",
"ts-jest": "29.1.1",
"ts-jest": "29.1.2",
"ts-morph": "^20.0.0",
"typescript": "~5.2.2"
"typescript": "~5.3.3"
}
}
4 changes: 2 additions & 2 deletions apps/admin-web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# When copying this Dockerfile for use in other apps, don't forget to change the scope (api, web, etc.) in RUN commands

FROM node:18-alpine AS pnpm
FROM node:20-alpine AS pnpm
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
Expand Down Expand Up @@ -42,7 +42,7 @@ RUN pnpm turbo run build --filter=admin-web...

# --------------------------------------------------------

FROM node:18-alpine AS runner
FROM node:20-alpine AS runner
WORKDIR /app

RUN apk add --no-cache --update \
Expand Down
22 changes: 11 additions & 11 deletions apps/admin-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
"format": "eslint src --fix"
},
"devDependencies": {
"@types/node": "18.18.1",
"@types/react": "18.2.24",
"@types/react-dom": "18.2.8",
"eslint": "8.50.0",
"typescript": "~5.2.2"
"@types/node": "20.11.16",
"@types/react": "18.2.53",
"@types/react-dom": "18.2.18",
"eslint": "8.56.0",
"typescript": "~5.3.3"
},
"dependencies": {
"@apollo/client": "^3.8.4",
"@apollo/client": "^3.9.2",
"@cgr/codegen": "workspace:*",
"@cgr/course-utils": "workspace:*",
"@emotion/react": "11.11.1",
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.14.11",
"@mui/material": "5.14.11",
"@mui/styled-engine-sc": "^5.14.11",
"@mui/icons-material": "5.15.7",
"@mui/material": "5.15.7",
"@mui/styled-engine-sc": "^5.14.12",
"@next/font": "13.5.3",
"axios": "0.23.0",
"isomorphic-dompurify": "0.20.0",
"next": "^13.5.3",
"next": "^13.5.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# When copying this Dockerfile for use in other apps, don't forget to change the scope (api, web, etc.) in RUN commands

FROM node:18-alpine AS pnpm
FROM node:20-alpine AS pnpm
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
RUN apk update
Expand Down
24 changes: 12 additions & 12 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
},
"devDependencies": {
"@nestjs/cli": "^9.5.0",
"@types/cookie-parser": "^1.4.4",
"@types/express": "^4.17.18",
"@types/jest": "29.5.5",
"@types/node": "18.18.1",
"@types/passport-jwt": "^3.0.10",
"eslint": "8.50.0",
"@types/cookie-parser": "^1.4.6",
"@types/express": "^4.17.21",
"@types/jest": "29.5.12",
"@types/node": "20.11.16",
"@types/passport-jwt": "^3.0.13",
"eslint": "8.56.0",
"jest": "29.7.0",
"ts-jest": "29.1.1",
"ts-jest": "29.1.2",
"ts-morph": "^20.0.0",
"typescript": "~5.2.2"
"typescript": "~5.3.3"
},
"dependencies": {
"@apollo/server": "^4.9.3",
"@apollo/server": "^4.10.0",
"@cgr/schema": "workspace:*",
"@grpc/grpc-js": "1.9.4",
"@grpc/grpc-js": "1.9.14",
"@grpc/proto-loader": "0.7.10",
"@nestjs/apollo": "^11.0.6",
"@nestjs/common": "9.4.0",
Expand All @@ -37,7 +37,7 @@
"@nestjs/mongoose": "9.2.1",
"@nestjs/passport": "7.1.5",
"@nestjs/platform-express": "9.4.0",
"@opensearch-project/opensearch": "2.3.1",
"@opensearch-project/opensearch": "2.5.0",
"@slack/webhook": "6.1.0",
"@typegoose/typegoose": "9.1.0",
"class-transformer": "0.3.1",
Expand All @@ -55,6 +55,6 @@
"passport-jwt": "4.0.1",
"rxjs": "^7.8.1",
"serialize-error": "8.1.0",
"winston": "3.10.0"
"winston": "3.11.0"
}
}
Loading

0 comments on commit 4f342ee

Please sign in to comment.