Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
feat: update to nodejs 20 (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi authored May 18, 2023
1 parent e2611d0 commit 555c8b1
Show file tree
Hide file tree
Showing 9 changed files with 1,356 additions and 1,334 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run audit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run check code
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ jobs:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- run: yarn install
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run tests
run: make test
2 changes: 1 addition & 1 deletion .github/workflows/vendor/nodejs-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run audit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vendor/nodejs-check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- run: yarn install --frozen-lockfile
- name: Run check code
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Install dependencies only when needed
FROM node:18-alpine AS deps
FROM node:20-alpine AS deps
# 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
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:18-alpine AS builder
FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline

# Production image, copy all the files and run next
FROM node:18-alpine AS runner
FROM node:20-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
Expand Down
2 changes: 1 addition & 1 deletion ci/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14-alpine
FROM node:20-alpine

RUN apk update \
&& apk add bash make git docker curl python jq rsync openssh wget \
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "admin-panel",
"version": "0.1.0",
"private": true,
"engines": {
"node": "20"
},
"scripts": {
"build": "next build",
"check-code": "yarn tsc:check && yarn eslint:check && yarn prettier:check",
Expand Down Expand Up @@ -31,7 +34,7 @@
"@graphql-codegen/typescript-operations": "^3.0.3",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@types/jest": "^29.5.1",
"@types/node": "18.16.6",
"@types/node": "20.1.7",
"@types/react": "18.0.38",
"@types/react-dom": "18.2.4",
"@typescript-eslint/eslint-plugin": "^5.50.0",
Expand Down
2,660 changes: 1,338 additions & 1,322 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 555c8b1

Please sign in to comment.