-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from Concordium/upgrade-deps
[front-end-tools] Upgrade deps
- Loading branch information
Showing
27 changed files
with
4,879 additions
and
5,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Checks the frontend apps for build, lint, and formatting errors | ||
name: Check | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main, release**, feature** ] | ||
pull_request: | ||
branches: [ main, release**, feature** ] | ||
# Don't run on draft PR's, see: https://github.com/orgs/community/discussions/25722#discussioncomment-3248917 | ||
types: [ opened, synchronize, reopened, ready_for_review ] | ||
paths: | ||
- front-end-tools/**/* | ||
# Allows us to run the workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
|
||
env: | ||
DUMMY: 0 # For cache busting. | ||
NODE_VERSION: 18.16.0 | ||
|
||
jobs: | ||
deps: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: ./front-end-tools | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
cache-dependency-path: "./front-end-tools/yarn.lock" | ||
|
||
- name: Cache dependencies | ||
id: yarn-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./front-end-tools/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('./front-end-tools/yarn.lock') }}-${{ env.DUMMY }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn | ||
- name: Get dependencies | ||
run: yarn install --immutable | ||
lint: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-22.04 | ||
needs: deps | ||
defaults: | ||
run: | ||
working-directory: ./front-end-tools | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
cache-dependency-path: "./front-end-tools/yarn.lock" | ||
|
||
- name: Restore dependencies | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
./front-end-tools/node_modules | ||
key: ${{ runner.os }}-yarn | ||
|
||
- name: Lint | ||
run: yarn lint && yarn fmt-check | ||
build: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-22.04 | ||
needs: deps | ||
defaults: | ||
run: | ||
working-directory: ./front-end-tools | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: yarn | ||
cache-dependency-path: "./front-end-tools/yarn.lock" | ||
|
||
- name: Restore dependencies | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
./front-end-tools/node_modules | ||
key: ${{ runner.os }}-yarn | ||
|
||
- name: Build | ||
run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
*.csv | ||
|
||
node_modules | ||
.yarn | ||
dist | ||
.eslintcache | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# output | ||
dist | ||
|
||
# dependencies | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
node_modules | ||
|
||
# misc | ||
.eslintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.md | ||
*.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"tabWidth": 4 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-4.0.2.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
ARG build_image=node:16-slim | ||
ARG build_image=node:18-slim | ||
|
||
FROM ${build_image} AS build | ||
|
||
WORKDIR /app | ||
COPY ./package.json ./package.json | ||
COPY ./tsconfig.json ./tsconfig.json | ||
COPY ./esbuild.config.ts ./ | ||
COPY ./.yarn ./.yarn | ||
COPY ./.yarnrc.yml ./ | ||
COPY ./yarn.lock ./ | ||
COPY ./package.json ./ | ||
COPY ./tsconfig.json ./ | ||
COPY ./vite.config.ts ./ | ||
COPY ./public ./public | ||
COPY ./src ./src | ||
COPY ./index.html ./ | ||
|
||
RUN yarn && yarn cache clean && yarn build | ||
RUN yarn install --immutable && yarn cache clean && yarn build | ||
|
||
|
||
FROM nginx | ||
COPY --from=build ./app/dist ./usr/share/nginx/html | ||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" | ||
rel="stylesheet" | ||
integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" | ||
crossorigin="anonymous" | ||
/> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> | ||
<meta charset="utf-8" /> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script src="/src/index.tsx" type="module"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Enable Gzip | ||
gzip on; | ||
gzip_http_version 1.0; | ||
gzip_comp_level 2; | ||
gzip_min_length 1100; | ||
gzip_buffers 4 8k; | ||
gzip_proxied any; | ||
gzip_types | ||
text/css | ||
text/javascript | ||
text/xml | ||
text/plain | ||
text/x-component | ||
application/javascript | ||
application/json | ||
application/xml | ||
application/wasm | ||
application/rss+xml | ||
font/truetype | ||
font/opentype | ||
application/vnd.ms-fontobject | ||
image/svg+xml | ||
image/jpeg; | ||
|
||
gzip_static on; | ||
|
||
gzip_proxied expired no-cache no-store private auth; | ||
gzip_disable "MSIE [1-6]\."; | ||
gzip_vary on; | ||
|
||
server { | ||
listen 80 default; | ||
server_name _; | ||
root /usr/share/nginx/html; | ||
|
||
# Set expires max on static file types | ||
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm|wasm)$ { | ||
expires max; | ||
root /usr/share/nginx/html; | ||
access_log off; | ||
} | ||
} | ||
|
Oops, something went wrong.