Skip to content

Commit 651c293

Browse files
committed
Upgrade Vue components. Also documented upgrade steps (we should create a scheduled GHA job for that).
1 parent f9e4903 commit 651c293

File tree

3 files changed

+29
-63
lines changed

3 files changed

+29
-63
lines changed

README.md

Lines changed: 15 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -31,57 +31,23 @@ This project is used as example in a variety of articles & as eBook:
3131

3232
[blog.codecentric.de/en/2018/04/spring-boot-vuejs](https://blog.codecentric.de/en/2018/04/spring-boot-vuejs) | [JavaMagazin 8.2018](https://jaxenter.de/ausgaben/java-magazin-8-18) | [entwickler.press shortcuts 229](https://www.amazon.com/Vue-js-f%C3%BCr-alle-Wissenswertes-Einsteiger-ebook/dp/B07HQF9VX4/ref=sr_1_1?ie=UTF8&qid=1538484852&sr=8-1&keywords=Vue-js-f%C3%BCr-alle-Wissenswertes-Einsteiger-ebook) | [softwerker Vol.12](https://info.codecentric.de/softwerker-vol-12)
3333

34-
## Table of Contents
35-
* [In Search of a new Web Frontend-Framework after 2 Years of absence...](#in-search-of-a-new-web-frontend-framework-after-2-years-of-absence)
36-
* [Setup Vue.js & Spring Boot](#setup-vuejs--spring-boot)
37-
* [Project setup](#project-setup)
38-
* [Backend](#backend)
39-
* [Frontend](#frontend)
40-
* [Use frontend-maven-plugin to handle NPM, Node, Bower, Grunt, Gulp, Webpack and so on :)](#use-frontend-maven-plugin-to-handle-npm-node-bower-grunt-gulp-webpack-and-so-on-)
41-
* [First App run](#first-app-run)
42-
* [Faster feedback with webpack-dev-server](#faster-feedback-with-webpack-dev-server)
43-
* [Browser developer tools extension](#browser-developer-tools-extension)
44-
* [HTTP calls from Vue.js to (Spring Boot) REST backend](#http-calls-from-vuejs-to-spring-boot-rest-backend)
45-
* [The problem with SOP](#the-problem-with-sop)
46-
* [Enabling Axios CORS support](#enabling-axios-cors-support)
47-
* [Enabling Spring Boot CORS support](#enabling-spring-boot-cors-support)
48-
* [But STOP! Webpack & Vue have something much smarter for us to help us with SOP!](#but-stop-webpack--vue-have-something-much-smarter-for-us-to-help-us-with-sop)
49-
* [Using history mode for nicer URLs](#using-history-mode-for-nicer-urls)
50-
* [Bootstrap & Vue.js](#bootstrap--vuejs)
51-
* [Heroku Deployment](#heroku-deployment)
52-
* [Using Heroku's Postgres as Database for Spring Boot backend and Vue.js frontend](#using-herokus-postgres-as-database-for-spring-boot-backend-and-vuejs-frontend)
53-
* [Testing](#testing)
54-
* [Jest](#jest)
55-
* [Jest Configuration](#jest-configuration)
56-
* [Integration in Maven build (via frontend-maven-plugin)](#integration-in-maven-build-via-frontend-maven-plugin)
57-
* [Run Jest tests inside IntelliJ](#run-jest-tests-inside-intellij)
58-
* [End-2-End (E2E) tests with Nightwatch](#end-2-end-e2e-tests-with-nightwatch)
59-
* [Write Nightwatch tests](#write-nightwatch-tests)
60-
* [NPM Security](#npm-security)
61-
* [Shift from templates to plugin-based architecture in Vue Cli 3](#shift-from-templates-to-plugin-based-architecture-in-vue-cli-3)
62-
* [OMG! My package.json is so small - Vue CLI 3 Plugins](#omg-my-packagejson-is-so-small---vue-cli-3-plugins)
63-
* [The vue.config.js file](#the-vueconfigjs-file)
64-
* [Build and run with Docker](#build-and-run-with-docker)
65-
* [Autorelease to Docker Hub on hub.docker.com](#autorelease-to-docker-hub-on-hubdockercom)
66-
* [Run with JDK 8, 9 or 11ff](#run-with-jdk-8-9-or-11-ff)
67-
* [Secure Spring Boot backend and protect Vue.js frontend](#secure-spring-boot-backend-and-protect-vuejs-frontend)
68-
* [Secure the backend API with Spring Security](#secure-the-backend-api-with-spring-security)
69-
* [Configure Spring Security](#configure-spring-security)
70-
* [Be aware of CSRF!](#be-aware-of-csrf)
71-
* [Testing the secured Backend](#testing-the-secured-backend)
72-
* [Configure credentials inside application.properties and environment variables](#configure-credentials-inside-applicationproperties-and-environment-variables)
73-
* [Protect parts of Vue.js frontend](#protect-parts-of-vuejs-frontend)
74-
* [Create a new Vue Login component](#create-a-new-vue-login-component)
75-
* [Protect multiple Vue.js components](#protect-multiple-vuejs-components)
76-
* [Store login information with vuex](#store-login-information-with-vuex)
77-
* [Define the vuex state](#define-the-vuex-state)
78-
* [Define a vuex action login() and the mutations login_success & login_error](#define-a-vuex-action-login-and-the-mutations-login_success--login_error)
79-
* [Last but not least: define getters for the vuex state](#last-but-not-least-define-getters-for-the-vuex-state)
80-
* [Use vuex Store inside the Login component and forward to Protected.vue, if Login succeeded](#use-vuex-store-inside-the-login-component-and-forward-to-protectedvue-if-login-succeeded)
81-
* [Redirect user from Protected.vue to Login.vue, if not authenticated before](#redirect-user-from-protectedvue-to-loginvue-if-not-authenticated-before)
82-
* [Check auth state at secured backend endpoints](#check-auth-state-at-secured-backend-endpoints)
34+
## Upgrade procedure
8335

36+
Get newest node & npm:
37+
```shell
38+
brew upgrade node
39+
npm install -g npm@latest
40+
```
41+
42+
Update vue-cli
43+
```shell
44+
npm install -g @vue/cli
45+
```
8446

47+
Update Vue components/plugins (see https://cli.vuejs.org/migrating-from-v3/#upgrade-all-plugins-at-once)
48+
```shell
49+
vue upgrade
50+
```
8551

8652
## In Search of a new Web Frontend-Framework after 2 Years of absence...
8753

frontend/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"build": "vue-cli-service build",
1010
"test:unit": "vue-cli-service test:unit --coverage",
1111
"test:e2e": "vue-cli-service test:e2e",
12+
"lint": "vue-cli-service lint",
1213
"clean": "rm -rf node_modules target",
13-
"test": "vue-cli-service test:unit && vue-cli-service test:e2e",
14-
"lint": "vue-cli-service lint"
14+
"test": "vue-cli-service test:unit && vue-cli-service test:e2e"
1515
},
1616
"dependencies": {
1717
"axios": "0.21.1",
@@ -23,23 +23,23 @@
2323
},
2424
"devDependencies": {
2525
"@types/jest": "26.0.23",
26+
"@typescript-eslint/eslint-plugin": "4.28.0",
27+
"@typescript-eslint/parser": "4.28.0",
2628
"@vue/cli-plugin-babel": "4.5.13",
2729
"@vue/cli-plugin-e2e-nightwatch": "4.5.13",
30+
"@vue/cli-plugin-eslint": "4.5.13",
2831
"@vue/cli-plugin-router": "4.5.13",
2932
"@vue/cli-plugin-typescript": "4.5.13",
3033
"@vue/cli-plugin-unit-jest": "4.5.13",
3134
"@vue/cli-plugin-vuex": "4.5.13",
3235
"@vue/cli-service": "4.5.13",
3336
"@vue/compiler-sfc": "3.0.11",
37+
"@vue/eslint-config-typescript": "7.0.0",
3438
"@vue/test-utils": "2.0.0-rc.6",
3539
"babel-jest": "26.6.3",
3640
"chromedriver": "91.0.1",
3741
"eslint": "6.8.0",
3842
"eslint-plugin-vue": "7.11.1",
39-
"@typescript-eslint/eslint-plugin": "4.28.0",
40-
"@typescript-eslint/parser": "4.28.0",
41-
"@vue/cli-plugin-eslint": "4.5.13",
42-
"@vue/eslint-config-typescript": "7.0.0",
4343
"geckodriver": "2.0.0",
4444
"node-sass": "6.0.0",
4545
"sass-loader": "10.2.0",

0 commit comments

Comments
 (0)