jhipster / jhipster-vuejs

A Vue.js blueprint for JHipster. It will use Vue.js as the frontend library!
https://www.jhipster.tech
Apache License 2.0
301 stars 179 forks source link

Update Vue dependencies to latest versions #600

Closed mraible closed 4 years ago

mraible commented 4 years ago

Update Vue dependencies to use the latest versions.

If I run ncu (from npm-check-updates) on an app created from v1.7.0, it shows quite a few dependencies that are out of date.

 @fortawesome/fontawesome-svg-core          1.2.26  →         1.2.28
 @fortawesome/free-solid-svg-icons          5.12.0  →         5.13.0
 axios                                      0.19.0  →         0.19.2
 bootstrap-vue                               2.2.2  →         2.13.0
 date-fns                                    2.9.0  →         2.12.0
 swagger-ui-dist                            3.24.3  →         3.25.1
 vue-i18n                                   8.15.3  →         8.17.4
 vue-infinite-loading                        2.4.4  →          2.4.5
 vue-property-decorator                      8.4.0  →          8.4.2
 vue2-filters                                0.6.0  →         0.11.0
 vuex                                        3.1.2  →          3.3.0
 @types/chai                                 4.1.7  →         4.2.11
 @types/chai-string                          1.4.1  →          1.4.2
 @types/jest                               24.0.23  →         25.2.1
 @types/mocha                                5.2.6  →          7.0.2
 @types/node                              10.12.18  →        13.13.4
 @types/selenium-webdriver                  3.0.15  →          4.0.9
 @types/sinon                               7.0.12  →          9.0.0
 @types/vuelidate                            0.7.5  →         0.7.13
 @vue/cli-plugin-typescript                  4.1.2  →          4.3.1
 @vue/cli-service                            4.1.2  →          4.3.1
 @vue/test-utils                     1.0.0-beta.30  →  1.0.0-beta.33
 autoprefixer                                9.4.9  →          9.7.6
 css-loader                                  2.1.0  →          3.5.3
 file-loader                                 3.0.1  →          6.0.0
 html-webpack-plugin                         3.2.0  →          4.3.0
 husky                                       1.3.1  →          4.2.5
 jest                                       24.5.0  →         25.5.4
 jest-vue-preprocessor                       1.7.0  →          1.7.1
 lint-staged                                 8.1.4  →         10.2.2
 merge-jsons-webpack-plugin                 1.0.18  →         1.0.21
 mocha                                       6.0.2  →          7.1.2
 mini-css-extract-plugin                     0.5.0  →          0.9.0
 node-notifier                               5.4.0  →          7.0.0
 optimize-css-assets-webpack-plugin          5.0.1  →          5.0.3
 portfinder                                 1.0.20  →         1.0.26
 prettier                                   1.16.4  →          2.0.5
 protractor                                  5.4.2  →          5.4.4
 rimraf                                      2.6.3  →          3.0.2
 sass                                       1.17.2  →         1.26.5
 sass-loader                                 7.1.0  →          8.0.2
 sinon                                       7.3.2  →          9.0.2
 ts-jest                                    24.0.0  →         25.4.0
 ts-loader                                   5.3.3  →          7.0.2
 ts-node                                     8.0.2  →          8.9.1
 tslib                                       1.9.3  →         1.11.1
 tslint                                     5.13.0  →          6.1.2
 typescript                                  3.2.4  →          3.8.3
 url-loader                                  1.1.2  →          4.1.0
 vue-loader                                 15.8.3  →         15.9.2
 webpack                                    4.29.5  →         4.43.0
 webpack-bundle-analyzer                     3.3.2  →          3.7.0
 webpack-cli                                 3.2.3  →         3.3.11
 webpack-dev-server                          3.2.1  →         3.10.3
 webpack-merge                               4.2.1  →          4.2.2

To test if this is an easy update, I ran the following:

ncu -u
npm i
npm test

This fails:

Warning: member-ordering - Direct string option is deprecated and does not support accessors.
See also https://palantir.github.io/tslint/rules/member-ordering/
You should replace "static-before-instance","variables-before-functions"
with the following equivalent options and add -accessor categories as appropriate:
[
  {
    "name": "static field",
    "kinds": [
      "public-static-field",
      "protected-static-field",
      "private-static-field"
    ]
  },
  {
    "name": "instance field",
    "kinds": [
      "public-instance-field",
      "protected-instance-field",
      "private-instance-field"
    ]
  },
  {
    "name": "static method",
    "kinds": [
      "public-static-method",
      "private-static-method",
      "protected-static-method",
      "public-static-accessor",
      "protected-static-accessor",
      "private-static-accessor"
    ]
  },
  {
    "name": "instance method",
    "kinds": [
      "public-constructor",
      "protected-constructor",
      "private-constructor",
      "public-instance-method",
      "protected-instance-method",
      "private-instance-method",
      "public-instance-accessor",
      "protected-instance-accessor",
      "private-instance-accessor"
    ]
  }
]
/Users/mraible/vue/src/main/webapp/app/shared/data/data-utils.service.ts:73:33
ERROR: 73:33   space-before-function-paren  Spaces before function parens are disallowed
ERROR: 171:68  space-before-function-paren  Spaces before function parens are disallowed

/Users/mraible/vue/src/main/webapp/app/shared/date/filters.ts:12:36
ERROR: 12:36   space-before-function-paren  Spaces before function parens are disallowed
ERROR: 18:38   space-before-function-paren  Spaces before function parens are disallowed

/Users/mraible/vue/src/test/javascript/spec/app/account/register/register.component.spec.ts:63:51
ERROR: 63:51   space-before-function-paren  Spaces before function parens are disallowed

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! vue@0.0.0 lint: `tslint --project tsconfig.json -e 'node_modules/**'`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the vue@0.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mraible/.npm/_logs/2020-05-02T20_32_41_439Z-debug.log
npm ERR! Test failed.  See above for more details.
atomfrede commented 4 years ago

Can you do the check against current master? For some the update is no a no brainer (e.g. test-utils has a breaking change and vue-filters too, when I recall correctly).

mraible commented 4 years ago

Yes, I can do that in the next hour.

mraible commented 4 years ago

Here's the results of generating an app from master and running ncu on it:

axios                                      0.19.0  →         0.19.2
 bootstrap-vue                              2.12.0  →         2.13.0
 swagger-ui-dist                            3.24.3  →         3.25.1
 vue2-filters                                0.6.0  →         0.11.0
 @types/chai                                 4.1.7  →         4.2.11
 @types/chai-string                          1.4.1  →          1.4.2
 @types/jest                               24.0.23  →         25.2.1
 @types/mocha                                5.2.6  →          7.0.2
 @types/node                              10.12.18  →        13.13.4
 @types/selenium-webdriver                  3.0.15  →          4.0.9
 @types/sinon                               7.0.12  →          9.0.0
 @types/vuelidate                            0.7.5  →         0.7.13
 @vue/cli-plugin-typescript                  4.1.2  →          4.3.1
 @vue/cli-service                            4.1.2  →          4.3.1
 @vue/test-utils                     1.0.0-beta.30  →  1.0.0-beta.33
 autoprefixer                                9.4.9  →          9.7.6
 css-loader                                  2.1.0  →          3.5.3
 file-loader                                 3.0.1  →          6.0.0
 html-webpack-plugin                         3.2.0  →          4.3.0
 husky                                       1.3.1  →          4.2.5
 jest                                       24.5.0  →         25.5.4
 jest-vue-preprocessor                       1.7.0  →          1.7.1
 lint-staged                                 8.1.4  →         10.2.2
 merge-jsons-webpack-plugin                 1.0.18  →         1.0.21
 mocha                                       6.0.2  →          7.1.2
 mini-css-extract-plugin                     0.5.0  →          0.9.0
 node-notifier                               5.4.0  →          7.0.0
 optimize-css-assets-webpack-plugin          5.0.1  →          5.0.3
 portfinder                                 1.0.20  →         1.0.26
 prettier                                   1.16.4  →          2.0.5
 protractor                                  5.4.2  →          5.4.4
 rimraf                                      2.6.3  →          3.0.2
 sass                                       1.17.2  →         1.26.5
 sass-loader                                 7.1.0  →          8.0.2
 sinon                                       7.3.2  →          9.0.2
 ts-jest                                    24.0.0  →         25.4.0
 ts-loader                                   5.3.3  →          7.0.2
 ts-node                                     8.0.2  →          8.9.1
 tslib                                       1.9.3  →         1.11.1
 tslint                                     5.13.0  →          6.1.2
 typescript                                  3.2.4  →          3.8.3
 url-loader                                  1.1.2  →          4.1.0
 vue-loader                                 15.8.3  →         15.9.2
 webpack                                    4.29.5  →         4.43.0
 webpack-bundle-analyzer                     3.3.2  →          3.7.0
 webpack-cli                                 3.2.3  →         3.3.11
 webpack-dev-server                          3.2.1  →         3.10.3
 webpack-merge                               4.2.1  →          4.2.2

My .yo-rc.json:

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.mycompany.myapp",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "6.8.0",
    "applicationType": "monolith",
    "baseName": "vue",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "MzRiMDM0NWUwMGMwMDNjZmU0YWRmY2UwOWIyYzMwOWNmNGM3ZWNjMWQwOTlkNGI0MDk5NjVhYWNlYzY3NDU0NDVkMGQyNmZkNjk4OTY0ZTQzMDliN2MxMWQ2MTZiMjk1NzJmMmY1YjZiMjg2MDI5MmE5NGE1NjQ5MTFmNTg2NDk=",
    "embeddableLaunchScript": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "vue",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1588450989430,
    "testFrameworks": ["protractor"],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [
      {
        "name": "generator-jhipster-vuejs",
        "version": "1.7.0"
      }
    ],
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": ["en"],
    "blueprints": [
      {
        "name": "generator-jhipster-vuejs",
        "version": "1.7.0"
      }
    ]
  }
}
mraible commented 4 years ago

Added bug bounty via https://github.com/jhipster/generator-jhipster/issues/11690.

atomfrede commented 4 years ago

Thanks Matt, I will have look before continuing https://github.com/jhipster/jhipster-vuejs/pull/601

atomfrede commented 4 years ago

Small heads up, I am nearly done, e2e test are running fine. Need to fix the normal unit tests, not yet sure whats wrong.