From fa0574e0ef6db28881eeca6ba09b4bf18abf9c7c Mon Sep 17 00:00:00 2001 From: Stanislaw <32984705+stanislawK@users.noreply.github.com> Date: Wed, 24 May 2023 21:08:04 +0200 Subject: [PATCH 01/21] (fixes #508) Vue 2 to 3 upgrade (#515) * 508 Vue upgrade initial change --- frontend/.eslintrc.json | 2 +- frontend/Dockerfile | 2 +- frontend/babel.config.js | 2 +- frontend/jest.config.js | 2 +- frontend/package.json | 67 +- frontend/src/App.vue | 4 +- frontend/src/assets/projects.js | 76 +- .../DashboardMain.spec.js} | 6 +- .../{Dashboard.vue => DashboardMain.vue} | 14 +- .../HacknightWrapper.spec.js} | 6 +- .../{Hacknight.vue => HacknightWrapper.vue} | 8 +- .../HacknightsParticipants.vue | 25 +- .../Dashboard/Header/DashboardHeader.vue | 6 +- .../ParticipantsList.spec.js} | 6 +- ...{Participants.vue => ParticipantsList.vue} | 138 +- .../ParticipantsSearch/ParticipantsSearch.vue | 21 +- .../ParticipantsChart.spec.js | 4 +- .../ParticipantsChart/ParticipantsChart.vue | 20 +- .../HomePage/ContactUs/ContactUs.vue | 70 +- .../components/HomePage/Header/Header.spec.js | 10 - .../HomePage/Header/HomePageHeader.spec.js | 10 + .../Header/{Header.vue => HomePageHeader.vue} | 15 +- frontend/src/components/HomePage/HomePage.vue | 14 +- .../ModalContent/ModalContent.spec.js | 2 +- .../OurProjects/ModalContent/ModalContent.vue | 13 +- .../HomePage/OurProjects/OurProjects.vue | 22 +- .../HomePage/SocialMedia/SocialMedia.vue | 15 +- .../LoginForm.spec.js} | 6 +- .../Login/{Login.vue => LoginForm.vue} | 44 +- frontend/src/helpers/date.js | 4 +- frontend/src/helpers/validation.js | 4 +- frontend/src/main.js | 54 +- frontend/src/plugins/vuetify.js | 23 +- frontend/src/router.js | 23 +- frontend/src/store/index.js | 11 +- frontend/src/store/modules/auth.js | 24 +- frontend/src/store/modules/contact.js | 20 +- frontend/src/store/modules/hacknight.js | 34 +- frontend/src/store/modules/participant.js | 18 +- frontend/webpack.config.js | 5 + frontend/yarn.lock | 10883 +++++++--------- 41 files changed, 5007 insertions(+), 6726 deletions(-) rename frontend/src/components/{Login/Login.spec.js => Dashboard/DashboardMain.spec.js} (57%) rename frontend/src/components/Dashboard/{Dashboard.vue => DashboardMain.vue} (76%) rename frontend/src/components/Dashboard/{Participants/Participants.spec.js => Hacknight/HacknightWrapper.spec.js} (56%) rename frontend/src/components/Dashboard/Hacknight/{Hacknight.vue => HacknightWrapper.vue} (98%) rename frontend/src/components/Dashboard/{Hacknight/Hacknight.spec.js => Participants/ParticipantsList.spec.js} (56%) rename frontend/src/components/Dashboard/Participants/{Participants.vue => ParticipantsList.vue} (76%) delete mode 100644 frontend/src/components/HomePage/Header/Header.spec.js create mode 100644 frontend/src/components/HomePage/Header/HomePageHeader.spec.js rename frontend/src/components/HomePage/Header/{Header.vue => HomePageHeader.vue} (91%) rename frontend/src/components/{Dashboard/Dashboard.spec.js => Login/LoginForm.spec.js} (60%) rename frontend/src/components/Login/{Login.vue => LoginForm.vue} (74%) create mode 100644 frontend/webpack.config.js diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index b0737c8e..f7a81f62 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -29,7 +29,7 @@ "jest/valid-expect": "error" }, "parserOptions": { - "parser": "babel-eslint" + "parser": "@babel/eslint-parser" }, "settings": { "import/resolver": { diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 189bb015..51a10ed6 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:12 +FROM node:19 EXPOSE 8080 diff --git a/frontend/babel.config.js b/frontend/babel.config.js index 3490e08c..4f45f32b 100644 --- a/frontend/babel.config.js +++ b/frontend/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: ['@vue/app'] + presets: ['@vue/app'], }; diff --git a/frontend/jest.config.js b/frontend/jest.config.js index 0ce51989..820fc5a8 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -4,5 +4,5 @@ module.exports = { testMatch: ['**/?(*.)+(spec).js'], collectCoverage: true, collectCoverageFrom: ['src/**/*', '!src/assets/**'], - transformIgnorePatterns: ['/node_modules/(?!(vue-scrollactive)/)'] + transformIgnorePatterns: ['/node_modules/(?!(vue-scrollactive)/)'], }; diff --git a/frontend/package.json b/frontend/package.json index 4458d4c3..1cd60749 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,41 +11,48 @@ "lint:fix": "vue-cli-service lint " }, "dependencies": { - "@mdi/font": "^4.5.95", - "apexcharts": "^3.27.1", - "axios": "^0.21.1", - "eslint-plugin-jest": "^24.5.0", + "@mdi/font": "^7.2.96", + "apexcharts": "^3.37.3", + "axios": "^1.3.5", + "eslint-plugin-jest": "^27.2.1", "lodash": "^4.17.21", - "vue": "^2.6.10", - "vue-apexcharts": "^1.6.1", - "vue-router": "^3.3.4", + "vue": "3.2.47", + "vue3-apexcharts": "^1.4.1", + "vue-router": "^4.1.6", "vue-scrollactive": "^0.9.3", - "vuelidate": "^0.7.4", - "vuetify": "^2.6.10", - "vuex": "^3.0.1", - "vue-gtag": "^1.16.1" + "@vuelidate/core": "^2.0.2", + "@vuelidate/validators": "^2.0.2", + "vuetify": "3.2.2", + "vuex": "^4.1.0", + "vue-gtag": "^2.0.1" }, "devDependencies": { - "@vue/cli-plugin-babel": "^3.8.0", - "@vue/cli-plugin-eslint": "^3.8.0", - "@vue/cli-plugin-unit-jest": "~4.5.0", - "@vue/cli-service": "^3.8.0", - "@vue/test-utils": "^1.0.3", - "babel-eslint": "^10.0.1", - "eslint": "^5.8.0", - "eslint-config-prettier": "^4.3.0", - "eslint-plugin-import": "^2.17.3", - "eslint-plugin-prettier": "^3.1.0", - "eslint-plugin-vue": "^5.0.0-beta.4", - "husky": "^2.3.0", - "prettier": "^1.17.1", + "@vue/cli-plugin-babel": "^5.0.8", + "@vue/cli-plugin-eslint": "^5.0.8", + "@vue/cli-plugin-unit-jest": "^5.0.8", + "@vue/cli-service": "^5.0.8", + "@vue/compiler-sfc": "^3.2.47", + "@vue/test-utils": "^2.3.2", + "eslint": "^8.38.0", + "eslint-config-prettier": "^8.8.0", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-vue": "^9.10.0", + "husky": "^8.0.3", + "prettier": "^2.8.7", "sass": "~1.32.12", - "sass-loader": "^7.1.0", - "style-loader": "^0.23.1", - "vue-cli-plugin-vuetify": "^0.6.3", - "vue-template-compiler": "^2.6.10", - "vuetify-loader": "^1.3.0", - "webpack": "^4.39.3" + "sass-loader": "^13.2.2", + "style-loader": "^3.3.2", + "typescript": "^4.9.4", + "webpack": "^5.75.0", + "webpack-plugin-vuetify": "^2.0.0", + "@babel/core": "^7.0.0", + "jest": "^27.1.0", + "@vue/compiler-dom": "^3.2.47", + "@vue/server-renderer": "^3.2.47", + "@vue/babel-preset-app": "^5.0.8", + "@babel/eslint-parser": "^7.21.3" + }, "postcss": { "plugins": { diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 24988f47..5404680f 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,5 +1,5 @@