refactor: slim CI matrix, shared utils, unified logging, remove __test__ leak#525
Merged
refactor: slim CI matrix, shared utils, unified logging, remove __test__ leak#525
Conversation
… __test__ from public API - CI: unit-test uses dynamic matrix (PR=ubuntu+22 only, push=full 3OS×2Node); adapter-test reduced to ubuntu-latest (OS doesn't affect pure unit tests) - _shared/common.ts: add sleep() and clampToRange() shared adapter utilities; douban/utils.ts and sinablog/utils.ts now use clampToRange instead of duplicate clampLimit - browser/daemon-client.ts: replace inline setTimeout Promise with local sleep() - execution.ts: replace conditional console.error with log.debug - browser/index.ts: remove __test__ from public barrel export; browser.test.ts now imports internal helpers directly from source files
… clarify clampToRange docs
…ch lodash convention
f581b27 to
66c81a2
Compare
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.
Summary
unit-testPR 阶段只跑 ubuntu+Node22(2 jobs),push 到 main/dev 才跑完整矩阵(12 jobs);adapter-test移除 OS 矩阵,只跑 ubuntu-latestsrc/clis/_shared/common.ts,提供sleep()和clampToRange();douban/utils.ts和sinablog/utils.ts的重复clampLimit统一使用clampToRangenew Promise(r => setTimeout(r, ms))替换为本地sleep()常量execution.ts的条件console.error改为log.debug__test__泄漏:browser/index.ts不再从公共 barrel 导出内部测试辅助函数;browser.test.ts直接从源文件 importTest plan
npx tsc --noEmit✓ (zero errors)