Repository navigation
fix(plugins): 插件信息查询不再依赖系统 npm - #825
Open
yaojin3616 wants to merge 1 commit into
Open
yaojin3616 wants to merge 1 commit into
yaojin3616 wants to merge 1 commit into
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.
修复插件查询依赖系统 npm
在没有系统 Node/npm 的 Windows 安装环境中,官方插件页面查询
dshmarket时,内置 pnpm 10.34.5 会将view转交给 PATH 中的 npm,导致spawnSync npm ENOENT,安装尚未开始就失败。本次修改:
view/info/show/v查询直接运行安装目录中的 npm CLI;从实际 pnpm 入口解析,不从 Profile、cwd 或已 staging 的 runner 查找。--config.*参数为 npm 参数,保留 registry、scoped auth、代理、证书、JSON 与错误退出行为;add/install/remove 等仍走 pnpm。依赖取舍:npm 包约 13 MB 未压缩(打包过滤前);选择复用 npm 配置及认证语义,避免为此重做 registry/代理/证书处理。等捆绑的 pnpm 支持等价的原生元数据查询后可移除此适配。
验证结果(macOS arm64):
npm run typecheck、npm run build、git diff --check通过。verifyPackageQuery,PATH 中无系统工具,查询通过;这不是完整应用安装包验收。npm ci已完成依赖安装和全部补丁重放,但 postinstall 的 Electron 下载先被缓存沙箱权限阻止、获准重试后又遇网络失败。复用本机同版本 Electron 43.0.0 后,npm run postinstall全部通过。npm test完整重试:2825 passed / 21 failed / 5 skipped,7 个文件失败,主要涉及 Electron loader 预期、真实 Harness 子进程、Open In 环境和 ASAR/native 临时目录。使用未修改 main 源码快照、共享相同依赖安装做了对照,这些测试组复现了同类失败;该对照不是一次独立干净安装。完整回归未报通过,未修改相关断言来绕过失败。范围限制:本 PR 修复 npm 查询入口缺失,不声称修复另一个
resolveGit/getRepoRefs安装失败;没有改动用户 Profile 数据和 Git 安装策略。Windows 原生安装包交互验收待 CI/目标机器完成。