chore: 统一 npm 安装并停止追踪 lib - #84
Merged
Merged
Conversation
This was referenced Aug 28, 2026
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.
Closes #77
Addresses #83
背景
目前 dsh-genui 同时维护 npm 和 GitHub 源安装,但 GitHub 安装已经多次带来额外兼容问题:
@omdsh-dev/dsh-genui改为@changfenhuang/dsh-genui后,github:安装直接出现加载失败;git+https,在未安装 Git 的 Windows 环境直接更新失败。也就是说,GitHub 源已经不只是“多一种安装方式”,而是会持续产生安装、更新、包改名和市场兼容成本。
为什么统一到 npm
当前一些高 star DSH 项目已经采用类似模式:
zhu1090093659/dsh-web-ui:正式安装全部走 npm,GitHub checkout 仅用于开发调试;omdsh-dev/DSH-better-sidebar:正式安装和更新走 npm package,源码安装单独作为开发流程;ccch1mneyyy/dsh-TUI:同样以 npm 一键安装作为主要发布方式。因此这里也收敛为:GitHub 作为 source,npm 作为 installable release。
正式安装只保留:
本 PR
scripts/install.sh改为 npm 安装,不再检查或依赖系统 Git;git改为npm;lib/改为纯构建产物并停止提交;lib/的 freshness check;pnpm run check、build、verify-pack和 release publish,npm 包仍然会在发布时完整生成并验证lib/。对 dsh-market 的改善
#83 中市场从 README 获取到了 Git 安装路径,导致已通过 npm 安装的插件在“更新”时反而走 Git。
统一 npm 后,仓库只向市场暴露一个正式安装目标:
这样可以避免后续 catalog/market 再在 npm 与 Git 两种安装源之间做错误选择。
已有的 market 缓存数据可能仍需要重新抓取 / probe 一次,但仓库侧不再继续产生歧义。
仓库维护收益
停止追踪
lib/后,源码 PR 不再同时重写lib/client.js等 generated bundle:可以直接减少:
lib/client.js的高频冲突;构建产物仍由 CI 和 release 严格验证,只是不再把它作为源码仓库的一部分长期维护。
@taekchef 这是一个破坏性更新,需要决策确认。