Code Monkey home page Code Monkey logo

Comments (6)

zhouyu1993 avatar zhouyu1993 commented on June 1, 2024 1

@dcloudio/uvm

/@dcloudio/uvm/lib/version.js

function compare (version, oAlpha, ov1, ov2, ov3, ov4, ov5, strict) {
    const dataDiff = approximateDate(tv4 || ov4, ov4)
    const fix = dataDiff + Number(ov5)
    if (
         approximateCode(tv1, ov1) &&
         approximateCode(tv2, ov2, strict) &&
         approximateCode(tv3, ov3, strict) &&
         dataDiff &&
         fix > nextVersionFix
    ) {
      if (vue3 || tAlpha === oAlpha) {
        nextVersion = version
        nextVersionFix = fix
      }
    }
}

@dcloudio/vue-cli-plugin-uni 里面包含了正式版和 alpha 版,比如:

[
"3.0.0-alpha-4010520240507001",
"3.0.0-4010520240507001"
]

这两个版本,一个 alpha 版,一个正式版,后面的 4010520240507001 是一样的,导致执行 npx @dcloudio/uvm@latest4.15.2024050802,安装成了前面的 3.0.0-alpha-4010520240507001 alpha 版本。

解决思路

if (vue3 || tAlpha === oAlpha) {

这一行判断似乎有问题?为啥 vue3 时就直接匹配了?

去掉 vue3,改成 if (tAlpha === oAlpha) {

或者改成 if (tAlpha === oAlpha || vue3) {

from uni-app.

zhouyu1993 avatar zhouyu1993 commented on June 1, 2024

+1。npx @dcloudio/uvm@latest会更新成alpha版本

from uni-app.

Xiphin avatar Xiphin commented on June 1, 2024

+1

from uni-app.

zhouyu1993 avatar zhouyu1993 commented on June 1, 2024

from uni-app.

Ttou avatar Ttou commented on June 1, 2024

+1

from uni-app.

zebraoo avatar zebraoo commented on June 1, 2024

+1

from uni-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.