fix: 自检诊断全面审计与加固(Windows pnpm 探测 / 版本比较契约 / 状态契约统一) - #32
Merged
Conversation
- runCli:Windows 下 .cmd/.bat/裸命令经 ComSpec(cmd.exe /d /c)包装(对齐 launcher C6)—— 修复 npm 全局安装的 pnpm.cmd 无法被 spawn(shell:false) 直接启动(EINVAL/ENOENT), 导致 checkAsync 自检「pnpm」恒误报缺失、ensureNpm/unmountPack/rollbackMount 的 pnpm add/remove 全失效 - statusSync:activatedAt 改为反向遍历取「最近一次」激活(修复激活→卸载→再激活后返回最早时间戳的陈旧数据) - statusSync:补 memoryDir 字段(与 checkAsync 契约统一,单一真源 MEMORY_DIR) - 版本比较契约统一:新增 PatchContract.CompareVersions/IsNewerVersion(pre/build 整版本剥离, 修复 IsNewerVersion 按「段」剥离 '-' 导致 1.0.0-alpha.1 被误判 > 1.0.0),Main.cs 委托, 注入页面 JS nv 同步 split(/[-+]/) 与 parseInt||0 - 新增回归测试:run-cli-windows.test.mjs(真实 pnpm.cmd spawn / checkAsync 探测 / .exe 直连)、 status 3 项、C# CompareVersions/IsNewerVersion 15 项 本地全绿:hotplug 182 / shared-core 178 / memory-hub 61 / C# 84 / qa9 17 / vendor 同步一致
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.
审计范围
自检诊断及其相关功能(JS 侧 check()/checkAsync()/statusSync() + C# 侧 BuildNativeSelfCheckScript 与版本探测/比较)。
根因修复(每项均有回归测试实证)
验证