Repository navigation
feat: 对齐 dsh 0.1.7-rc.2 依赖并整理 CI - #5
Merged
Merged
Conversation
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.
feat: 对齐 dsh 0.1.7-rc.2 依赖并整理 CI
问题
包从建立起就没有
peerDependencies段。dsh 的兼容门禁按这份声明判断插件与当前 runtime 是否匹配,缺了它整条判定不会发生,装上不对版本的 dsh 也不会得到incompatible-version提示。pnpm-lock.yaml是在autoInstallPeers默认开启时生成的,peer 一落地,CI 的pnpm install --frozen-lockfile会因 lock 配置对不上报ERR_PNPM_LOCKFILE_CONFIG_MISMATCH。CI 跑 Node 22/26 矩阵,release 用 Node 24,两处都没跟工作区锁定的 26.3.1 对齐。release 也没有「该 tag 版本已发布就整体跳过」的前置守卫,补历史 tag 时重复 publish 会报错,版本回写还会把 main 改回旧号。
方案
peerDependencies补@deepseek-ai/dsh,范围^0.1.7-rc.2.npmrc关闭auto-install-peers,peer 只作门禁契约不自动安装,重新生成 lockpackage.json补engines.node,版本 0.2.1 → 0.2.2cordis.patch.yml注释改中文ci.yml去掉 Node 矩阵锁死 26.3.1,产物校验补client.js.map与cordis.patch.ymlrelease.yml补已发布守卫、类型检查、冒烟与产物校验,发布改用npm publish --provenance验证
pnpm install --frozen-lockfile通过pnpm typecheck通过pnpm build产出lib/index.js、lib/index.d.ts与lib/client.jspnpm smoke全部通过其他