diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..2b7e69126 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,8 @@ +node_modules/ +dist/ +husky/ +cypress/ +cypress-coverage/ +jest-coverage +public/ +test_summary_reports/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5af107f3b..7bbcc5925 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,8 @@ jobs: uses: cypress-io/github-action@v6 with: install: true - start: npm run serve - wait-on: http://localhost:8080/ + start: npm run dev + wait-on: http://localhost:5173/ config-file: cypress.config.js spec: "tests/e2e/specs/**/*" record: true diff --git a/checkForOnly.sh b/.husky/checkForOnly.sh similarity index 100% rename from checkForOnly.sh rename to .husky/checkForOnly.sh diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..6b4dd4d36 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,33 @@ +#!/bin/sh + +# ================================================================= +# Check that we never commit a .only on a test +# Also check that we never pass a --spec directive in package.json +# ================================================================= + +stagedFiles=$(git status --porcelain | grep '^M' | awk '{print $2}') + +for file in $stagedFiles; do + if [[ $file == "checkForOnly.sh" ]]; then + continue + fi + + if [[ $file == "package.json" ]]; then + specDirectiveCount=$(grep "\-\-spec" package.json | wc -l) + if [[ $specDirectiveCount -gt 0 ]]; then + echo "package.json contains a spec directive." + exit 255 + else + echo "package.json is OK" + fi + fi + + numberOfOnlys=$(grep "\.only" $file | wc -l) + if [[ $numberOfOnlys -gt 0 ]]; then + echo "$file contains .only(s)" + grep -n "\.only" $file --color=auto + exit 255 + fi +done + +echo "No staged files contain .only" diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 000000000..3867a0feb --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm run lint diff --git a/Dockerfile b/Dockerfile index 242e8c10a..414a6f095 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine +FROM node:20-alpine RUN apk add python3 make g++\ && rm -rf /var/cache/apk/* @@ -11,4 +11,4 @@ RUN npm install COPY . . -EXPOSE 8080 +EXPOSE 5173 diff --git a/babel.config.js b/babel.config.js index 19b6771b9..768d7c46b 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,6 @@ module.exports = { presets: [ - '@vue/cli-plugin-babel/preset', + '@babel/preset-env', ], plugins: ['istanbul'], sourceType: 'unambiguous', diff --git a/cypress.config.js b/cypress.config.js index b89b52fd9..8ece6a7ac 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -15,15 +15,15 @@ module.exports = defineConfig({ setupNodeEvents(on, config) { return require('./tests/e2e/plugins/index.js')(on, config); }, - baseUrl: 'http://localhost:8080', + baseUrl: 'http://localhost:5173', specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}', supportFile: 'tests/e2e/support/index.js', }, component: { devServer: { - framework: 'vue-cli', - bundler: 'webpack', + framework: 'vue', + bundler: 'vite', }, }, }); diff --git a/docker-compose.yml b/docker-compose.yml index 76d74ed2f..893497c14 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: dockerfile: Dockerfile ports: - - "8080:8080" + - "5173:5173" volumes: - .:/app - /app/node_modules diff --git a/public/favicon.ico b/favicon.ico similarity index 100% rename from public/favicon.ico rename to favicon.ico diff --git a/public/index.html b/index.html similarity index 83% rename from public/index.html rename to index.html index 4d4ecaae2..06fa78318 100644 --- a/public/index.html +++ b/index.html @@ -4,7 +4,7 @@ - +