Closed TeddyHuang-00 closed 7 months ago
The first thing is, is everything working well on bun?
VuePress2 never managed to support it. If so, we can take a look at bun support in this package.
The first thing is, is everything working well on bun?
As far as I can tell, it works great with your theme hope and I have been experimenting bun for a while and it is sort of stable now so that I strongly suggest at least take a look at it.
VuePress2 never managed to support it. If so, we can take a look at bun support in this package.
I did notice bugs when building with bun in "bun" mode, but things should be just fine when doing so with bun in "node" mode. Though I don't know what specific change will be needed for adaptation to bun exactly, that might be due to the difference in internal APIs. That being said, I think for the most of developers they will stick to nodejs for a long time, so I don't think this will even cause a lot of issue as bun offers such compatibility with nodejs anyway. In a word, AFAIK, bun can be used for VuePress2 one way or another.
EDIT: Another thing is that regardless of bun's compatibility with VuePress2, it can act as a standalone package manager and you can still use npx to call the build process of VP2, so in that sense, adding support for bun within this vp-update will still make sense for those who prefer bun for its speed in package managing.
Fine, can you point of related docs?
I need:
And how can I detect a bun project in your mind?
- install command
https://bun.sh/docs/cli/install
- getting/setting registry (if present)
https://bun.sh/docs/install/registries
EDIT: I see what you mean by this, but there is still not a way to get the registries from cli yet, though the bun config
subcommand is reserved.
- update command upgrading all deps in the project.
Unfortunately, there is not yet an official implementation of upgrading dependencies (though I suspect it will come in weeks). So if this is what vp-update relies on, then I guess we will have to wait until then.
P.S. For other none VP-based projects, I have been using npm-check-updates
with bun to only upgrade the package.json
and then run bun install
to update the lock file. Is it possible to do something similar here?
https://bun.sh/docs/cli/update
I can tell from the current implementation that you update the package.json
first, then this bun update
command can handle this. Sorry for the misunderstanding.
And how can I detect a bun project in your mind?
I see that the current solution is to use the lock file of the project to judge the pm used, and bun also creates a unique lock file bun.lockb
(from my limited knowledge this is like a binary version of yarn lock file)
If you are too busy for other important things, I can open a PR for this in the following weeks. Thank you anyway for your time on these projects.
If you are too busy for other important things, I can open a PR for this in the following weeks. Thank you anyway for your time on these projects.
yes i am.actuallybusy these days, pr would be great.
Closed
Thank you for this awesome work!
I have been testing out bun lately and found issue that, whenever I ran
bunx vp-update
, the actual package manager used to update the dependencies is stillpnpm
, and it will create a newpnpm-lock.yaml
and may reinstall some of the dependencies as pnpm would.I am wondering if there's any possibility or plan to add support for bun. I know bun is in its early stage, so I will not be surprised if this will not be done in the near future. Thank you again for this anyway!