Skip to content

Package version constraint parsing seems off #42

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

Closed
ivuorinen opened this issue Feb 15, 2019 · 3 comments
Closed

Package version constraint parsing seems off #42

ivuorinen opened this issue Feb 15, 2019 · 3 comments

Comments

@ivuorinen
Copy link
Contributor

Running vue-migration-helper with vue-router:^3.0.2 and vuex:^3.0.1 suggests following migrations:

1. Replace "vue-router": "^3.0.2" with "vue-router": "^2.0.0", then run: npm install
  Line 22: package.json
  Reason: If you are using pre-2.0 Vue Router through NPM, you have to update it in your package.json file
  More info: http://vuejs.org/guide/migration-vue-router.html#

2. Replace "vuex": "^3.1.0" with "vuex": "^1.0.0", then run: npm install
  Line 23: package.json
  Reason: Vuex 1.0 is the earliest supported version compatible with Vue 2.0
  More info: http://vuejs.org/guide/migration-vuex.html#

It looks like the check assumes anything that's not 2.* (for vue-router) is wrong:

Should/Could it be changed to use semver.satisfies('^2.0.0', [package.json data]) and ^1.0.0?

@chrisvfritz
Copy link
Contributor

Thanks for reporting this. 🙂 The way the matching works here, we'd have to stick with regex rather than the more optimal semver.satisfies, but a PR with a fix and new tests would be very welcome for this! Otherwise, I'll try to get to it as soon as I'm able.

@ivuorinen
Copy link
Contributor Author

Closing as resolved, thanks for accepting the PR!

@chrisvfritz
Copy link
Contributor

Thanks for providing it! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants