Skip to content

Commit cb9664f

Browse files
madsnedergaardtonyplsMarkus KillendahlVIKTORVAV99lav-julien
committed
Rewrites the frontend app (#4982)
The whole app was rewritten in TypeScript with modern tooling and libraries. --------- Co-authored-by: tonypls <[email protected]> Co-authored-by: Markus Killendahl <[email protected]> Co-authored-by: Viktor Andersson <[email protected]> Co-authored-by: lav-julien <[email protected]>
1 parent ee8e009 commit cb9664f

File tree

2,492 files changed

+43039
-190654
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,492 files changed

+43039
-190654
lines changed

.circleci/config.yml

-109
This file was deleted.

.github/labeler.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
infrastructure:
2-
- .circleci/*
32
- .github/**/*
43
- docker-compose.yml
54
- web/Dockerfile
File renamed without changes.

.github/workflows/CI.yml

+20-21
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
branches:
55
- master
66
pull_request:
7-
branches:
8-
- master
97

108
jobs:
119
# This job is used to determine what files have changed and is used by later jobs to determine if they should run.
@@ -89,13 +87,13 @@ jobs:
8987
needs.setup.outputs.workflows != 'false'
9088
uses: ./.github/workflows/validate-local-links-in-md.yml
9189

92-
jest:
93-
name: Jest
94-
needs: [setup, prettier]
95-
if: >-
96-
needs.setup.outputs.frontend != 'false' ||
97-
needs.setup.outputs.workflows != 'false'
98-
uses: ./.github/workflows/jest.yml
90+
# unit_test:
91+
# name: Unit test
92+
# needs: [setup, prettier]
93+
# if: >-
94+
# needs.setup.outputs.frontend != 'false' ||
95+
# needs.setup.outputs.workflows != 'false'
96+
# uses: ./.github/workflows/unit_test.yml
9997

10098
jsonlint:
10199
name: JSONLint
@@ -106,13 +104,13 @@ jobs:
106104
uses: ./.github/workflows/jsonlint.yml
107105

108106
# Frontend checks
109-
eslint:
110-
name: ESLint
111-
needs: [setup, prettier]
112-
if: >-
113-
needs.setup.outputs.frontend != 'false' ||
114-
needs.setup.outputs.workflows != 'false'
115-
uses: ./.github/workflows/eslint.yml
107+
# eslint:
108+
# name: ESLint
109+
# needs: [setup, prettier]
110+
# if: >-
111+
# needs.setup.outputs.frontend != 'false' ||
112+
# needs.setup.outputs.workflows != 'false'
113+
# uses: ./.github/workflows/eslint.yml
116114

117115
verify:
118116
name: Verify
@@ -123,11 +121,11 @@ jobs:
123121
needs.setup.outputs.workflows != 'false'
124122
uses: ./.github/workflows/verify.yml
125123

126-
cypress:
127-
name: Cypress
128-
needs: [eslint, verify, jest]
129-
uses: ./.github/workflows/cypress.yml
130-
secrets: inherit
124+
# cypress:
125+
# name: Cypress
126+
# needs: [eslint, verify, unit_test]
127+
# uses: ./.github/workflows/cypress.yml
128+
# secrets: inherit
131129

132130
# Python checks
133131
python:
@@ -149,5 +147,6 @@ jobs:
149147

150148
# Code quality checks
151149
codeql:
150+
needs: [setup, prettier]
152151
name: CodeQL
153152
uses: ./.github/workflows/codeql.yml

.github/workflows/cypress.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ jobs:
88
steps:
99
- name: Checkout
1010
uses: actions/checkout@v2
11+
- name: Setup PNPM
12+
uses: pnpm/action-setup@v2
13+
with:
14+
version: 7
1115
- name: Cypress run
1216
uses: cypress-io/github-action@v5
1317
env:
1418
TZ: Europe/Copenhagen
1519
with:
1620
working-directory: ./web
17-
start: yarn develop
18-
wait-on: 'http://localhost:8080'
21+
start: pnpm dev
22+
wait-on: 'http://localhost:5173'

.github/workflows/eslint.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,26 @@ jobs:
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v3
22-
- name: Setup Node
22+
- name: Setup PNPM
23+
uses: pnpm/action-setup@v2
24+
with:
25+
version: 7
26+
- name: Setup Node v14.x
2327
uses: actions/setup-node@v3
2428
with:
25-
node-version: lts/*
26-
cache: 'yarn'
27-
cache-dependency-path: web/yarn.lock
28-
- name: Restore node_modules
29-
id: cache
29+
node-version: 14
30+
- name: Restore node_modules for web
31+
id: cache-web
3032
uses: actions/cache@v3
3133
with:
3234
path: ./web/node_modules
33-
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/yarn.lock') }}
35+
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
3436
- name: Install web dependencies
3537
if: steps.cache.outputs.cache-hit != 'true'
36-
run: yarn install --frozen-lockfile
38+
run: pnpm install --frozen-lockfile
3739
- name: Generate zone config
3840
if: steps.cache.outputs.cache-hit == 'true'
39-
run: yarn generate-zones-config
41+
run: pnpm generate-zones-config
4042
- name: Restore ESLint cache
4143
uses: actions/cache@v3
4244
with:
@@ -48,6 +50,8 @@ jobs:
4850
${{ runner.os }}-eslint_cache
4951
- name: ESLint
5052
run: node_modules/.bin/eslint .
53+
--ignore-path .gitignore
54+
--ext .ts,.tsx .
5155
--cache
5256
--cache-location node_modules/.cache/eslint/.eslintcache
5357
--format @microsoft/eslint-formatter-sarif

.github/workflows/jest.yml

-34
This file was deleted.

.github/workflows/prettier.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v3
14-
- name: Setup Node
14+
- name: Setup PNPM
15+
uses: pnpm/action-setup@v2
16+
with:
17+
version: 7
18+
- name: Setup Node v14.x
1519
uses: actions/setup-node@v3
1620
with:
17-
node-version: lts/*
21+
node-version: 14
1822
- name: Restore node_modules for web
1923
id: cache-web
2024
uses: actions/cache@v3
2125
with:
22-
path: |
23-
web/node_modules
24-
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/yarn.lock') }}
26+
path: web/node_modules
27+
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
2528
- name: Install web dependencies
2629
if: steps.cache-web.outputs.cache-hit != 'true'
27-
run: yarn install --frozen-lockfile
30+
run: pnpm install --frozen-lockfile
2831
working-directory: ./web
2932
- name: Prettier Check
3033
# Uses the prettier binary from the web node_modules so it's always in sync.

.github/workflows/unit_test.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
unit_test:
6+
name: Unit test
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 4
9+
defaults:
10+
run:
11+
working-directory: web
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Setup PNPM
16+
uses: pnpm/action-setup@v2
17+
with:
18+
version: 7
19+
- name: Setup Node v14.x
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 14
23+
24+
- name: Restore node_modules for web
25+
id: cache-web
26+
uses: actions/cache@v3
27+
with:
28+
path: ./web/node_modules
29+
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
30+
- name: Install web dependencies
31+
if: steps.cache.outputs.cache-hit != 'true'
32+
run: pnpm install --frozen-lockfile
33+
- name: Generate zone config
34+
if: steps.cache.outputs.cache-hit == 'true'
35+
run: pnpm generate-zones-config
36+
- name: Run test
37+
run: pnpm run test

.github/workflows/verify.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,28 @@ jobs:
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v3
17-
- name: Setup Node
17+
- name: Setup PNPM
18+
uses: pnpm/action-setup@v2
19+
with:
20+
version: 7
21+
- name: Setup Node v14.x
1822
uses: actions/setup-node@v3
1923
with:
20-
node-version: lts/*
21-
cache: 'yarn'
22-
cache-dependency-path: web/yarn.lock
24+
node-version: 14
2325
- name: Restore node_modules
2426
id: cache
2527
uses: actions/cache@v3
2628
with:
2729
path: ./web/node_modules
28-
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/yarn.lock') }}
30+
key: ${{ runner.os }}-node_modules-${{ hashFiles('./web/pnpm-lock.yaml') }}
2931
- name: Install web dependencies
3032
if: steps.cache.outputs.cache-hit != 'true'
31-
run: yarn install --frozen-lockfile
33+
run: pnpm install --frozen-lockfile
3234
- name: Generate zone config
3335
if: steps.cache.outputs.cache-hit == 'true'
34-
run: yarn generate-zones-config
36+
run: pnpm generate-zones-config
3537
- name: Verify geometries
3638
run: |
37-
node geo/update-world.js
39+
pnpm run update-world
3840
env:
3941
VERIFY_NO_UPDATES: 1

0 commit comments

Comments
 (0)