bump node to v16

This commit is contained in:
Aarni Halinen
2021-12-10 01:23:08 +02:00
parent f9e855fd23
commit 0a3e006c0f
5 changed files with 13 additions and 13 deletions
+7 -7
View File
@@ -8,7 +8,7 @@ stages:
- deploy - deploy
install: install:
image: node:14 image: node:16
stage: setup stage: setup
script: script:
- npm ci - npm ci
@@ -21,34 +21,34 @@ install:
expire_in: 1 week expire_in: 1 week
audit: audit:
image: node:14 image: node:16
needs: ["install"] needs: ["install"]
stage: audit stage: audit
script: script:
- npm audit --audit-level=critical - npm audit --audit-level=critical
es:lint: es:lint:
image: node:14 image: node:16
needs: ["install"] needs: ["install"]
stage: lint stage: lint
script: script:
- npm run lint:es - npm run lint:es
css:lint: css:lint:
image: node:14 image: node:16
needs: ["install"] needs: ["install"]
stage: lint stage: lint
script: script:
- npm run lint:css - npm run lint:css
# test:unit: # test:unit:
# image: node:14 # image: node:16
# stage: test # stage: test
# script: # script:
# - npm run test:unit # - npm run test:unit
build: build:
image: node:14 image: node:16
needs: ["install"] needs: ["install"]
stage: build stage: build
script: script:
@@ -66,7 +66,7 @@ build:
- .next/cache/ - .next/cache/
test:e2e: test:e2e:
image: circleci/node:14-browsers image: circleci/node:16-browsers
needs: ["install", "build"] needs: ["install", "build"]
stage: test stage: test
script: script:
+1 -1
View File
@@ -1 +1 @@
14 16
+3 -3
View File
@@ -1,5 +1,5 @@
# Install dependencies only when needed # 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. # 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 add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
@@ -7,7 +7,7 @@ COPY package.json package-lock.json ./
RUN npm ci RUN npm ci
# Rebuild the source code only when needed # Rebuild the source code only when needed
FROM node:14-alpine AS builder FROM node:16-alpine AS builder
WORKDIR /app WORKDIR /app
COPY . . COPY . .
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
@@ -21,7 +21,7 @@ ARG SENTRY_AUTH_TOKEN
RUN npm run build RUN npm run build
# Production image, copy all the files and run next # Production image, copy all the files and run next
FROM node:14-alpine AS runner FROM node:16-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV production ENV NODE_ENV production
+1 -1
View File
@@ -10,7 +10,7 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
## Installation ## Installation
1. Clone/download repo 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` 3. `npm install`
## Getting Started ## Getting Started
+1 -1
View File
@@ -12,7 +12,7 @@ export async function generateToken(username: string, password: string): Promise
return resp.data.token; return resp.data.token;
} }
export function setTokenCookie(token: string) { export function setTokenCookie(token: string): void {
Cookies.set("jwt", token); Cookies.set("jwt", token);
Cookies.set("jwt", token, { domain: ".sahkoinsinoorikilta.fi" }); Cookies.set("jwt", token, { domain: ".sahkoinsinoorikilta.fi" });
} }