Skip to content
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

Suggest to fix the packages version in alpha stage #1379

Closed
meteorlxy opened this issue Mar 1, 2019 · 0 comments
Closed

Suggest to fix the packages version in alpha stage #1379

meteorlxy opened this issue Mar 1, 2019 · 0 comments
Assignees
Labels
type: enhancement Request to enhance an existing feature

Comments

@meteorlxy
Copy link
Member

meteorlxy commented Mar 1, 2019

Version

1.0.0-alpha.x

What is the issue

"@vuepress/core": "^1.0.0-alpha.40",
"@vuepress/theme-default": "^1.0.0-alpha.40",

As shown above, we use ^ as prefix.

In alpha & beta stage, it's better to lock the version without ^.

Take @babel/core for example:

  • Versions are locked in alpha and beta stage and rc version
  • Versions with ^ in release version

Why

As known, we may have breaking changes in alpha stage, and each packages may not work well with each other if the versions are different.

When users want to rollback/lock to a certain version of vuepress, i.e.

yarn add vuepress@1.0.0-alpha.39

As the dependencies of vuepress@1.0.0-alpha.39 are:

"@vuepress/core": "^1.0.0-alpha.39",
"@vuepress/theme-default": "^1.0.0-alpha.39",

They will get 1.0.0-alpha.40 for all other packages.

Workaround is to lock all (possible) related packages manually:

yarn add \
  vuepress@1.0.0-alpha.39 \
  @vuepress/core@1.0.0-alpha.39 \
  @vuepress/theme-default@1.0.0-alpha.39 \
  @vuepress/markdown@1.0.0-alpha.39 \
  @vuepress/markdown-loader@1.0.0-alpha.39

---- update

The workaround above does not work... 😓

I got things like this:

+--- node_modules
     +--- @vuepress
          +--- core   # 1.0.0-alpha.39
     +--- vuepress    # 1.0.0-alpha.39
          +--- node_modules
               +--- @vuepress
                    +--- core   # 1.0.0-alpha.40 (why?!)

and the yarn.lock file:

"@vuepress/core@1.0.0-alpha.39":
  version "1.0.0-alpha.39"

"@vuepress/core@^1.0.0-alpha.39":
  version "1.0.0-alpha.40"

That means, although I try to lock the version of @vuepress/core to 1.0.0-alpha.39, the vuepress cli will always use @vuepress/core@1.0.0-alpha.40.

I even tried to modify the yarn.lock manually and delete the "1.0.0-alpha.40" section, remove node_modules, then use yarn install --frozen-lockfile to install, and get the same node_modules...


So if we don't fix the packages version, it might be impossible to rollback/lock to a certain version of vuepress by yarn. (npm works well, though)

@meteorlxy meteorlxy mentioned this issue Mar 2, 2019
1 task
@ulivz ulivz self-assigned this Mar 2, 2019
@ulivz ulivz added the type: enhancement Request to enhance an existing feature label Mar 2, 2019
@ulivz ulivz closed this as completed in ff463eb Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Request to enhance an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants