From 0a3e006c0f82e87c821aa3eebec62ff71903c0a3 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Fri, 10 Dec 2021 01:23:08 +0200 Subject: [PATCH] bump node to v16 --- .gitlab-ci.yml | 14 +++++++------- .nvmrc | 2 +- Dockerfile | 6 +++--- README.md | 2 +- src/utils/auth.ts | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c62e41d..e8abc04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,7 +8,7 @@ stages: - deploy install: - image: node:14 + image: node:16 stage: setup script: - npm ci @@ -21,34 +21,34 @@ install: expire_in: 1 week audit: - image: node:14 + image: node:16 needs: ["install"] stage: audit script: - npm audit --audit-level=critical es:lint: - image: node:14 + image: node:16 needs: ["install"] stage: lint script: - npm run lint:es css:lint: - image: node:14 + image: node:16 needs: ["install"] stage: lint script: - npm run lint:css # test:unit: -# image: node:14 +# image: node:16 # stage: test # script: # - npm run test:unit build: - image: node:14 + image: node:16 needs: ["install"] stage: build script: @@ -66,7 +66,7 @@ build: - .next/cache/ test:e2e: - image: circleci/node:14-browsers + image: circleci/node:16-browsers needs: ["install", "build"] stage: test script: diff --git a/.nvmrc b/.nvmrc index 8351c19..b6a7d89 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/Dockerfile b/Dockerfile index a9e8ac5..f56330e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Install dependencies only when needed -FROM node:14-alpine AS deps +FROM node:16-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 @@ -7,7 +7,7 @@ COPY package.json package-lock.json ./ RUN npm ci # Rebuild the source code only when needed -FROM node:14-alpine AS builder +FROM node:16-alpine AS builder WORKDIR /app COPY . . COPY --from=deps /app/node_modules ./node_modules @@ -21,7 +21,7 @@ ARG SENTRY_AUTH_TOKEN RUN npm run build # Production image, copy all the files and run next -FROM node:14-alpine AS runner +FROM node:16-alpine AS runner WORKDIR /app ENV NODE_ENV production diff --git a/README.md b/README.md index a26c07a..d347b20 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next ## Installation 1. Clone/download repo -2. Install node v14 ([`nvm`](https://github.com/nvm-sh/nvm)) +2. Install node v16 ([`nvm`](https://github.com/nvm-sh/nvm)) 3. `npm install` ## Getting Started diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 875bf14..4300fff 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -12,7 +12,7 @@ export async function generateToken(username: string, password: string): Promise return resp.data.token; } -export function setTokenCookie(token: string) { +export function setTokenCookie(token: string): void { Cookies.set("jwt", token); Cookies.set("jwt", token, { domain: ".sahkoinsinoorikilta.fi" }); }