Repository navigation
dsh: peer 范围改成 || 写法,严格 semver 下也能匹配 0.2.x 预发布(latest 0.2.1-rc.5) - #4
Merged
Merged
Conversation
…-rc / 0.2.2-alpha 预发布
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
根
package.json和dsh-plugin/package.json的 4 个@deepseek-ai/dsh-*peer 写的是>=0.1.7-rc.2 <0.3.0。按严格 semver(npm / pnpm 的 peer 校验默认不含预发布),带预发布号的版本只有和下限0.1.7同一个[major, minor, patch]时才算匹配,所以 0.2.0-rc.x、0.2.1-rc.x(当前 npmlatest=0.2.1-rc.5)、0.2.2-alpha.x 全都不匹配,装的时候会报 peer 不满足。改动
只改 peer 范围,照 KyoMio/dsh-zen-remote 的
||写法:package.json、dsh-plugin/package.json)。cordis/schemastery/react和peerDependenciesMeta没动。^0.2.2-alpha.1,这里用^0.2.2-alpha.0,让 0.2.2-alpha.x 整段都能匹配上。dsh-plugin/README.md(2 处)和dsh-plugin/SPEC.md(1 处)写到旧范围的地方也一起改了。README 表格里的|做了转义。dsh-plugin/用 pnpm(packageManager: pnpm@11.7.0),pnpm-lock.yaml里autoInstallPeers: false,importer 不记录本包自己的 peer,所以改了也不影响锁文件。下面已用pnpm install --frozen-lockfile验证。没有新增其它锁文件。semver 矩阵(semver 7.8.5,
satisfies)npm dist-tags(2026-10-30):
latest=next=0.2.1-rc.5,alpha=0.2.2-alpha.2。0.1.7-rc.10.1.7-rc.20.1.70.1.90.2.0-rc.10.2.0-rc.20.2.00.2.1-alpha.10.2.1-rc.20.2.1-rc.50.2.10.2.2-alpha.00.2.2-alpha.20.2.20.2.90.3.0-alpha.10.3.0dsh-app-boot的evaluatePluginCompatibility用semver.satisfies(..., { includePrerelease: true })。所以旧范围在宿主里其实一直是通过的,问题只出在包管理器这一层。唯一的行为差别是0.3.0-alpha.x:旧范围在宿主里算兼容,新范围不算。这和 zen 一致,也符合 README 写的「0.3 出来重核」。验证
在断网 bwrap 沙箱里跑(
--unshare-net,不挂 /home,env -i,不带凭据)。依赖事先在沙箱外下载好。Node 24.22.1。evaluatePluginCompatibility(dsh 0.2.1-rc.2 和 0.2.1-rc.5 的 app-boot,新旧 manifest 各一次)node --test test/*.test.mjsnode scripts/sync-doc-version.mjs --checkdsh-plugin:pnpm install --frozen-lockfile --offline(pnpm 11.7.0)dsh-plugin: verify(tsc ×2)dsh-plugin:node --test test