Merge branch 'chore/update-pkgs' into 'master'
Chore: update dependencies See merge request sahkoinsinoorikilta/vtmk/web2.0-frontend!61
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"presets": [
|
||||
"next/babel"
|
||||
"next/babel"
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"babel-plugin-styled-components",
|
||||
{
|
||||
"ssr": true,
|
||||
"displayName": true,
|
||||
"preprocess": false,
|
||||
"pure": true
|
||||
}
|
||||
]
|
||||
[
|
||||
"babel-plugin-styled-components",
|
||||
{
|
||||
"ssr": true,
|
||||
"displayName": true,
|
||||
"preprocess": false,
|
||||
"pure": true
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+58
-58
@@ -1,61 +1,61 @@
|
||||
{
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
"root": true,
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"airbnb-typescript"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:jsx-a11y/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"airbnb-typescript"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"plugins": [],
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/naming-convention": "off",
|
||||
"max-len": [
|
||||
"warn",
|
||||
240
|
||||
],
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"double"
|
||||
],
|
||||
"import/prefer-default-export": "warn",
|
||||
"react/jsx-props-no-spreading": "off",
|
||||
"react/prop-types": "off",
|
||||
// Temp
|
||||
"react/jsx-one-expression-per-line": "off",
|
||||
"react/no-array-index-key": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
"jsx-a11y/no-static-element-interactions": "off"
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"plugins": [],
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"@typescript-eslint/naming-convention": "off",
|
||||
"max-len": [
|
||||
"warn",
|
||||
240
|
||||
],
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"double"
|
||||
],
|
||||
"import/prefer-default-export": "warn",
|
||||
"react/jsx-props-no-spreading": "off",
|
||||
"react/prop-types": "off",
|
||||
// Temp
|
||||
"react/jsx-one-expression-per-line": "off",
|
||||
"react/no-array-index-key": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"jsx-a11y/label-has-associated-control": "off",
|
||||
"jsx-a11y/click-events-have-key-events": "off",
|
||||
"jsx-a11y/no-noninteractive-element-interactions": "off",
|
||||
"jsx-a11y/no-static-element-interactions": "off"
|
||||
}
|
||||
}
|
||||
|
||||
+120
-120
@@ -1,42 +1,42 @@
|
||||
stages:
|
||||
- setup
|
||||
- audit
|
||||
- lint
|
||||
- build
|
||||
- test
|
||||
- publish
|
||||
- deploy
|
||||
- setup
|
||||
- audit
|
||||
- lint
|
||||
- build
|
||||
- test
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
install:
|
||||
image: node:14
|
||||
stage: setup
|
||||
script:
|
||||
- npm ci
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
expire_in: 1 week
|
||||
image: node:14
|
||||
stage: setup
|
||||
script:
|
||||
- npm ci
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules
|
||||
expire_in: 1 week
|
||||
|
||||
audit:
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: audit
|
||||
script:
|
||||
- npm audit --audit-level=critical
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: audit
|
||||
script:
|
||||
- npm audit --audit-level=critical
|
||||
|
||||
es:lint:
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: lint
|
||||
script:
|
||||
- npm run lint:es
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: lint
|
||||
script:
|
||||
- npm run lint:es
|
||||
|
||||
css:lint:
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: lint
|
||||
script:
|
||||
- npm run lint:css
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: lint
|
||||
script:
|
||||
- npm run lint:css
|
||||
|
||||
# test:unit:
|
||||
# image: node:14
|
||||
@@ -45,103 +45,103 @@ css:lint:
|
||||
# - npm run test:unit
|
||||
|
||||
build:
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: build
|
||||
script:
|
||||
- NODE_ENV=test npm run build
|
||||
dependencies:
|
||||
- install
|
||||
artifacts:
|
||||
paths:
|
||||
- .next
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- node_modules/
|
||||
- .next/cache/
|
||||
image: node:14
|
||||
needs: ["install"]
|
||||
stage: build
|
||||
script:
|
||||
- NODE_ENV=test npm run build
|
||||
dependencies:
|
||||
- install
|
||||
artifacts:
|
||||
paths:
|
||||
- .next
|
||||
expire_in: 1 week
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- node_modules/
|
||||
- .next/cache/
|
||||
|
||||
test:e2e:
|
||||
image: circleci/node:14-browsers
|
||||
needs: ["install", "build"]
|
||||
stage: test
|
||||
script:
|
||||
- npm run test:e2e
|
||||
artifacts:
|
||||
paths:
|
||||
- e2e-screenshots
|
||||
expire_in: 1 week
|
||||
when: on_failure
|
||||
image: circleci/node:14-browsers
|
||||
needs: ["install", "build"]
|
||||
stage: test
|
||||
script:
|
||||
- npm run testcafe
|
||||
artifacts:
|
||||
paths:
|
||||
- e2e-screenshots
|
||||
expire_in: 1 week
|
||||
when: on_failure
|
||||
|
||||
publish:dev:
|
||||
stage: publish
|
||||
image: docker:stable
|
||||
needs: ["build", "test:e2e", "es:lint", "css:lint"]
|
||||
services:
|
||||
- docker:stable-dind
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":latest --build-arg NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api --build-arg NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
- docker push "$IMAGE_NAME":latest
|
||||
stage: publish
|
||||
image: docker:stable
|
||||
needs: ["build", "test:e2e", "es:lint", "css:lint"]
|
||||
services:
|
||||
- docker:stable-dind
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":latest --build-arg NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api --build-arg NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
- docker push "$IMAGE_NAME":latest
|
||||
|
||||
publish:prod:
|
||||
stage: publish
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:stable-dind
|
||||
only:
|
||||
- production
|
||||
script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":prod
|
||||
- docker push "$IMAGE_NAME":prod
|
||||
stage: publish
|
||||
image: docker:stable
|
||||
services:
|
||||
- docker:stable-dind
|
||||
only:
|
||||
- production
|
||||
script:
|
||||
- docker info
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- docker build . -t "$IMAGE_NAME":prod
|
||||
- docker push "$IMAGE_NAME":prod
|
||||
|
||||
deploy:dev:
|
||||
stage: deploy
|
||||
image: docker:stable
|
||||
only:
|
||||
- master
|
||||
environment:
|
||||
name: dev
|
||||
url: https://dev.sahkoinsinoorikilta.fi
|
||||
variables:
|
||||
DOCKER_HOST: $DEV_CI_DOCKER_HOST
|
||||
DOCKER_TLS_VERIFY: 1
|
||||
before_script:
|
||||
- mkdir -p ~/.docker
|
||||
- echo "$DEV_TLSCACERT" > ~/.docker/ca.pem
|
||||
- echo "$DEV_TLSCERT" > ~/.docker/cert.pem
|
||||
- echo "$DEV_TLSKEY" > ~/.docker/key.pem
|
||||
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c stack-compose-dev.yml "$SERVICE_NAME"
|
||||
after_script:
|
||||
- docker logout "$CI_REGISTRY"
|
||||
stage: deploy
|
||||
image: docker:stable
|
||||
only:
|
||||
- master
|
||||
environment:
|
||||
name: dev
|
||||
url: https://dev.sahkoinsinoorikilta.fi
|
||||
variables:
|
||||
DOCKER_HOST: $DEV_CI_DOCKER_HOST
|
||||
DOCKER_TLS_VERIFY: 1
|
||||
before_script:
|
||||
- mkdir -p ~/.docker
|
||||
- echo "$DEV_TLSCACERT" > ~/.docker/ca.pem
|
||||
- echo "$DEV_TLSCERT" > ~/.docker/cert.pem
|
||||
- echo "$DEV_TLSKEY" > ~/.docker/key.pem
|
||||
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c stack-compose-dev.yml "$SERVICE_NAME"
|
||||
after_script:
|
||||
- docker logout "$CI_REGISTRY"
|
||||
|
||||
deploy:prod:
|
||||
stage: deploy
|
||||
image: docker:stable
|
||||
only:
|
||||
- production
|
||||
environment:
|
||||
name: production
|
||||
url: https://sahkoinsinoorikilta.fi
|
||||
when: manual
|
||||
variables:
|
||||
DOCKER_HOST: $CI_DOCKER_HOST
|
||||
DOCKER_TLS_VERIFY: 1
|
||||
before_script:
|
||||
- mkdir -p ~/.docker
|
||||
- echo "$TLSCACERT" > ~/.docker/ca.pem
|
||||
- echo "$TLSCERT" > ~/.docker/cert.pem
|
||||
- echo "$TLSKEY" > ~/.docker/key.pem
|
||||
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c stack-compose.yml "$SERVICE_NAME"
|
||||
after_script:
|
||||
- docker logout "$CI_REGISTRY"
|
||||
stage: deploy
|
||||
image: docker:stable
|
||||
only:
|
||||
- production
|
||||
environment:
|
||||
name: production
|
||||
url: https://sahkoinsinoorikilta.fi
|
||||
when: manual
|
||||
variables:
|
||||
DOCKER_HOST: $CI_DOCKER_HOST
|
||||
DOCKER_TLS_VERIFY: 1
|
||||
before_script:
|
||||
- mkdir -p ~/.docker
|
||||
- echo "$TLSCACERT" > ~/.docker/ca.pem
|
||||
- echo "$TLSCERT" > ~/.docker/cert.pem
|
||||
- echo "$TLSKEY" > ~/.docker/key.pem
|
||||
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
|
||||
script:
|
||||
- docker stack deploy --with-registry-auth -c stack-compose.yml "$SERVICE_NAME"
|
||||
after_script:
|
||||
- docker logout "$CI_REGISTRY"
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "https://sahkoinsinoorikilta.fi",
|
||||
generateRobotsTxt: true,
|
||||
exclude: ["/events/*", "/feed/*", "/signup/*", "/admin/*"]
|
||||
}
|
||||
exclude: ["/events/*", "/feed/*", "/signup/*", "/admin/*"],
|
||||
};
|
||||
|
||||
+1
-4
@@ -6,15 +6,12 @@ module.exports = withBundleAnalyzer({
|
||||
target: "server",
|
||||
images: {
|
||||
domains: [
|
||||
"sahkoinsinoorikilta.fi",
|
||||
"prod.sahkoinsinoorikilta.fi",
|
||||
"api.sahkoinsinoorikilta.fi",
|
||||
"static.sahkoinsinoorikilta.fi",
|
||||
"api.dev.sahkoinsinoorikilta.fi",
|
||||
"placehold.it",
|
||||
],
|
||||
},
|
||||
future: {
|
||||
webpack5: true
|
||||
webpack5: true,
|
||||
},
|
||||
});
|
||||
|
||||
Generated
+1325
-1771
File diff suppressed because it is too large
Load Diff
+34
-37
@@ -27,64 +27,61 @@
|
||||
"start": "next dev",
|
||||
"start-prod": "next start --port ${SERVER_PORT:=80}",
|
||||
"serve": "next start --port 3000",
|
||||
"test": "npm run test:e2e:verbose",
|
||||
"test:e2e": "testcafe --list-browsers && npm-run-all -p -r serve testcafe",
|
||||
"test:e2e:verbose": "npm-run-all -p -r serve testcafe:verbose",
|
||||
"testcafe": "testcafe --skip-js-errors -S -s 'e2e-screenshots' --app-init-delay 2000 chrome:headless tests/testcafe",
|
||||
"testcafe:verbose": "testcafe --skip-js-errors -S -s 'e2e-screenshots' --app-init-delay 2000 chrome tests/testcafe",
|
||||
"test": "npm run testcafe",
|
||||
"testcafe": "testcafe --config-file testcafe.json",
|
||||
"build-analyze": "ANALYZE=true npm run build",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-cookie": "2.2.6",
|
||||
"@types/react": "^17.0.2",
|
||||
"@types/react-beautiful-dnd": "13.0.0",
|
||||
"@types/react-csv": "1.1.1",
|
||||
"@types/react-dom": "^17.0.1",
|
||||
"@types/react-jsonschema-form": "1.7.4",
|
||||
"@types/react": "^17.0.5",
|
||||
"@types/react-beautiful-dnd": "^13.0.0",
|
||||
"@types/react-csv": "^1.1.1",
|
||||
"@types/react-dom": "^17.0.3",
|
||||
"@types/react-jsonschema-form": "^1.7.4",
|
||||
"@types/shortid": "0.0.29",
|
||||
"@types/styled-components": "5.1.7",
|
||||
"@typescript-eslint/eslint-plugin": "4.16.1",
|
||||
"@typescript-eslint/parser": "4.16.1",
|
||||
"@types/styled-components": "^5.1.9",
|
||||
"@typescript-eslint/eslint-plugin": "^4.22.1",
|
||||
"@typescript-eslint/parser": "^4.22.1",
|
||||
"babel-plugin-styled-components": "1.12.0",
|
||||
"eslint": "7.21.0",
|
||||
"eslint-config-airbnb-typescript": "12.3.1",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "6.4.1",
|
||||
"eslint-plugin-react": "7.22.0",
|
||||
"eslint-plugin-react-hooks": "4.2.0",
|
||||
"husky": "5.1.3",
|
||||
"next-sitemap": "^1.6.25",
|
||||
"eslint": "^7.25.0",
|
||||
"eslint-config-airbnb-typescript": "^12.3.1",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-react": "^7.23.2",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"husky": "^6.0.0",
|
||||
"next-sitemap": "^1.6.49",
|
||||
"npm-run-all": "4.1.5",
|
||||
"stylelint": "13.11.0",
|
||||
"stylelint-config-recommended": "3.0.0",
|
||||
"stylelint-config-styled-components": "0.1.1",
|
||||
"stylelint-processor-styled-components": "1.10.0",
|
||||
"testcafe": "1.12.0",
|
||||
"typescript": "4.2.2"
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-recommended": "^5.0.0",
|
||||
"stylelint-config-styled-components": "^0.1.1",
|
||||
"stylelint-processor-styled-components": "^1.10.0",
|
||||
"testcafe": "^1.14.0",
|
||||
"typescript": "^4.2.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@next/bundle-analyzer": "^10.1.3",
|
||||
"@next/bundle-analyzer": "^10.2.0",
|
||||
"axios": "0.21.1",
|
||||
"date-fns": "2.18.0",
|
||||
"date-fns": "^2.21.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"js-cookie": "2.2.1",
|
||||
"lodash": "4.17.21",
|
||||
"next": "^10.1.3",
|
||||
"next": "^10.2.0",
|
||||
"normalize.css": "8.0.1",
|
||||
"react": "^17.0.2",
|
||||
"react-beautiful-dnd": "13.1.0",
|
||||
"react-csv": "2.0.3",
|
||||
"react-beautiful-dnd": "^13.1.0",
|
||||
"react-csv": "^2.0.3",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-is": "^17.0.2",
|
||||
"react-jsonschema-form": "1.8.1",
|
||||
"react-markdown": "^6.0.0",
|
||||
"react-mde": "^11.1.0",
|
||||
"react-toastify": "^7.0.3",
|
||||
"react-markdown": "^6.0.2",
|
||||
"react-mde": "^11.5.0",
|
||||
"react-toastify": "^7.0.4",
|
||||
"rehype-raw": "^5.1.0",
|
||||
"rehype-sanitize": "^4.0.0",
|
||||
"shortid": "2.2.16",
|
||||
"styled-components": "5.2.3",
|
||||
"swr": "0.4.2"
|
||||
"styled-components": "^5.3.0",
|
||||
"swr": "^0.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3.4'
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
version: '3.4'
|
||||
version: "3.4"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"src": "tests/testcafe",
|
||||
"browsers": "all",
|
||||
"concurrency": 1,
|
||||
"screenshots": {
|
||||
"path": "e2e-screenshots",
|
||||
"takeOnFails": true
|
||||
},
|
||||
"skipJsErrors": true,
|
||||
"appCommand": "npm run serve",
|
||||
"appInitDelay": 2000
|
||||
}
|
||||
@@ -4,9 +4,6 @@ import { getSiteRoot } from "./utils";
|
||||
fixture`404 page renders and functions correctly`.page(`${getSiteRoot()}/404`);
|
||||
|
||||
test("Page contains the text 404", async (t) => {
|
||||
/**
|
||||
* Test if there is a favicon element on the page
|
||||
*/
|
||||
const elem = Selector("#not-found");
|
||||
await t.expect(elem.textContent).contains("404");
|
||||
});
|
||||
|
||||
+8
-2
@@ -6,7 +6,10 @@
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"lib": ["dom", "esnext"],
|
||||
"lib": [
|
||||
"dom",
|
||||
"esnext"
|
||||
],
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"noEmit": true,
|
||||
@@ -19,7 +22,10 @@
|
||||
"sourceMap": true,
|
||||
"strict": false, // TODO: switch true
|
||||
"target": "esnext",
|
||||
"typeRoots": ["types", "node_modules/@types"],
|
||||
"typeRoots": [
|
||||
"types",
|
||||
"node_modules/@types"
|
||||
],
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@api/*": [
|
||||
|
||||
Reference in New Issue
Block a user