Skip to content

.version file contains 3.0.0-beta.15 in .rc3 npm package #1613

Closed
@aweber1

Description

@aweber1

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 contains 3.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions