Closed ditoukanyun closed 5 months ago
I encountered the same issue when building VuePress today.
Hello @ditoukanyun. Please provide a minimal reproduction using a GitHub repository or v2.vuepress.vuejs.org/new. Issues marked with need reproduction
will be closed if they have no activity within 7 days.
I see, the create-vuepress package is still using old version. Please add tests for the package, cuz it's the first recommended setup in our docs @pengzhanbo @Mister-Hope
Yes, because lerna won't bump that package unless it's code has been changed.
@meteorlxy @pengzhanbo any ideas to have its version bumped automatically while ensuring core and ecosystem are not misaligned (while core just released a new version)?
My current idea is to add those deps in to devDeps and config graphType
in lerna publish config to all
@meteorlxy @Mister-Hope
We can use pacote to check the latest version numbers of vuepress@next
and @vuepress/*@next
, and then insert them into package.json
. This way, create-vuepress
will not be strongly coupled with the versions.
Just like this:
const res = await pacote.packument('vuepress')
const distTags = res['dist-tags']
console.log(distTags['next'])
Alternatively,wen can dynamically install vuepress@next
, @vuepress/*@next
, and other packages using install-pkg after generating the project to ensure that the installed package contents are always up-to-date.
Alternatively,wen can dynamically install vuepress@next, @vuepress/*@next, and other packages using install-pkg after generating the project to ensure that the installed package contents are always up-to-date.
We couldn't. Like I said before, there could be times where core release a new version and the ecosystem has not suport it.
The helper should always try to use core version that ecosystem supports.
The simplest hack could be announcing all the needed packages as optional peers and reference them as workspace, So that the package could be automatically bumped and get the correct version in this repo.
The version can be obtained later by importing the package.json
The vuepress/core
repository uses the combination of bumpp + pnpm publish -r
to ensure that all packages within the repository have the same version number. Perhaps vuepress/ecosystem
should also consider implementing having all packages within the repository share the same version number.
Subsequently, we can utilize this approach to use pacote to retrieve package information for @vuepress/theme-default
, including its version number and the vuepress
version number from its peer deps
, in order to determine the versions of other packages that should be installed.
Perhaps vuepress/ecosystem should also consider implementing having all packages within the repository share the same version number.
Absolutely, no. We use lerna, Because we want to make sure if a single plugin is modified then other unrelated packages won't release any new versions.
You may annoy users if they found the plugins and theme-default are bumped for no reason.
Once vp turned into stable, then we may remove the work space protocol in the package.json, And make it a minor version range.
Description
pnpm create vuepress vuepress-starter
"docs:dev": "vuepress dev docs",
Reproduction
1
Used Package Manager
pnpm
System Info