Merge branch 'next-js-12' into 'master'

Next.js v12

See merge request sahkoinsinoorikilta/vtmk/web2.0-frontend!89
This commit is contained in:
Aarni Halinen
2022-01-13 00:51:09 +00:00
11 changed files with 961 additions and 2473 deletions
+7 -7
View File
@@ -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:
+1 -1
View File
@@ -1 +1 @@
14
16
+2 -2
View File
@@ -1,7 +1,7 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended",
"stylelint-config-styled-components"
],
"syntax": "css"
"customSyntax": "postcss-jsx"
}
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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
-1
View File
@@ -1,5 +1,4 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
+931 -2447
View File
File diff suppressed because it is too large Load Diff
+9 -7
View File
@@ -48,28 +48,30 @@
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^13.0.0",
"eslint-config-next": "^11.1.2",
"eslint-config-next": "^12.0.7",
"husky": "^7.0.1",
"jest": "^27.1.0",
"next-sitemap": "^1.6.203",
"npm-run-all": "^4.1.5",
"stylelint": "^13.13.1",
"stylelint-config-standard": "^22.0.0",
"postcss-jsx": "^0.36.4",
"postcss-syntax": "^0.36.2",
"stylelint": "^14.2.0",
"stylelint-config-recommended": "^6.0.0",
"stylelint-config-styled-components": "^0.1.1",
"testcafe": "^1.15.3",
"ts-jest": "^27.0.5",
"typescript": "^4.3.5"
},
"dependencies": {
"@next/bundle-analyzer": "^11.1.2",
"@rjsf/core": "^3.1.0",
"@sentry/nextjs": "^6.14.3",
"@next/bundle-analyzer": "^12.0.7",
"@rjsf/core": "^3.2.1",
"@sentry/nextjs": "^6.16.0",
"axios": "^0.21.1",
"date-fns": "^2.23.0",
"fast-deep-equal": "^3.1.3",
"js-cookie": "^3.0.0",
"lodash": "^4.17.21",
"next": "^11.1.2",
"next": "^12.0.7",
"normalize.css": "^8.0.1",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.0",
+1 -1
View File
@@ -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" });
}
+5 -3
View File
@@ -1,6 +1,8 @@
import React from "react";
import styled from "styled-components";
import { IChangeEvent, ISubmitEvent, ErrorSchema } from "@rjsf/core";
import {
IChangeEvent, ISubmitEvent, ErrorSchema, Widget,
} from "@rjsf/core";
import { SignupForm } from "@models/Signup";
import Checkboxes from "@components/Widgets/Checkbox/Checkboxes";
import RadioButtonWidget from "@components/Widgets/RadioButton/RadioButtonWidget";
@@ -12,8 +14,8 @@ import { buildFormSchema, buildUISchema, signupFormQuestionToQuestion } from "./
import { useTranslation } from "../../i18n";
const customWidgets = {
radio: RadioButtonWidget,
checkboxes: Checkboxes,
radio: RadioButtonWidget as unknown as Widget,
checkboxes: Checkboxes as unknown as Widget,
};
interface SignUpPageViewProps {
+1
View File
@@ -53,6 +53,7 @@
"src/utils/*"
]
},
"incremental": true
},
"include": [
"./src/**/*",