Skip to content

升级依赖

升级满足匹配规则的依赖

比如此配置,升级项目内全部满足 @ruan-cat 前缀的依赖,并升级到最后一个版本。

pnpm9.5.0

bash
pnpm up @ruan-cat/*@latest

pnpm9.15.0

在 pnpm9.15.0 内,无法完成升级。要写成以下形式才行,做完整的匹配:

bash
pnpm update '@ruan-cat/*' --latest

升级全部依赖

这个写法是错误的:

bash
pnpm up *@latest

会引发以下报错:

详情
log
PS D:\code\github-desktop-store\gh.09oa> pnpm up *@latest
 WARN  deprecated @types/rollup-plugin-visualizer@5.0.3: This is a stub types definition. rollup-plugin-visualizer provides its own type definitions, so you do not need this installed.
 ERR_PNPM_FETCH_404  GET https://registry.npmmirror.com/oa-frontend: Not Found - 404

This error happened while installing a direct dependency of D:\code\github-desktop-store\gh.09oa

oa-frontend is not in the npm registry, or you have no permission to fetch it.

No authorization header was set for the request.
Progress: resolved 77, reused 76, downloaded 1, added 0

正确的写法应该是:

bash
pnpm up * @latest

贡献者

The avatar of contributor named as ruan-cat ruan-cat

页面历史