unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.65k stars 341 forks source link

The retrieved Vue version number is incorrect. #767

Open wkeylin opened 3 weeks ago

wkeylin commented 3 weeks ago

Describe the bug

The main Vue 2 project at /project/ and a Vue 3 based docs subdirectory at/project/docs getVueVersion will return wrong version because of this issue https://github.com/unjs/mlly/issues/158 https://github.com/unplugin/unplugin-vue-components/blob/3e2c889b07fe9e35cac6b7403bbd9434af261a7c/src/core/options.ts#L86-L93

Reproduction

https://github.com/wkeylin/mlly-demo

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 96.22 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.2.0 - ~/.volta/tools/image/node/22.2.0/bin/node
    Yarn: 1.22.19 - ~/.volta/bin/yarn
    npm: 10.7.0 - ~/.volta/tools/image/node/22.2.0/bin/npm
    pnpm: 8.15.8 - ~/.volta/tools/image/pnpm/8.15.8/bin/pnpm
  Browsers:
    Chrome: 125.0.6422.142
    Safari: 17.5

Used Package Manager

pnpm

Validations