Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement for updating an existing project #10811

Closed
GELight opened this issue Nov 8, 2019 · 1 comment

Comments

@GELight
Copy link

@GELight GELight commented Nov 8, 2019

What problem does this feature solve?

Hi Vue-Dev-Team,

I beleave, One of the most painfull things in the NPM dependency hell is to update packages of an existing project. Here is a code snippet of a package.json of a typical Vue project from us:

{
"dependencies": {
    "axios": "^0.19.0",
    "vue": "^2.6.10",
    "vue-i18n": "^8.15.0"
  },
  "devDependencies": {
    "@kazupon/vue-i18n-loader": "^0.3.0",
    "@vue/cli-plugin-babel": "^3.12.1",
    "@vue/cli-plugin-e2e-nightwatch": "^3.12.1",
    "@vue/cli-plugin-eslint": "^3.12.1",
    "@vue/cli-plugin-unit-jest": "^4.0.5",
    "@vue/cli-service": "^3.12.1",
    "@vue/eslint-config-standard": "^3.0.5",
    "@vue/test-utils": "^1.0.0-beta.29",
    "babel-core": "7.0.0-bridge.0",
    "babel-jest": "^23.6.0",
    "ecom-backoffice-styles": "^3.1.1",
    "full-icu": "^1.3.0",
    "node-sass": "^4.13.0",
    "sass-loader": "^7.3.1",
    "vue-cli-plugin-i18n": "^0.5.2",
    "vue-template-compiler": "^2.6.10"
  }
}

The greatest problem is to update all dependencies for the Vue project or all Dev-Server Dependencies etc... Unfortunatelly there is no CLI method to update all dependencies of the Vue project.

Our workflows currently:

1. Manually update of patch and minor versions

  • The only thing we can do "save" without big problems is to use "yarn upgrade" to update all "patch" and "minor" versions. After yarn upgrade we have to do a manual process where we search all updated version numbers inside the yarn.lock and set/update all related dependencies/devDependencies inside the package.json.

2. Create a new Vue project per CLI
The second way to update a project is to create a new Vue project per VUE-CLI. So we have a new project with maybe other dependency or folder structures etc where we try to do a manually copy of our source files into the new project.
Now a big effort will be to test the new project and all unit or e2e tests etc .... That all to update versions of all related dependencies... :/

My tip or idee would be like the total.js lib

  • Just ONE dependency for dependencies or devDependencies.

Instead of the dependencies like our current project examples like this ....

{
  "dependencies": {
    "vue": "^2.6.10",
    ...
  },
  "devDependencies": {
    "@kazupon/vue-i18n-loader": "^0.3.0",
    "@vue/cli-plugin-babel": "^3.12.1",
    "@vue/cli-plugin-e2e-nightwatch": "^3.12.1",
    "@vue/cli-plugin-eslint": "^3.12.1",
    "@vue/cli-plugin-unit-jest": "^4.0.5",
    "@vue/cli-service": "^3.12.1",
    "@vue/eslint-config-standard": "^3.0.5",
    "@vue/test-utils": "^1.0.0-beta.29",
    "babel-core": "7.0.0-bridge.0",
    "babel-jest": "^23.6.0",
    "vue-cli-plugin-i18n": "^0.5.2",
    "vue-template-compiler": "^2.6.10",
    ...
  }
}

...... the dependencies of a Vue-Project should be look like this:

{
  "dependencies": {
    "vue": "^2.6.10",
    ...
  },
  "devDependencies": {
    "@vue/dev": "^2.6.10",
    ...
  }
}

In example of total.js you can see that only ONE dependency is needed for any total.js projects.
I think this could be a very improvement for all developers and also the effort to update a project can be minimized.

Best regards,
Mario

PS: I LOVE VUE.js :)

What does the proposed API look like?

{
  "dependencies": {
    "vue": "^2.6.10",
    ...
  },
  "devDependencies": {
    "@vue/dev": "^2.6.10",
    ...
  }
}
@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Nov 8, 2019

Hey, I'm glad you like Vue :)
IIRC there is a command update or upgrade on the vue-cli (which is on another repo) that simplifies this, you can give feedback on the vue-cli repo
The problem you are seeing is inherent to JS projects architecture being so modular, it's one of its disadvantages it has but it allows to have independent updates instead of having one big dependency that is updated less often

@posva posva closed this Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.