Description
Version
3.0.0-rc.3
Reproduction link
https://unpkg.com/@vue/cli@3.0.0-rc.3/lib/util/
Steps to reproduce
npm install -g @vue/cli
- browse to global
@vue/cli
npm folder (on Windows\Users\{username}\AppData\Roaming\npm\node_modules\@vue\cli\lib\util
) - open the
.version
file, it contains3.0.0-beta.15
What is expected?
I assume the file should contain 3.0.0-rc.3
(or whatever happens to be the latest version). And that when creating a new app, the package devDependencies
should be from the latest version. However, they are using the value from the .version
file, e.g. 3.0.0-beta.15
.
What is actually happening?
Looking at the @vue/cli/lib/util/getVersions.js
file (https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli/lib/util/getVersions.js), the code appears to use that file as a version cache if the file hasn't been modified within the past 7 days.
I suspect perhaps the version number in the .version
file was a result of a bad package? If not, then the getVersions.js
code should compare the cached version against the latest version. I'll be submitting a PR with a change to check the cached version.